Skip to content

Commit d096518

Browse files
committed
adapt readme and fix import in unit test
1 parent f954a31 commit d096518

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ random_search.fit(X, y, **fit_params)
211211
print("Best Parameters:", random_search.best_params_)
212212
print("Best Score:", random_search.best_score_)
213213
```
214-
Note, that using this, you can also optimize the preprocessing. Just use the prefix ``prepro__`` when specifying the preprocessor arguments you want to optimize:
214+
Note, that using this, you can also optimize the preprocessing. Just specify the necessary parameters when specifying the preprocessor arguments you want to optimize:
215215
```python
216216
param_dist = {
217217
'd_model': randint(32, 128),
218218
'n_layers': randint(2, 10),
219219
'lr': uniform(1e-5, 1e-3),
220-
"prepro__numerical_preprocessing": ["ple", "standardization", "box-cox"]
220+
"numerical_preprocessing": ["ple", "standardization", "box-cox"]
221221
}
222222

223223
```
@@ -321,7 +321,7 @@ Here's how you can implement a custom model with Mambular:
321321
Define your custom model just as you would for an `nn.Module`. The main difference is that you will inherit from `BaseModel` and use the provided feature information to construct your layers. To integrate your model into the existing API, you only need to define the architecture and the forward pass.
322322

323323
```python
324-
from mambular.base_models import BaseModel
324+
from mambular.base_models.utils import BaseModel
325325
from mambular.utils.get_feature_dimensions import get_feature_dimensions
326326
import torch
327327
import torch.nn
@@ -365,7 +365,7 @@ Here's how you can implement a custom model with Mambular:
365365
You can build a regression, classification, or distributional regression model that can leverage all of Mambular's built-in methods by using the following:
366366

367367
```python
368-
from mambular.models import SklearnBaseRegressor
368+
from mambular.models.utils import SklearnBaseRegressor
369369

370370
class MyRegressor(SklearnBaseRegressor):
371371
def __init__(self, **kwargs):

tests/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import torch
44
import os
55
import importlib
6-
from mambular.base_models.basemodel import BaseModel
6+
from mambular.base_models.utils import BaseModel
77

88
# Paths for models and configs
99
MODEL_MODULE_PATH = "mambular.base_models"

0 commit comments

Comments
 (0)