Mars Learn¶
This is the class and function reference of Mars learn.
Clustering¶
Classes¶
|
K-Means clustering. |
Functions¶
|
K-means clustering algorithm. |
Datasets¶
Samples generator¶
|
Generate isotropic Gaussian blobs for clustering. |
|
Generate a random n-class classification problem. |
|
Generate a mostly low rank matrix with bell-shaped singular values |
|
Generate a random regression problem. |
Matrix Decomposition¶
|
Principal component analysis (PCA) |
|
Dimensionality reduction using truncated SVD (aka LSA). |
Ensemble Methods¶
|
A Bagging classifier. |
|
A Bagging regressor. |
|
Blockwise training and ensemble voting classifier. |
|
Blockwise training and ensemble voting regressor. |
|
Isolation Forest Algorithm. |
Linear Models¶
Classical linear regressors¶
|
Ordinary least squares Linear Regression. |
Metrics¶
Classification metrics¶
|
Accuracy classification score. |
|
Compute Area Under the Curve (AUC) using the trapezoidal rule |
|
Compute the F1 score, also known as balanced F-score or F-measure |
|
Compute the F-beta score |
|
Log loss, aka logistic loss or cross-entropy loss. |
|
Compute a confusion matrix for each class or sample. |
|
Compute the precision |
Compute precision, recall, F-measure and support for each class |
|
|
Compute the recall |
|
Compute Receiver operating characteristic (ROC) |
Regression metrics¶
|
\(R^2\) (coefficient of determination) regression score function. |
Pairwise metrics¶
|
Compute cosine similarity between samples in X and Y. |
Compute cosine distance between samples in X and Y. |
|
|
Considering the rows of X (and Y=X) as vectors, compute the distance matrix between each pair of vectors. |
Compute the Haversine distance between samples in X and Y |
|
|
Compute the L1 distances between the vectors in X and Y. |
|
Compute the rbf (gaussian) kernel between X and Y. |
|
Model Selection¶
Splitter Classes¶
|
K-Folds cross-validator |
Splitter Functions¶
|
Split arrays or matrices into random train and test subsets |
Nearest Neighbors¶
|
Preprocessing and Normalization¶
|
Binarize labels in a one-vs-all fashion. |
Encode target labels with value between 0 and n_classes-1. |
|
|
Transform features by scaling each feature to a given range. |
|
Transform features by scaling each feature to a given range. |
|
Binarize labels in a one-vs-all fashion. |
|
Scale input vectors individually to unit norm (vector length). |
Semi-Supervised Learning¶
|
Label Propagation classifier |
Utilities¶
|
|
|
Input validation for standard estimators. |
|
Input validation on a tensor, list, sparse matrix or similar. |
|
Check that all arrays have consistent first dimensions. |
Determine the type of data indicated by the target. |
|
Check if |
|
|
|
|
Perform is_fitted validation for estimator. |
|
Ravel column or 1d numpy array, else raises an error |
Misc¶
|
Meta-estimator for parallel predict and transform. |
LightGBM Integration¶
|
|
|
|
|
PyTorch Integration¶
|
Run PyTorch script in Mars cluster. |
StatsModels Integration¶
TensorFlow Integration¶
Run TensorFlow script in Mars cluster. |
|
convert mars data type to tf.data.Dataset. |
XGBoost Integration¶
|
|
|
Train XGBoost model in Mars manner. |
|
|
|
Implementation of the scikit-learn API for XGBoost classification. |
|
Implementation of the scikit-learn API for XGBoost regressor. |