Model¶
This section documents the model components of the dummy module.
model
¶
Defines sklearn.dummy models interoperability.
This module provides integration between nextmv and scikit-learn's dummy models.
FUNCTION | DESCRIPTION |
---|---|
DummyRegressor : function |
Creates a sklearn.dummy.DummyRegressor from provided options. |
DummyRegressor
¶
DummyRegressor(options: Options) -> DummyRegressor
Creates a sklearn.dummy.DummyRegressor
from the provided options.
You can import the DummyRegressor
function directly from dummy
:
The DummyRegressor is a regressor that makes predictions using simple rules, which can be useful as a baseline for comparison against actual regressors.
PARAMETER | DESCRIPTION |
---|---|
|
Options for the DummyRegressor. Should be created using DummyRegressorOptions.to_nextmv() from the options module.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
DummyRegressor
|
A sklearn.dummy.DummyRegressor instance configured with the provided options. |
Examples:
>>> from nextmv_sklearn.dummy import DummyRegressor
>>> from nextmv_sklearn.dummy.options import DummyRegressorOptions
>>> options = DummyRegressorOptions()
>>> # Configure options as needed
>>> regressor = DummyRegressor(options.to_nextmv())
>>> regressor.fit(X_train, y_train)
>>> predictions = regressor.predict(X_test)