Skip to content

ATOMModel


function atom.api.ATOMLoader(estimator, acronym=None, fullname=None, needs_scaling=False) [source]

Convert an estimator to a model that can be ingested by ATOM. Note that only estimators that follow sklearn's API are compatible. Read more about using custom estimators in the user guide.

Parameters:

estimator: estimator class or instance
Model's estimator. Can be a class or an instance.

acronym: str or None, optional (default=None)
Model's acronym. Used to call the model from the trainer. If None, the capital letters in the estimator's __name__ are used (only if 2 or more, else it uses the entire name).

fullname: str or None, optional (default=None)
Full model's name. If None, the estimator's __name__ is used.

needs_scaling: bool, optional (default=False)
Whether the model needs scaled features. Can not be True for datasets with more than two dimensions. Read more about this in the user guide.

Returns: estimator: estimator
Provided estimator with custom attributes for ATOM's pipeline.


Example

from atom import ATOMRegressor, ATOMModel
from sklearn.linear_model import HuberRegressor

model =  ATOMModel(HuberRegressor, name="hub", fullname="Huber")

atom = ATOMRegressor(X, y)
atom.run(model)
atom.hub.predict(X_new)
Back to top