Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
fa802d2
build(deps): update nalgebra requirement from 0.23.0 to 0.26.2 (#98)
dependabot-preview[bot] May 11, 2022
4e94feb
Update nalgebra requirement from 0.23.0 to 0.31.0 (#128)
dependabot[bot] May 11, 2022
ea39024
Add SVC::decision_function (#135)
ferrouille Jun 21, 2022
98e3465
Fix clippy warnings (#139)
morenol Jul 14, 2022
eb4b49d
Added additional doctest and fixed indices (#141)
cmccomb Aug 12, 2022
dc7f01d
Implement fastpair (#142)
Mec-iS Aug 23, 2022
09d9205
Add example for FastPair (#144)
Mec-iS Aug 24, 2022
df766ea
Implementation of Standard scaler (#143)
titoeb Aug 26, 2022
01f753f
Add serde for StandardScaler (#148)
ckatsak Sep 6, 2022
44e4be2
Update criterion requirement from 0.3 to 0.4 (#150)
dependabot[bot] Sep 12, 2022
0f442e9
Handle multiclass precision/recall (#152)
montanalow Sep 13, 2022
1f2597b
grid search (#154)
montanalow Sep 19, 2022
2d75c2c
Implement a generic read_csv method (#147)
titoeb Sep 19, 2022
f291b71
fix: fix compilation warnings when running only with default features…
morenol Sep 19, 2022
0d996ed
Update LICENSE
Mec-iS Sep 19, 2022
851533d
Make rand_distr optional (#161)
morenol Sep 20, 2022
bb5b437
feat: allocate first and then proceed to create matrix from Vec of Ro…
morenol Sep 20, 2022
cfa824d
Provide better output in flaky tests (#163)
morenol Sep 20, 2022
55e1158
Complete grid search params (#166)
montanalow Sep 21, 2022
a37b552
Lmm/add seeds in more algorithms (#164)
morenol Sep 21, 2022
05dfffa
add seed param to search params (#168)
montanalow Sep 21, 2022
f4fd4d2
make default params available to serde (#167)
montanalow Sep 22, 2022
e4c47c7
Add contribution guidelines (#178)
Mec-iS Sep 27, 2022
9ea3133
Update CONTRIBUTING.md
Mec-iS Sep 27, 2022
ad2e6c2
feat: expose hyper tuning module in model_selection (#179)
morenol Oct 1, 2022
473cdfc
refactor: Try to follow similar pattern to other APIs (#180)
morenol Oct 1, 2022
d520007
fix: fix issue with iterator for svc search (#182)
morenol Oct 2, 2022
d015b12
Update CONTRIBUTING.md
Mec-iS Oct 12, 2022
3b1aaaa
Update README.md
Mec-iS Oct 13, 2022
f605f6e
Update README.md
Mec-iS Oct 18, 2022
a32eb66
Dataset doc cleanup (#205)
rnowling Oct 30, 2022
a7fa058
Merge potential next release v0.4 (#187) Breaking Changes
Mec-iS Oct 31, 2022
d91f4f7
Update README.md
Mec-iS Oct 31, 2022
a16927a
Port ensemble. Add Display to naive_bayes (#208)
Mec-iS Oct 31, 2022
4d36b7f
Fix metrics::auc (#212)
Mec-iS Nov 1, 2022
712c478
Improve features (#215)
Mec-iS Nov 1, 2022
8f1a7df
build: fix compilation without default features (#218)
morenol Nov 2, 2022
7f35dc5
Disambiguate distances. Implement Fastpair. (#220)
Mec-iS Nov 2, 2022
c45bab4
Support Wasi as target (#216)
Mec-iS Nov 2, 2022
551a6e3
clean up svm
Mec-iS Nov 2, 2022
1cbde3b
Refactor modules structure in src/svm
Mec-iS Nov 2, 2022
6624732
Fix svr tests (#222)
Mec-iS Nov 3, 2022
e09c4ba
Add kernels' parameters to public interface
Mec-iS Nov 3, 2022
19f3a2f
Fix signature of metrics tests
Mec-iS Nov 3, 2022
ee6b6a5
cargo clippy
Mec-iS Nov 3, 2022
fabe362
Implement Display for NaiveBayes
Mec-iS Nov 3, 2022
b427e5d
Improve options conditionals
Mec-iS Nov 3, 2022
ed9769f
Implement CSV reader with new traits (#209)
Mec-iS Nov 3, 2022
ba27dd2
Fix CI (#227)
morenol Nov 3, 2022
8d07efd
Use Box in SVM and remove lifetimes (#228)
morenol Nov 4, 2022
d8d0fb6
Update README.md
Mec-iS Nov 4, 2022
6c0fd37
Update README.md
Mec-iS Nov 4, 2022
0dc97a4
Create DEVELOPERS.md
Mec-iS Nov 4, 2022
2df0795
Release 0.3
Mec-iS Nov 7, 2022
5b517c5
minor fix
Mec-iS Nov 7, 2022
527477d
minor fixes
Mec-iS Nov 7, 2022
3ec9e4f
Exclude datasets test for wasm/wasi
Mec-iS Nov 7, 2022
6d529b3
Add static analyzer to doc
Mec-iS Nov 7, 2022
669f87f
Use getrandom as default (for no-std feature)
Mec-iS Nov 8, 2022
a449fdd
fmt
Mec-iS Nov 8, 2022
616e38c
cleanup
Mec-iS Nov 8, 2022
af0a740
Fix std_rand feature
Mec-iS Nov 8, 2022
890e9d6
minor fix
Mec-iS Nov 8, 2022
63ed89a
minor fix
Mec-iS Nov 8, 2022
cf751f0
minor fix
Mec-iS Nov 8, 2022
c1bd1df
minor fix
Mec-iS Nov 8, 2022
1b7dda3
minor fix
Mec-iS Nov 8, 2022
459d558
minor fixes to doc
Mec-iS Nov 8, 2022
fa54d5e
Remove unused tests flags
Mec-iS Nov 8, 2022
c507d97
Update CHANGELOG
Mec-iS Nov 8, 2022
b0dece9
use getrandom/js
Mec-iS Nov 8, 2022
2f6dd13
update comment
Mec-iS Nov 8, 2022
e25e2ae
update CHANGELOG
Mec-iS Nov 8, 2022
265fd55
make work cargo build --target wasm32-unknown-unknown
Mec-iS Nov 8, 2022
7d87451
Fixes for release (#237)
morenol Nov 8, 2022
62de25b
Handle kernel serialization (#232)
morenol Nov 8, 2022
0c9c70f
Merge
Mec-iS Nov 9, 2022
dbd2fcb
ensemble: pre-allocate tree vector capacities in forest classifiers a…
Aditya-9-6 Jul 24, 2026
3c818f1
Merge branch 'main' into feature/ensemble-capacity-alloc
Aditya-9-6 Jul 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ensemble/base_forest_regressor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ impl<TX: Number + FloatNumber + PartialOrd, TY: Number, X: Array2<TX>, Y: Array1
.unwrap_or((num_attributes as f64).sqrt().floor() as usize);

let mut rng = get_rng_impl(Some(parameters.seed));
let mut trees: Vec<BaseTreeRegressor<TX, TY, X, Y>> = Vec::new();
let n_trees = parameters.n_trees as usize;
let mut trees: Vec<BaseTreeRegressor<TX, TY, X, Y>> = Vec::with_capacity(n_trees);

let mut maybe_all_samples: Option<Vec<Vec<bool>>> = Option::None;
if parameters.keep_samples {
// TODO: use with_capacity here
maybe_all_samples = Some(Vec::new());
maybe_all_samples = Some(Vec::with_capacity(n_trees));
}

let mut samples: Vec<usize> = (0..n_rows).map(|_| 1).collect();
Expand Down
7 changes: 3 additions & 4 deletions src/ensemble/random_forest_classifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,12 @@ impl<TX: FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY
let mut rng = get_rng_impl(Some(parameters.seed));
let classes = y.unique();
let k = classes.len();
// TODO: use with_capacity here
let mut trees: Vec<DecisionTreeClassifier<TX, TY, X, Y>> = Vec::new();
let n_trees = parameters.n_trees as usize;
let mut trees: Vec<DecisionTreeClassifier<TX, TY, X, Y>> = Vec::with_capacity(n_trees);

let mut maybe_all_samples: Option<Vec<Vec<bool>>> = Option::None;
if parameters.keep_samples {
// TODO: use with_capacity here
maybe_all_samples = Some(Vec::new());
maybe_all_samples = Some(Vec::with_capacity(n_trees));
}

for _ in 0..parameters.n_trees {
Expand Down