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.
- CrabNetModel:
Class that provides an implementation of PyTorch-based CrabNet regressor model based on the following work: Wang, A., Kauwe, S., Murdock, R., Sparks, T. “Compositionally restricted attention-based network for “ materials property predictions”, npj Computational Materials (2021) (https://www.nature.com/articles/s41524-021-00545-1)
Classes
|
A Bagging regressor. |
|
Base class for all estimators in scikit-learn. |
|
Implementation of PyTorch-based CrabNet regressor model based on the following work: |
|
Class used to construct ensemble models with a particular number and type of weak learner (base model). |
|
Gaussian process regression (GPR). |
|
|
|
KAN class |
|
KANLayer class |
|
Implementation of Kolmogorov-Arnold Networks (KANs) from the following work: |
|
Implements L-BFGS algorithm. |
|
Ordinary least squares Linear Regression. |
|
Class to wrap any sklearn estimator, and provide some new dataframe functionality |
|
|
|
KANLayer class |
|
|
|
Mixin class for all transformers in scikit-learn. |
|
Wrapper for pytorch model to include predict method |
|
Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested. |