Commit Graph

53 Commits

Author SHA1 Message Date
Lorenzo
52eb6ce023 Merge potential next release v0.4 (#187) Breaking Changes
* First draft of the new n-dimensional arrays + NB use case
* Improves default implementation of multiple Array methods
* Refactors tree methods
* Adds matrix decomposition routines
* Adds matrix decomposition methods to ndarray and nalgebra bindings
* Refactoring + linear regression now uses array2
* Ridge & Linear regression
* LBFGS optimizer & logistic regression
* LBFGS optimizer & logistic regression
* Changes linear methods, metrics and model selection methods to new n-dimensional arrays
* Switches KNN and clustering algorithms to new n-d array layer
* Refactors distance metrics
* Optimizes knn and clustering methods
* Refactors metrics module
* Switches decomposition methods to n-dimensional arrays
* Linalg refactoring - cleanup rng merge (#172)
* Remove legacy DenseMatrix and BaseMatrix implementation. Port the new Number, FloatNumber and Array implementation into module structure.
* Exclude AUC metrics. Needs reimplementation
* Improve developers walkthrough

New traits system in place at `src/numbers` and `src/linalg`
Co-authored-by: Lorenzo <tunedconsulting@gmail.com>

* Provide SupervisedEstimator with a constructor to avoid explicit dynamical box allocation in 'cross_validate' and 'cross_validate_predict' as required by the use of 'dyn' as per Rust 2021
* Implement getters to use as_ref() in src/neighbors
* Implement getters to use as_ref() in src/naive_bayes
* Implement getters to use as_ref() in src/linear
* Add Clone to src/naive_bayes
* Change signature for cross_validate and other model_selection functions to abide to use of dyn in Rust 2021
* Implement ndarray-bindings. Remove FloatNumber from implementations
* Drop nalgebra-bindings support (as decided in conf-call to go for ndarray)
* Remove benches. Benches will have their own repo at smartcore-benches
* Implement SVC
* Implement SVC serialization. Move search parameters in dedicated module
* Implement SVR. Definitely too slow
* Fix compilation issues for wasm (#202)

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
* Fix tests (#203)

* Port linalg/traits/stats.rs
* Improve methods naming
* Improve Display for DenseMatrix

Co-authored-by: Montana Low <montanalow@users.noreply.github.com>
Co-authored-by: VolodymyrOrlov <volodymyr.orlov@gmail.com>
2022-10-31 10:44:57 +00:00
morenol
c21e75276a feat: allocate first and then proceed to create matrix from Vec of Ro… (#159)
* feat: allocate first and then proceed to create matrix from Vec of RowVectors
2022-09-20 11:29:54 +01:00
Tim Toebrock
b6f585e60f Implement a generic read_csv method (#147)
* feat: Add interface to build `Matrix` from rows.
* feat: Add option to derive `RealNumber` from string.
To construct a `Matrix` from csv, and therefore from string, I need to be able to deserialize a generic `RealNumber` from string.
* feat: Implement `Matrix::read_csv`.
2022-09-19 10:38:01 +01:00
Tim Toebrock
d305406dfd Implementation of Standard scaler (#143)
* docs: Fix typo in doc for categorical transformer.
* feat: Add option to take a column from Matrix.
I created the method `Matrix::take_column` that uses the `Matrix::take`-interface to extract a single column from a matrix. I need that feature in the implementation of  `StandardScaler`.
* feat: Add `StandardScaler`.
Authored-by: titoeb <timtoebrock@googlemail.com>
2022-08-26 15:20:20 +01:00
morenol
820201e920 Solve conflic with num-traits (#130)
* Solve conflic with num-traits

* Fix clippy warnings

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
2022-05-05 10:39:18 -04:00
Luis Moreno
162bed2aa2 feat: added support to wasm (#94)
* test: run tests also in wasm targets

* fix: install rand with wasm-bindgen por wasm targets

* fix: use actual usize size to access buffer.

* fix: do not run functions that create files in wasm.

* test: do not run in wasm test that panics.

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
2021-04-28 15:58:39 -04:00
Luis Moreno
4af69878e0 fix: Fix new clippy warnings (#79)
* Fix new clippy warnings

* Allow clippy::suspicious-operation-groupings
2021-02-16 18:19:14 -04:00
Volodymyr Orlov
9b221979da fix: clippy, documentation and formatting 2020-12-22 16:35:28 -08:00
Volodymyr Orlov
a2be9e117f feat: + cross_validate, trait Predictor, refactoring 2020-12-22 15:41:53 -08:00
Volodymyr Orlov
78673b597f feat: adds elastic net 2020-12-11 18:55:07 -08:00
morenol
f0b348dd6e feat: BernoulliNB (#31)
* feat: BernoulliNB

* Move preprocessing to a trait in linalg/stats.rs
2020-12-04 20:45:40 -04:00
Volodymyr Orlov
583284e66f feat: adds LASSO 2020-11-24 19:12:53 -08:00
Luis Moreno
6587ac032b Rename to from_array 2020-11-11 22:23:56 -04:00
Luis Moreno
900078cb04 Implement abstract method to convert a slice to a BaseVector, Implement RealNumberVector over BaseVector instead of over Vec<T> 2020-11-11 22:10:01 -04:00
VolodymyrOrlov
8f72716fe9 Merge branch 'development' into ridge 2020-11-11 16:12:34 -08:00
Volodymyr Orlov
ca3a3a101c fix: ridge regression, post-review changes 2020-11-11 12:00:58 -08:00
Luis Moreno
c756496b71 Fix clippy::len_without_is_empty 2020-11-09 16:36:43 -04:00
Luis Moreno
54886ebd72 Fix rust-2018-idioms warnings 2020-11-08 20:24:08 -04:00
Luis Moreno
860056c3ba Run: cargo clippy --fix -Z unstable-options and cargo fmt 2020-11-08 19:39:11 -04:00
Volodymyr Orlov
83048dbe94 fix: small doc changes 2020-11-06 11:20:43 -08:00
Volodymyr Orlov
ab7f46603c feat: + ridge regression 2020-11-06 10:48:00 -08:00
Volodymyr Orlov
b8fea67fd2 fix: formatting 2020-11-03 15:49:04 -08:00
Volodymyr Orlov
6473a6c4ae feat: adds Cholesky matrix decomposition 2020-11-03 15:39:43 -08:00
Volodymyr Orlov
cf4f658f01 feat: adds 3 more SVM kernels, linalg refactoring 2020-10-28 17:10:17 -07:00
Volodymyr Orlov
20e58a8817 feat: adds e-SVR 2020-10-15 16:23:26 -07:00
Volodymyr Orlov
750015b861 feat: + cluster metrics 2020-09-22 20:23:51 -07:00
Volodymyr Orlov
a9db970195 feat: refactoring, adds Result to most public API 2020-09-18 15:20:32 -07:00
Volodymyr Orlov
d28f13d849 feat: adds train/test split function; fixes bug in random forest 2020-09-13 16:23:30 -07:00
Volodymyr Orlov
bbe810d164 feat: documents matrix methods 2020-09-06 18:27:11 -07:00
Volodymyr Orlov
fa0918cee3 fix: renames FloatExt to RealNumber 2020-08-29 20:17:01 -07:00
Volodymyr Orlov
68dca25f91 feat: puts ndarray and nalgebra bindings behind feature flags 2020-08-28 16:55:41 -07:00
Volodymyr Orlov
14113b4152 feat: adds F1 and roc_auc_score 2020-06-08 14:47:59 -07:00
Volodymyr Orlov
a2784d6345 fix: cargo fmt 2020-06-05 17:52:03 -07:00
Volodymyr Orlov
c0c2029f2c feat: adds accuracy, recall and precision metrics 2020-06-05 17:39:29 -07:00
Volodymyr Orlov
e20e9ca6e0 feat: adds new distance measures + LU decomposition 2020-06-05 10:40:17 -07:00
Volodymyr Orlov
b068295dac feat: integrates with nalgebra 2020-04-06 19:16:37 -07:00
Volodymyr Orlov
8bb6013430 feat: serialization/deserialization with Serde 2020-03-31 18:19:20 -07:00
Volodymyr Orlov
02b85415d9 feat: extends interface of Matrix to support for broad range of types 2020-03-26 15:28:26 -07:00
Volodymyr Orlov
4f8318e933 fix: more refactoring 2020-03-13 11:24:53 -07:00
Volodymyr Orlov
cb4323f26e feat: refactors matrix decomposition routines 2020-03-12 17:32:27 -07:00
Volodymyr Orlov
7b3fa982be feat: adds PCA 2020-03-06 09:13:54 -08:00
Volodymyr Orlov
619560a1cd feat: adds SVD 2020-02-28 09:21:00 -08:00
Volodymyr Orlov
fe50509d3b fix: refactors knn and distance functions 2020-02-21 18:54:50 -08:00
Volodymyr Orlov
0e89113297 feat: adds KMeans clustering algorithm 2020-02-20 18:43:24 -08:00
Volodymyr Orlov
a54f7be867 Adds DecisionTree algorithm 2020-01-10 09:07:04 -08:00
Volodymyr Orlov
a4ff1cbe5f feat: simplifies LR API 2019-12-23 11:18:22 -08:00
Volodymyr Orlov
c1d7c038a6 feat: add basic Matrix implementation for ndarray 2019-12-23 10:33:19 -08:00
Volodymyr Orlov
2425419d10 Removes DenseVector 2019-12-18 10:28:15 -08:00
Volodymyr Orlov
4411b57219 Adds draft implementation of LR 2019-12-10 18:02:02 -08:00
Volodymyr Orlov
b5e677e615 Adds LBFGS optimization method 2019-11-15 08:56:09 -08:00