atm.classifier module¶
Classes
|
This class contains everything needed to run an end-to-end ATM classifier pipeline. |
-
class
atm.classifier.
Model
(method, params, judgment_metric, class_column, testing_ratio=0.3, verbose_metrics=False)[source]¶ Bases:
object
This class contains everything needed to run an end-to-end ATM classifier pipeline. It is initialized with a set of parameters and trained like a normal sklearn model. This class can be pickled and saved to disk, then unpickled outside of ATM and used to classify new datasets.
Attributes
list() -> new empty list
str(object=’‘) -> str
int(x=0) -> integer
str(object=’‘) -> str
str(object=’‘) -> str
str(object=’‘) -> str
str(object=’‘) -> str
Methods
load
(path)Loads a saved Model instance from a path.
predict
(data)Generate predictions from new data.
save
(path[, force])Save this Model using pickle.
train_test
(dataset)Train and test this model using Cross Validation and Holdout.
-
ATM_KEYS
= ['_scale', '_whiten', '_scale_minmax', '_pca', '_pca_dimensions']¶
-
MINMAX
= '_scale_minmax'¶
-
N_FOLDS
= 5¶
-
PCA
= '_pca'¶
-
PCA_DIMS
= '_pca_dimensions'¶
-
SCALE
= '_scale'¶
-
WHITEN
= '_whiten'¶
-
classmethod
load
(path)[source]¶ Loads a saved Model instance from a path.
- Parameters
path (str) – path where the model is saved.
- Returns
New model instance.
- Return type
-
predict
(data)[source]¶ Generate predictions from new data.
- Parameters
data (pandas.DataFrame) – Data for which to predict classes
- Returns
Vector of predictions
- Return type
pandas.Series
-