feat: documents matrix methods

This commit is contained in:
Volodymyr Orlov
2020-09-06 18:27:11 -07:00
parent 1e3ed4c924
commit bbe810d164
25 changed files with 587 additions and 245 deletions
+3 -3
View File
@@ -20,7 +20,7 @@
//! use smartcore::cluster::kmeans::*;
//!
//! // Iris data
//! let x = DenseMatrix::from_array(&[
//! let x = DenseMatrix::from_2d_array(&[
//! &[5.1, 3.5, 1.4, 0.2],
//! &[4.9, 3.0, 1.4, 0.2],
//! &[4.7, 3.2, 1.3, 0.2],
@@ -264,7 +264,7 @@ mod tests {
#[test]
fn fit_predict_iris() {
let x = DenseMatrix::from_array(&[
let x = DenseMatrix::from_2d_array(&[
&[5.1, 3.5, 1.4, 0.2],
&[4.9, 3.0, 1.4, 0.2],
&[4.7, 3.2, 1.3, 0.2],
@@ -298,7 +298,7 @@ mod tests {
#[test]
fn serde() {
let x = DenseMatrix::from_array(&[
let x = DenseMatrix::from_2d_array(&[
&[5.1, 3.5, 1.4, 0.2],
&[4.9, 3.0, 1.4, 0.2],
&[4.7, 3.2, 1.3, 0.2],