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 |
Matrix Decomposition¶
|
Principal component analysis (PCA) |
|
Dimensionality reduction using truncated SVD (aka LSA). |
Metrics¶
Classification metrics¶
|
Accuracy classification score. |
|
Compute Area Under the Curve (AUC) using the trapezoidal rule |
|
Compute Receiver operating characteristic (ROC) |
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. |
|
Splitter Functions¶
|
Split arrays or matrices into random train and test subsets |
Nearest Neighbors¶
|
Preprocessing and Normalization¶
|
Transform features by scaling each feature to a given range. |
|
Transform features by scaling each feature to a given range. |
|
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 |
LightGBM Integration¶
|
|
|
|
|
PyTorch Integration¶
|
Run PyTorch script in Mars cluster. |
StatsModels Integration¶
TensorFlow Integration¶
Run TensorFlow script in Mars cluster. |
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. |