fix: formatting
This commit is contained in:
+20
-20
@@ -2,9 +2,9 @@
|
||||
#![warn(missing_doc_code_examples)]
|
||||
|
||||
//! # SmartCore
|
||||
//!
|
||||
//! Welcome to SmartCore library, the most complete machine learning library for Rust!
|
||||
//!
|
||||
//!
|
||||
//! Welcome to SmartCore library, the most complete machine learning library for Rust!
|
||||
//!
|
||||
//! In SmartCore you will find implementation of these ML algorithms:
|
||||
//! * Regression: Linear Regression (OLS), Decision Tree Regressor, Random Forest Regressor
|
||||
//! * Classification: Logistic Regressor, Decision Tree Classifier, Random Forest Classifier, Unsupervised Nearest Neighbors (KNN)
|
||||
@@ -12,33 +12,33 @@
|
||||
//! * Matrix decomposition: PCA, LU, QR, SVD, EVD
|
||||
//! * Distance Metrics: Euclidian, Minkowski, Manhattan, Hamming, Mahalanobis
|
||||
//! * Evaluation Metrics: Accuracy, AUC, Recall, Precision, F1, Mean Absolute Error, Mean Squared Error, R2
|
||||
//!
|
||||
//!
|
||||
//! Most of algorithms implemented in SmartCore operate on n-dimentional arrays. While you can use Rust vectors with all functions defined in this library
|
||||
//! we do recommend to go with one of the popular linear algebra libraries available in Rust. At this moment we support these packages:
|
||||
//! * [ndarray](https://docs.rs/ndarray)
|
||||
//! * [nalgebra](https://docs.rs/nalgebra/)
|
||||
//!
|
||||
//!
|
||||
//! ## Getting Started
|
||||
//!
|
||||
//!
|
||||
//! To start using SmartCore simply add the following to your Cargo.toml file:
|
||||
//! ```ignore
|
||||
//! [dependencies]
|
||||
//! smartcore = "0.1.0"
|
||||
//! ```
|
||||
//!
|
||||
//!
|
||||
//! All ML algorithms in SmartCore are grouped into these generic categories:
|
||||
//! * [Clustering](cluster/index.html), unsupervised clustering of unlabeled data.
|
||||
//! * [Martix Decomposition](decomposition/index.html), various methods for matrix decomposition.
|
||||
//! * [Clustering](cluster/index.html), unsupervised clustering of unlabeled data.
|
||||
//! * [Martix Decomposition](decomposition/index.html), various methods for matrix decomposition.
|
||||
//! * [Linear Models](linear/index.html), regression and classification methods where output is assumed to have linear relation to explanatory variables
|
||||
//! * [Ensemble Models](ensemble/index.html), variety of regression and classification ensemble models
|
||||
//! * [Tree-based Models](tree/index.html), classification and regression trees
|
||||
//! * [Nearest Neighbors](neighbors/index.html), K Nearest Neighbors for classification and regression
|
||||
//!
|
||||
//! Each category is assigned to a separate module.
|
||||
//!
|
||||
//!
|
||||
//! Each category is assigned to a separate module.
|
||||
//!
|
||||
//! For example, KNN classifier is defined in [smartcore::neighbors::knn](neighbors/knn/index.html). To train and run it using standard Rust vectors you will
|
||||
//! run this code:
|
||||
//!
|
||||
//!
|
||||
//! ```
|
||||
//! // DenseMatrix defenition
|
||||
//! use smartcore::linalg::naive::dense_matrix::*;
|
||||
@@ -46,20 +46,20 @@
|
||||
//! use smartcore::neighbors::knn::*;
|
||||
//! // Various distance metrics
|
||||
//! use smartcore::math::distance::*;
|
||||
//!
|
||||
//!
|
||||
//! // Turn Rust vectors with samples into a matrix
|
||||
//! let x = DenseMatrix::from_array(&[
|
||||
//! &[1., 2.],
|
||||
//! &[3., 4.],
|
||||
//! &[5., 6.],
|
||||
//! &[7., 8.],
|
||||
//! &[1., 2.],
|
||||
//! &[3., 4.],
|
||||
//! &[5., 6.],
|
||||
//! &[7., 8.],
|
||||
//! &[9., 10.]]);
|
||||
//! // Our classes are defined as a Vector
|
||||
//! let y = vec![2., 2., 2., 3., 3.];
|
||||
//!
|
||||
//!
|
||||
//! // Train classifier
|
||||
//! let knn = KNNClassifier::fit(&x, &y, Distances::euclidian(), Default::default());
|
||||
//!
|
||||
//!
|
||||
//! // Predict classes
|
||||
//! let y_hat = knn.predict(&x);
|
||||
//! ```
|
||||
|
||||
Reference in New Issue
Block a user