schrodinger.application.matsci.mlearn.base module¶
Classes and functions to deal with ML features.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.matsci.mlearn.base.
BaseFeaturizer
¶ Bases:
sklearn.base.BaseEstimator
,sklearn.base.TransformerMixin
Class that MUST be inherited to create sklearn Model.
-
fit
(data, data_y=None)¶ Fit and return self. Anything that evaluates properties related to the passed data should go here. For example, compute physical properties of a stucture and save them as class property, to be used in the transform method.
Parameters: - data (numpy array of shape [n_samples, n_features]) – Training set
- data_y (numpy array of shape [n_samples]) – Target values
Return type: Returns: self object with fitted data
-
transform
(data)¶ Get numerical features. Must be implemented by a child class.
Parameters: data (numpy array of shape [n_samples, n_features]) – Training set Return type: numpy array of shape [n_samples, n_features_new] Returns: Transformed array
-