You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/homepage.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,8 @@ Mambular simplifies data preprocessing with a range of tools designed for easy t
89
89
90
90
91
91
<h2> Fit a Model </h2>
92
-
Fitting a model in mambular is as simple as it gets. All models in mambular are sklearn BaseEstimators. Thus the `.fit` method is implemented for all of them. Additionally, this allows for using all other sklearn inherent methods such as their built in hyperparameter optimization tools.
92
+
93
+
Fitting a model in mambular is as simple as it gets. All models in mambular are sklearn BaseEstimators. Thus, the `fit` method is implemented for all of them. Additionally, this allows for using all other sklearn inherent methods such as their built in hyperparameter optimization tools.
93
94
94
95
```python
95
96
from mambular.models import MambularClassifier
@@ -101,12 +102,12 @@ model = MambularClassifier(
101
102
n_bins=50,
102
103
d_conv=8
103
104
)
104
-
105
105
# X can be a dataframe or something that can be easily transformed into a pd.DataFrame as a np.array
Note, that using this, you can also optimize the preprocessing. Just use the prefix ``prepro__`` when specifying the preprocessor arguments you want to optimize:
150
+
151
+
152
+
**Note:** that using this, you can also optimize the preprocessing. Just use the prefix ``prepro__`` when specifying the preprocessor arguments you want to optimize:
153
+
154
+
149
155
```python
150
156
param_dist = {
151
157
'd_model': randint(32, 128),
@@ -156,7 +162,6 @@ param_dist = {
156
162
157
163
```
158
164
159
-
160
165
Since we have early stopping integrated and return the best model with respect to the validation loss, setting max_epochs to a large number is sensible.
161
166
162
167
@@ -300,6 +305,7 @@ Here's how you can implement a custom model with Mambular:
300
305
```
301
306
302
307
# Custom Training
308
+
303
309
If you prefer to setup custom training, preprocessing and evaluation, you can simply use the `mambular.base_models`.
304
310
Just be careful that all basemodels expect lists of features as inputs. More precisely as list for numerical features and a list for categorical features. A custom training loop, with random data could look like this.
0 commit comments