# Mars Learn¶

## Clustering¶

### Classes¶

 `cluster.KMeans`([n_clusters, init, n_init, …]) K-Means clustering.

### Functions¶

 `cluster.k_means`(X, n_clusters[, …]) K-means clustering algorithm.

## 数据集¶

### 样本生成器¶

 `datasets.make_blobs`([n_samples, n_features, …]) Generate isotropic Gaussian blobs for clustering. `datasets.make_classification`([n_samples, …]) Generate a random n-class classification problem. `datasets.make_low_rank_matrix`([n_samples, …]) Generate a mostly low rank matrix with bell-shaped singular values

## 矩阵分解¶

 `decomposition.PCA`([n_components, copy, …]) Principal component analysis (PCA) `decomposition.TruncatedSVD`([n_components, …]) Dimensionality reduction using truncated SVD (aka LSA).

## 评估¶

### 分类评估¶

 `metrics.accuracy_score`(y_true, y_pred[, …]) Accuracy classification score. `metrics.auc`(x, y[, session, run_kwargs]) Compute Area Under the Curve (AUC) using the trapezoidal rule `metrics.roc_curve`(y_true, y_score[, …]) Compute Receiver operating characteristic (ROC)

### Pairwise 评估¶

 `metrics.pairwise.cosine_similarity`(X[, Y, …]) 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. `metrics.pairwise.rbf_kernel`(X[, Y, gamma]) Compute the rbf (gaussian) kernel between X and Y. `metrics.pairwise_distances`(X[, Y, metric])

### Splitter Functions¶

 `model_selection.train_test_split`(*arrays, …) Split arrays or matrices into random train and test subsets

## 最邻近¶

 `neighbors.NearestNeighbors`([n_neighbors, …])

## 预处理和标准化¶

 `preprocessing.MinMaxScaler`([feature_range, …]) Transform features by scaling each feature to a given range. Transform features by scaling each feature to a given range. `preprocessing.normalize`(X[, norm, axis, …]) Scale input vectors individually to unit norm (vector length).

## 半监督学习¶

 `semi_supervised.LabelPropagation`([kernel, …]) Label Propagation classifier

## 工具¶

 `utils.assert_all_finite`(X[, allow_nan, …]) `utils.check_X_y`(X, y[, accept_sparse, …]) Input validation for standard estimators. `utils.check_array`(array[, accept_sparse, …]) Input validation on a tensor, list, sparse matrix or similar. `utils.check_consistent_length`(*arrays[, …]) Check that all arrays have consistent first dimensions. Determine the type of data indicated by the target. Check if `y` is in a multilabel format. `utils.shuffle`(*arrays, **options) `utils.validation.check_is_fitted`(estimator) Perform is_fitted validation for estimator. `utils.validation.column_or_1d`(y[, warn]) Ravel column or 1d numpy array, else raises an error

## LightGBM 集成¶

 `contrib.lightgbm.LGBMRegressor`(*_, **__) `contrib.lightgbm.LGBMRanker`(*_, **__)

## PyTorch 集成¶

 `contrib.pytorch.run_pytorch_script`(script, …) Run PyTorch script in Mars cluster. `contrib.pytorch.MarsDataset` `contrib.pytorch.MarsDistributedSampler` `contrib.pytorch.MarsRandomSampler`(data_source)

## TensorFlow 集成¶

 Run TensorFlow script in Mars cluster.

## XGBoost 集成¶

 `contrib.xgboost.MarsDMatrix`(data[, label, …]) `contrib.xgboost.train`(params, dtrain[, evals]) Train XGBoost model in Mars manner. `contrib.xgboost.predict`(model, data[, …]) `contrib.xgboost.XGBClassifier`(*_, **__) `contrib.xgboost.XGBRegressor`(*_, **__)