Dummy Models
Dummy model implementations.
- class openadmet.models.architecture.dummy.DummyClassifierModel(*, strategy: str = 'most_frequent', random_state: int | None = None, constant: int | str | None = None)[source]
Bases:
DummyModelBaseDummy classification model.
Common parameters for dummy models can be found at: https://scikit-learn.org/stable/api/sklearn.dummy.html
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class openadmet.models.architecture.dummy.DummyModelBase[source]
Bases:
PickleableModelBaseBase class for Dummy models, allows instantiation from parameters that are passable to the Dummy model classes.
- build()[source]
Prepare the model.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- predict(X: ndarray, **kwargs) ndarray[source]
Predict using the model.
- Parameters:
X (np.ndarray) – Featurized data to predict on
kwargs (dict) – Additional keyword arguments to pass to the predict method of the Dummy model
- Returns:
Predictions from the model
- Return type:
np.ndarray
- train(X: ndarray, y: ndarray)[source]
Train the model.
- Parameters:
X (np.ndarray) – Training data features
y (np.ndarray) – Training data labels
- class openadmet.models.architecture.dummy.DummyRegressorModel(*, strategy: str = 'mean', constant: float | None = None, quantile: float | None = None)[source]
Bases:
DummyModelBaseDummy regression model.
Common parameters for dummy models can be found at: https://scikit-learn.org/stable/api/sklearn.dummy.html
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].