Code Documentation: Models

mastml.models Module

Module for constructing models for use in MAST-ML.

SklearnModel:

Class that wraps scikit-learn models to have MAST-ML type functionality. Providing the model name as a string and the keyword arguments for the model parameters will construct the model. Note that this class also supports construction of XGBoost models and Keras neural network models via Keras’ keras.wrappers.scikit_learn.KerasRegressor model.

EnsembleModel:

Class that constructs a model which is an ensemble of many base models (sometimes called weak learners). This class supports construction of ensembles of most scikit-learn regression models as well as ensembles of neural networks that are made via Keras’ keras.wrappers.scikit_learn.KerasRegressor class.

Classes

BaggingRegressor([base_estimator, ...])

A Bagging regressor.

BaseEstimator()

Base class for all estimators in scikit-learn.

EnsembleModel(model, n_estimators, **kwargs)

Class used to construct ensemble models with a particular number and type of weak learner (base model).

GaussianProcessRegressor([kernel, alpha, ...])

Gaussian process regression (GPR).

SklearnModel(model, **kwargs)

Class to wrap any sklearn estimator, and provide some new dataframe functionality

TransformerMixin()

Mixin class for all transformers in scikit-learn.

Class Inheritance Diagram

Inheritance diagram of mastml.models.EnsembleModel, mastml.models.SklearnModel