Commit Graph

52 Commits

Author SHA1 Message Date
Lorenzo
c3093f11f1 Fix metrics::auc (#212)
* Fix metrics::auc
2022-11-01 12:50:46 +00:00
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
Montana Low
764309e313 make default params available to serde (#167)
* add seed param to search params

* make default params available to serde

* lints

* create defaults for enums

* lint
2022-09-21 22:48:31 -04:00
morenol
2510ca4e9d fix: fix compilation warnings when running only with default features (#160)
* fix: fix compilation warnings when running only with default features
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
2022-09-19 10:44:01 -04:00
Lorenzo
3d2f4f71fa Add example for FastPair (#144)
* Add example

* Move to top

* Add imports to example

* Fix imports
2022-08-24 13:40:22 +01:00
Lorenzo
a1c56a859e Implement fastpair (#142)
* initial fastpair implementation
* FastPair initial implementation
* implement fastpair
* Add random test
* Add bench for fastpair
* Refactor with constructor for FastPair
* Add serialization for PairwiseDistance
* Add fp_bench feature for fastpair bench
2022-08-23 16:56:21 +01:00
Chris McComb
d905ebea15 Added additional doctest and fixed indices (#141) 2022-08-12 17:38:13 -04:00
morenol
b482acdc8d Fix clippy warnings (#139)
Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
2022-07-13 21:06:05 -04:00
Volodymyr Orlov
8297cbe67e Fixes broken build 2022-05-09 15:50:25 -07:00
VolodymyrOrlov
38c9b5ad2f Merge pull request #126 from ericschief/cover-tree-fix
Fix issue with cover tree k-nearest neighbors
2022-05-09 15:34:10 -07: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
Kiran Eiden
389b0e8e67 Only sort in CoverTree::find function if there are more than k points
Sorting only needs to be done if the list of KNN candidates is greater
than length k.
2022-01-04 14:50:47 -08:00
Kiran Eiden
f93286ffbd Fix bug in cover tree KNN algorithm
Prior to this change, the find function implementation for the
CoverTree class could have potentially returned the wrong result
in cases where there were multiple points in the dataset
equidistant from p. For example, the current test passed for k=3
but failed to produce the correct result for k=4 (it claimed that
3, 4, 5, and 7 were the 4 closest points to 5 in the dataset
rather than 3, 4, 5, and 6). Sorting the neighbors vector before
collecting the first k values from it resolved this issue.
2022-01-02 20:05:39 -08:00
Luis Moreno
4397c91570 Fix clippy warnings 2021-10-20 14:15:41 -05: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
d9814c0918 style(lint): fix clippy warnings 2021-04-27 09:32:01 -04:00
Ben Cross
f1cf8a6f08 Added serde feature flags to tests 2021-01-18 10:32:35 +00:00
Ben Cross
762986b271 Cargo format 2021-01-17 21:37:30 +00:00
Ben Cross
e0d46f430b feat: Make SerDe optional 2021-01-17 21:35:03 +00:00
Volodymyr Orlov
a2be9e117f feat: + cross_validate, trait Predictor, refactoring 2020-12-22 15:41:53 -08:00
morenol
53351b2ece fix needless-range and clippy::ptr_arg warnings. (#36)
* Fix needless for loop range

* Do not ignore clippy::ptr_arg
2020-12-11 16:52:39 -04:00
Luis Moreno
b780e0c289 Fix clippy::unnecessary_mut_passed 2020-11-08 23:22:18 -04:00
Luis Moreno
860056c3ba Run: cargo clippy --fix -Z unstable-options and cargo fmt 2020-11-08 19:39:11 -04:00
Luis Moreno
8281a1620e Fix clippy errors 2020-11-06 23:17:33 -04:00
Luis Moreno
92dad01810 Allow KNN with k=1 2020-10-16 12:28:30 -04:00
Vadim Zaliva
c43990e932 + DBSCAN and data generator. Improves KNN API 2020-10-02 14:04:01 -07:00
Volodymyr Orlov
2aca488553 feat: pre-release 2020-09-25 17:52:21 -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
b95e11cc98 feat: adds dataset module, fixs problem in CoverTree implementation 2020-09-10 12:21:59 -07:00
Volodymyr Orlov
bbe810d164 feat: documents matrix methods 2020-09-06 18:27:11 -07:00
Volodymyr Orlov
ecfbaac167 feat: documents ensemble models 2020-09-04 10:04:22 -07:00
Volodymyr Orlov
53ed216c4c fix: broken links 2020-08-30 16:47:19 -07:00
Volodymyr Orlov
fa0918cee3 fix: renames FloatExt to RealNumber 2020-08-29 20:17:01 -07:00
Volodymyr Orlov
8705867386 fix: turns off dead code warning in heap_select 2020-08-29 16:58:04 -07:00
Volodymyr Orlov
c34eae6a9b feat: documents KNN algorithms section 2020-08-29 16:54:58 -07:00
Volodymyr Orlov
367ea62608 feat: new distance function parameter in KNN, extends KNN documentation 2020-08-28 15:30:52 -07:00
Volodymyr Orlov
aa458d22fa fix: code cleanup, documentation 2020-08-27 11:37:14 -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
e20e9ca6e0 feat: adds new distance measures + LU decomposition 2020-06-05 10:40:17 -07:00
Volodymyr Orlov
eb0c36223f feat: adds serialization/deserialization methods 2020-04-03 11:12:15 -07:00
Volodymyr Orlov
5766364311 fix: minor refactoring 2020-03-31 18:24:01 -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
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
f4aec2b35e Adds SVD solver, code refactoring 2019-10-16 08:28:36 -07:00
Volodymyr Orlov
b8e1bf9a80 Improves Cover Tree implementation 2019-09-30 08:55:41 -07:00
Volodymyr Orlov
874d528f58 Adds CoverTree implementation 2019-09-23 20:54:21 -07:00