[INFO] cloning repository https://github.com/ulloacastillo/random-forest [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ulloacastillo/random-forest" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Frandom-forest", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Frandom-forest'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 20434c173bab956fec5286530b964f3a0ff0c584 [INFO] testing ulloacastillo/random-forest against 1.85.0 for beta-1.86-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Frandom-forest" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] [stderr] Updating files: 53% (422/795) Updating files: 54% (430/795) Updating files: 55% (438/795) Updating files: 56% (446/795) Updating files: 57% (454/795) Updating files: 58% (462/795) Updating files: 59% (470/795) Updating files: 60% (477/795) Updating files: 61% (485/795) Updating files: 62% (493/795) Updating files: 63% (501/795) Updating files: 64% (509/795) Updating files: 65% (517/795) Updating files: 66% (525/795) Updating files: 67% (533/795) Updating files: 68% (541/795) Updating files: 69% (549/795) Updating files: 70% (557/795) Updating files: 71% (565/795) Updating files: 72% (573/795) Updating files: 73% (581/795) Updating files: 74% (589/795) Updating files: 75% (597/795) Updating files: 76% (605/795) Updating files: 77% (613/795) Updating files: 78% (621/795) Updating files: 79% (629/795) Updating files: 80% (636/795) Updating files: 81% (644/795) Updating files: 82% (652/795) Updating files: 83% (660/795) Updating files: 84% (668/795) Updating files: 85% (676/795) Updating files: 86% (684/795) Updating files: 87% (692/795) Updating files: 88% (700/795) Updating files: 89% (708/795) Updating files: 90% (716/795) Updating files: 91% (724/795) Updating files: 92% (732/795) Updating files: 93% (740/795) Updating files: 94% (748/795) Updating files: 95% (756/795) Updating files: 96% (764/795) Updating files: 97% (772/795) Updating files: 98% (780/795) Updating files: 99% (788/795) Updating files: 100% (795/795) Updating files: 100% (795/795), done. [INFO] validating manifest of git repo https://github.com/ulloacastillo/random-forest on toolchain 1.85.0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.85.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/ulloacastillo/random-forest [INFO] finished tweaking git repo https://github.com/ulloacastillo/random-forest [INFO] tweaked toml for git repo https://github.com/ulloacastillo/random-forest written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/ulloacastillo/random-forest already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.85.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 58b774f536e5c48531eb7400dca3809aa7abd72c660ef35247fb55f24cae3481 [INFO] running `Command { std: "docker" "start" "-a" "58b774f536e5c48531eb7400dca3809aa7abd72c660ef35247fb55f24cae3481", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "58b774f536e5c48531eb7400dca3809aa7abd72c660ef35247fb55f24cae3481", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "58b774f536e5c48531eb7400dca3809aa7abd72c660ef35247fb55f24cae3481", kill_on_drop: false }` [INFO] [stdout] 58b774f536e5c48531eb7400dca3809aa7abd72c660ef35247fb55f24cae3481 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b02cd90f3ad6cf50fda7f94510c66ab2a5122830405a02d8feebf5af0e6e3cf4 [INFO] running `Command { std: "docker" "start" "-a" "b02cd90f3ad6cf50fda7f94510c66ab2a5122830405a02d8feebf5af0e6e3cf4", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.44 [INFO] [stderr] Compiling quote v1.0.21 [INFO] [stderr] Compiling unicode-ident v1.0.4 [INFO] [stderr] Compiling syn v1.0.101 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling serde_derive v1.0.145 [INFO] [stderr] Compiling serde v1.0.145 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.83 [INFO] [stderr] Compiling libc v0.2.133 [INFO] [stderr] Compiling once_cell v1.15.0 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Compiling bumpalo v3.11.0 [INFO] [stderr] Compiling serde_json v1.0.85 [INFO] [stderr] Compiling ryu v1.0.11 [INFO] [stderr] Compiling itoa v1.0.3 [INFO] [stderr] Compiling wasm-bindgen v0.2.83 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.16 [INFO] [stderr] Compiling regex-automata v0.1.10 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling csv-core v0.1.10 [INFO] [stderr] Compiling getrandom v0.2.7 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.83 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.83 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.83 [INFO] [stderr] Compiling bstr v0.2.17 [INFO] [stderr] Compiling csv v1.1.6 [INFO] [stderr] Compiling console_error_panic_hook v0.1.7 [INFO] [stderr] Compiling random-forest v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/lib.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/dtree.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/dtree/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/dtree.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | (1.0 - gini) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 183 - (1.0 - gini) [INFO] [stdout] 183 + 1.0 - gini [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stdout] --> src/random_forest.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use wasm_bindgen::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/random_forest.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:22:34 [INFO] [stdout] | [INFO] [stdout] 22 | let task: String = task_type.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:25:56 [INFO] [stdout] | [INFO] [stdout] 25 | let mut rf: random_forest::RandomForest = json.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:26:51 [INFO] [stdout] | [INFO] [stdout] 26 | let x_test: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | JsValue::from_serde(&y_pred).unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | let params: Data = json.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:35:50 [INFO] [stdout] | [INFO] [stdout] 35 | let mut x: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | let mut y: Vec = train_labels.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | JsValue::from_serde(&rf).unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/dtree.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/dtree/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `depth` [INFO] [stdout] --> src/dtree.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let depth = self.max_depth as f32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/dtree.rs:107:75 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..n_features { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..n_samples { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `percent` [INFO] [stdout] --> src/lib.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let percent = random_forest::accuracy(&y_pred, &y_train); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_percent` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/dtree.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/dtree/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/dtree/utils.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:34 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:53 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:38 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:225:44 [INFO] [stdout] | [INFO] [stdout] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:46 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:275:27 [INFO] [stdout] | [INFO] [stdout] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:51 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut X_: Vec> = vec![]; [INFO] [stdout] | ^^ help: convert the identifier to snake case: `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_i` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let mut X_i: Vec = vec![]; [INFO] [stdout] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:67:24 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_sample` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/dtree.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/dtree/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/dtree.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | (1.0 - gini) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 183 - (1.0 - gini) [INFO] [stdout] 183 + 1.0 - gini [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stdout] --> src/random_forest.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use wasm_bindgen::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/random_forest.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/dtree.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/dtree/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `depth` [INFO] [stdout] --> src/dtree.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let depth = self.max_depth as f32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/dtree.rs:107:75 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..n_features { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..n_samples { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/dtree.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/dtree/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/dtree/utils.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | &y.push(b.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 40 | let _ = &y.push(b.to_string()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | &x.push(aux); [INFO] [stdout] | ^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = &x.push(aux); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/main.rs:50:10 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/main.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/main.rs:50:28 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/main.rs:50:36 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:34 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:53 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:38 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:225:44 [INFO] [stdout] | [INFO] [stdout] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:46 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:275:27 [INFO] [stdout] | [INFO] [stdout] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:51 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut X_: Vec> = vec![]; [INFO] [stdout] | ^^ help: convert the identifier to snake case: `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_i` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let mut X_i: Vec = vec![]; [INFO] [stdout] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:67:24 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_sample` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 26.58s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.83 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "b02cd90f3ad6cf50fda7f94510c66ab2a5122830405a02d8feebf5af0e6e3cf4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b02cd90f3ad6cf50fda7f94510c66ab2a5122830405a02d8feebf5af0e6e3cf4", kill_on_drop: false }` [INFO] [stdout] b02cd90f3ad6cf50fda7f94510c66ab2a5122830405a02d8feebf5af0e6e3cf4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 224b0ae4b594365a2c3a209d9f059c7ee174d00bf11a03b2915b01f48469b4db [INFO] running `Command { std: "docker" "start" "-a" "224b0ae4b594365a2c3a209d9f059c7ee174d00bf11a03b2915b01f48469b4db", kill_on_drop: false }` [INFO] [stderr] Compiling wasm-bindgen-test-macro v0.3.33 [INFO] [stderr] Compiling scoped-tls v1.0.0 [INFO] [stderr] Compiling js-sys v0.3.60 [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/lib.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/dtree.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/dtree/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/dtree.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | (1.0 - gini) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 183 - (1.0 - gini) [INFO] [stdout] 183 + 1.0 - gini [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stdout] --> src/random_forest.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use wasm_bindgen::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/random_forest.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:22:34 [INFO] [stdout] | [INFO] [stdout] 22 | let task: String = task_type.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:25:56 [INFO] [stdout] | [INFO] [stdout] 25 | let mut rf: random_forest::RandomForest = json.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:26:51 [INFO] [stdout] | [INFO] [stdout] 26 | let x_test: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | JsValue::from_serde(&y_pred).unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | let params: Data = json.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:35:50 [INFO] [stdout] | [INFO] [stdout] 35 | let mut x: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | let mut y: Vec = train_labels.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | JsValue::from_serde(&rf).unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/dtree.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/dtree/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `depth` [INFO] [stdout] --> src/dtree.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let depth = self.max_depth as f32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/dtree.rs:107:75 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..n_features { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..n_samples { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `percent` [INFO] [stdout] --> src/lib.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let percent = random_forest::accuracy(&y_pred, &y_train); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_percent` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/dtree.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/dtree/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/dtree/utils.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:34 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:53 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:38 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:225:44 [INFO] [stdout] | [INFO] [stdout] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:46 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:275:27 [INFO] [stdout] | [INFO] [stdout] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:51 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut X_: Vec> = vec![]; [INFO] [stdout] | ^^ help: convert the identifier to snake case: `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_i` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let mut X_i: Vec = vec![]; [INFO] [stdout] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:67:24 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_sample` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/dtree.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/dtree/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/dtree.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | (1.0 - gini) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 183 - (1.0 - gini) [INFO] [stdout] 183 + 1.0 - gini [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stdout] --> src/random_forest.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use wasm_bindgen::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/random_forest.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/dtree.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/dtree/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `depth` [INFO] [stdout] --> src/dtree.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let depth = self.max_depth as f32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/dtree.rs:107:75 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..n_features { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..n_samples { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/dtree.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/dtree/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/dtree/utils.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | &y.push(b.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 40 | let _ = &y.push(b.to_string()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | &x.push(aux); [INFO] [stdout] | ^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = &x.push(aux); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/main.rs:50:10 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/main.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/main.rs:50:28 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/main.rs:50:36 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:34 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:53 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:38 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:225:44 [INFO] [stdout] | [INFO] [stdout] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:46 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:275:27 [INFO] [stdout] | [INFO] [stdout] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:51 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut X_: Vec> = vec![]; [INFO] [stdout] | ^^ help: convert the identifier to snake case: `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_i` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let mut X_i: Vec = vec![]; [INFO] [stdout] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:67:24 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_sample` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling wasm-bindgen-futures v0.4.33 [INFO] [stderr] Compiling wasm-bindgen-test v0.3.33 [INFO] [stderr] Compiling random-forest v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/dtree.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/dtree/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/dtree.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | (1.0 - gini) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 183 - (1.0 - gini) [INFO] [stdout] 183 + 1.0 - gini [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stdout] --> src/random_forest.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use wasm_bindgen::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/random_forest.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/lib.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude::*` [INFO] [stdout] --> src/dtree.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/dtree/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/dtree/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/dtree/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around block return value [INFO] [stdout] --> src/dtree.rs:183:9 [INFO] [stdout] | [INFO] [stdout] 183 | (1.0 - gini) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 183 - (1.0 - gini) [INFO] [stdout] 183 + 1.0 - gini [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/utils.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/utils.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stdout] --> src/random_forest.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use wasm_bindgen::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/random_forest.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stdout] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/dtree.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::prelude` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/dtree/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:22:34 [INFO] [stdout] | [INFO] [stdout] 22 | let task: String = task_type.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:25:56 [INFO] [stdout] | [INFO] [stdout] 25 | let mut rf: random_forest::RandomForest = json.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:26:51 [INFO] [stdout] | [INFO] [stdout] 26 | let x_test: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | JsValue::from_serde(&y_pred).unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | let params: Data = json.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:35:50 [INFO] [stdout] | [INFO] [stdout] 35 | let mut x: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | let mut y: Vec = train_labels.into_serde().unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stdout] --> src/lib.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | JsValue::from_serde(&rf).unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/dtree.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/dtree/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `depth` [INFO] [stdout] --> src/dtree.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let depth = self.max_depth as f32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/dtree.rs:107:75 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..n_features { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..n_samples { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `depth` [INFO] [stdout] --> src/dtree.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | let depth = self.max_depth as f32; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/dtree.rs:107:75 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/utils.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..n_features { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/random_forest.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 0..n_samples { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `percent` [INFO] [stdout] --> src/lib.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let percent = random_forest::accuracy(&y_pred, &y_train); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_percent` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/dtree.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/dtree/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/dtree/utils.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | &y.push(b.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 40 | let _ = &y.push(b.to_string()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | &x.push(aux); [INFO] [stdout] | ^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 41 | let _ = &x.push(aux); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/main.rs:50:10 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/main.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/main.rs:50:28 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/main.rs:50:36 [INFO] [stdout] | [INFO] [stdout] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:34 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:53 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:38 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:225:44 [INFO] [stdout] | [INFO] [stdout] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:46 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:275:27 [INFO] [stdout] | [INFO] [stdout] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:51 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut X_: Vec> = vec![]; [INFO] [stdout] | ^^ help: convert the identifier to snake case: `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_i` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let mut X_i: Vec = vec![]; [INFO] [stdout] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:67:24 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_sample` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/dtree.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/dtree/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/dtree/utils.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/utils.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:34 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:62:53 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:38 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:107:57 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:225:44 [INFO] [stdout] | [INFO] [stdout] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:27 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree.rs:249:46 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree.rs:275:27 [INFO] [stdout] | [INFO] [stdout] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/dtree/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/utils.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/utils.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/utils.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/utils.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:8:51 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut X_: Vec> = vec![]; [INFO] [stdout] | ^^ help: convert the identifier to snake case: `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_i` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | let mut X_i: Vec = vec![]; [INFO] [stdout] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:67:24 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_sample` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/random_forest.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 5.27s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.83 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "224b0ae4b594365a2c3a209d9f059c7ee174d00bf11a03b2915b01f48469b4db", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "224b0ae4b594365a2c3a209d9f059c7ee174d00bf11a03b2915b01f48469b4db", kill_on_drop: false }` [INFO] [stdout] 224b0ae4b594365a2c3a209d9f059c7ee174d00bf11a03b2915b01f48469b4db [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3959728d45483eb673ba100a951a6b9f5012970368db2a9e08e0ac9b67c8a5ad" "/opt/rustwide/cargo-home/bin/cargo" "+1.85.0" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 16d9c70f9cd9ac5b8b4b004e2f5bc89238318758fb6176ae1bd5fcf5736eb386 [INFO] running `Command { std: "docker" "start" "-a" "16d9c70f9cd9ac5b8b4b004e2f5bc89238318758fb6176ae1bd5fcf5736eb386", kill_on_drop: false }` [INFO] [stderr] warning: unused import: `rand::prelude::*` [INFO] [stderr] --> src/lib.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use rand::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::fs::File` [INFO] [stderr] --> src/lib.rs:2:5 [INFO] [stderr] | [INFO] [stderr] 2 | use std::fs::File; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io::Read` [INFO] [stderr] --> src/lib.rs:3:5 [INFO] [stderr] | [INFO] [stderr] 3 | use std::io::Read; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::fs::File` [INFO] [stderr] --> src/dtree.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use std::fs::File; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `rand::prelude::*` [INFO] [stderr] --> src/dtree.rs:3:5 [INFO] [stderr] | [INFO] [stderr] 3 | use rand::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `csv::Error` [INFO] [stderr] --> src/dtree.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use csv::Error; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::fs::File` [INFO] [stderr] --> src/dtree/utils.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use std::fs::File; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io::prelude::*` [INFO] [stderr] --> src/dtree/utils.rs:2:5 [INFO] [stderr] | [INFO] [stderr] 2 | use std::io::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `csv::Error` [INFO] [stderr] --> src/dtree/utils.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use csv::Error; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around block return value [INFO] [stderr] --> src/dtree.rs:183:9 [INFO] [stderr] | [INFO] [stderr] 183 | (1.0 - gini) [INFO] [stderr] | ^ ^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] 183 - (1.0 - gini) [INFO] [stderr] 183 + 1.0 - gini [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::fs::File` [INFO] [stderr] --> src/utils.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use std::fs::File; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io::prelude::*` [INFO] [stderr] --> src/utils.rs:2:5 [INFO] [stderr] | [INFO] [stderr] 2 | use std::io::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `csv::Error` [INFO] [stderr] --> src/utils.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use csv::Error; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `wasm_bindgen::prelude::*` [INFO] [stderr] --> src/random_forest.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use wasm_bindgen::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `while` condition [INFO] [stderr] --> src/random_forest.rs:19:15 [INFO] [stderr] | [INFO] [stderr] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stderr] | ^ ^ [INFO] [stderr] | [INFO] [stderr] help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stderr] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:22:34 [INFO] [stderr] | [INFO] [stderr] 22 | let task: String = task_type.into_serde().unwrap(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(deprecated)]` on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:25:56 [INFO] [stderr] | [INFO] [stderr] 25 | let mut rf: random_forest::RandomForest = json.into_serde().unwrap(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:26:51 [INFO] [stderr] | [INFO] [stderr] 26 | let x_test: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:29:18 [INFO] [stderr] | [INFO] [stderr] 29 | JsValue::from_serde(&y_pred).unwrap() [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:33:33 [INFO] [stderr] | [INFO] [stderr] 33 | let params: Data = json.into_serde().unwrap(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:35:50 [INFO] [stderr] | [INFO] [stderr] 35 | let mut x: Vec> = train_dataset.into_serde().unwrap(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `wasm_bindgen::JsValue::into_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:36:47 [INFO] [stderr] | [INFO] [stderr] 36 | let mut y: Vec = train_labels.into_serde().unwrap(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated associated function `wasm_bindgen::JsValue::from_serde`: causes dependency cycles, use `serde-wasm-bindgen` or `gloo_utils::format::JsValueSerdeExt` instead [INFO] [stderr] --> src/lib.rs:52:18 [INFO] [stderr] | [INFO] [stderr] 52 | JsValue::from_serde(&rf).unwrap() [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io::prelude` [INFO] [stderr] --> src/dtree.rs:2:5 [INFO] [stderr] | [INFO] [stderr] 2 | use std::io::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n_test` [INFO] [stderr] --> src/dtree/utils.rs:19:9 [INFO] [stderr] | [INFO] [stderr] 19 | let n_test = X.len() - n_train; [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `depth` [INFO] [stderr] --> src/dtree.rs:71:17 [INFO] [stderr] | [INFO] [stderr] 71 | let depth = self.max_depth as f32; [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `num_samples` [INFO] [stderr] --> src/dtree.rs:107:75 [INFO] [stderr] | [INFO] [stderr] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n_test` [INFO] [stderr] --> src/utils.rs:19:9 [INFO] [stderr] | [INFO] [stderr] 19 | let n_test = X.len() - n_train; [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/random_forest.rs:17:9 [INFO] [stderr] | [INFO] [stderr] 17 | for i in 0..n_features { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/random_forest.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | for i in 0..n_samples { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `percent` [INFO] [stderr] --> src/lib.rs:50:13 [INFO] [stderr] | [INFO] [stderr] 50 | let percent = random_forest::accuracy(&y_pred, &y_train); [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_percent` [INFO] [stderr] [INFO] [stderr] warning: associated function `new` is never used [INFO] [stderr] --> src/dtree.rs:32:12 [INFO] [stderr] | [INFO] [stderr] 31 | impl Node{ [INFO] [stderr] | --------- associated function in this implementation [INFO] [stderr] 32 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: function `set_panic_hook` is never used [INFO] [stderr] --> src/dtree/utils.rs:6:8 [INFO] [stderr] | [INFO] [stderr] 6 | pub fn set_panic_hook() { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `split_dataset` is never used [INFO] [stderr] --> src/dtree/utils.rs:17:8 [INFO] [stderr] | [INFO] [stderr] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:52:8 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `set_panic_hook` is never used [INFO] [stderr] --> src/utils.rs:6:8 [INFO] [stderr] | [INFO] [stderr] 6 | pub fn set_panic_hook() { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `accuracy_per_label` is never used [INFO] [stderr] --> src/utils.rs:52:8 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `count_vals` is never used [INFO] [stderr] --> src/utils.rs:76:8 [INFO] [stderr] | [INFO] [stderr] 76 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `unique_vals` is never used [INFO] [stderr] --> src/utils.rs:87:8 [INFO] [stderr] | [INFO] [stderr] 87 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `unique_vals_f32` is never used [INFO] [stderr] --> src/utils.rs:97:8 [INFO] [stderr] | [INFO] [stderr] 97 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `get_column` is never used [INFO] [stderr] --> src/utils.rs:113:8 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:62:34 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree.rs:62:53 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:107:38 [INFO] [stderr] | [INFO] [stderr] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree.rs:107:57 [INFO] [stderr] | [INFO] [stderr] 107 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree.rs:170:34 [INFO] [stderr] | [INFO] [stderr] 170 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:187:29 [INFO] [stderr] | [INFO] [stderr] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree.rs:187:48 [INFO] [stderr] | [INFO] [stderr] 187 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree.rs:225:44 [INFO] [stderr] | [INFO] [stderr] 225 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:249:27 [INFO] [stderr] | [INFO] [stderr] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree.rs:249:46 [INFO] [stderr] | [INFO] [stderr] 249 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:253:35 [INFO] [stderr] | [INFO] [stderr] 253 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:275:27 [INFO] [stderr] | [INFO] [stderr] 275 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree/utils.rs:17:22 [INFO] [stderr] | [INFO] [stderr] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:17:45 [INFO] [stderr] | [INFO] [stderr] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/dtree/utils.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | let mut X_test: Vec> = vec![]; [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stderr] [INFO] [stderr] warning: variable `X_train` should have a snake case name [INFO] [stderr] --> src/dtree/utils.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | let mut X_train: Vec> = vec![]; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_test` should have a snake case name [INFO] [stderr] --> src/dtree/utils.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | let mut Y_test: Vec = vec![]; [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_train` should have a snake case name [INFO] [stderr] --> src/dtree/utils.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | let mut Y_train: Vec = vec![]; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/dtree/utils.rs:52:27 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_hat` should have a snake case name [INFO] [stderr] --> src/dtree/utils.rs:52:44 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/utils.rs:17:22 [INFO] [stderr] | [INFO] [stderr] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:17:45 [INFO] [stderr] | [INFO] [stderr] 17 | pub fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec src/utils.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | let mut X_test: Vec> = vec![]; [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stderr] [INFO] [stderr] warning: variable `X_train` should have a snake case name [INFO] [stderr] --> src/utils.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | let mut X_train: Vec> = vec![]; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_test` should have a snake case name [INFO] [stderr] --> src/utils.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | let mut Y_test: Vec = vec![]; [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_train` should have a snake case name [INFO] [stderr] --> src/utils.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | let mut Y_train: Vec = vec![]; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/utils.rs:52:27 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_hat` should have a snake case name [INFO] [stderr] --> src/utils.rs:52:44 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stderr] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:8:32 [INFO] [stderr] | [INFO] [stderr] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:8:51 [INFO] [stderr] | [INFO] [stderr] 8 | pub fn bootstrap_random_forest(X: &Vec>, Y: &Vec, n_features: usize, rng: &mut rand::rngs::StdRng) -> (Vec>, Ve... [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X_` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:10:13 [INFO] [stderr] | [INFO] [stderr] 10 | let mut X_: Vec> = vec![]; [INFO] [stderr] | ^^ help: convert the identifier to snake case: `x` [INFO] [stderr] [INFO] [stderr] warning: variable `X_i` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:31:17 [INFO] [stderr] | [INFO] [stderr] 31 | let mut X_i: Vec = vec![]; [INFO] [stderr] | ^^^ help: convert the identifier to snake case (notice the capitalization): `x_i` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:58:30 [INFO] [stderr] | [INFO] [stderr] 58 | pub fn count_val(el: String, Y: &Vec) -> usize{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:67:24 [INFO] [stderr] | [INFO] [stderr] 67 | pub fn get_most_common(Y: &Vec) -> String { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:115:27 [INFO] [stderr] | [INFO] [stderr] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: variable `Y` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:115:46 [INFO] [stderr] | [INFO] [stderr] 115 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stderr] [INFO] [stderr] warning: variable `X_sample` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:122:18 [INFO] [stderr] | [INFO] [stderr] 122 | let (X_sample, y_sample) = bootstrap_random_forest(&X, &Y, self.n_feats, &mut rng); [INFO] [stderr] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_sample` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/random_forest.rs:134:31 [INFO] [stderr] | [INFO] [stderr] 134 | pub fn predict(&mut self, X: &Vec>) -> Vec { [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: `random-forest` (lib) generated 79 warnings (run `cargo fix --lib -p random-forest` to apply 15 suggestions) [INFO] [stderr] warning: unused import: `csv::Error` [INFO] [stderr] --> src/main.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use csv::Error; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `rand::prelude` [INFO] [stderr] --> src/main.rs:3:5 [INFO] [stderr] | [INFO] [stderr] 3 | use rand::prelude::*; [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused borrow that must be used [INFO] [stderr] --> src/main.rs:40:9 [INFO] [stderr] | [INFO] [stderr] 40 | &y.push(b.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_must_use)]` on by default [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 40 | let _ = &y.push(b.to_string()); [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: unused borrow that must be used [INFO] [stderr] --> src/main.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | &x.push(aux); [INFO] [stderr] | ^^^^^^^^^^^^ the borrow produces a value [INFO] [stderr] | [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 41 | let _ = &x.push(aux); [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: variable `X_train` should have a snake case name [INFO] [stderr] --> src/main.rs:50:10 [INFO] [stderr] | [INFO] [stderr] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: variable `Y_train` should have a snake case name [INFO] [stderr] --> src/main.rs:50:19 [INFO] [stderr] | [INFO] [stderr] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stderr] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stderr] [INFO] [stderr] warning: variable `X_test` should have a snake case name [INFO] [stderr] --> src/main.rs:50:28 [INFO] [stderr] | [INFO] [stderr] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stderr] [INFO] [stderr] warning: variable `Y_test` should have a snake case name [INFO] [stderr] --> src/main.rs:50:36 [INFO] [stderr] | [INFO] [stderr] 50 | let (X_train, Y_train, X_test, Y_test) = utils::split_dataset(&mut x, &mut y, 0.8); [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stderr] [INFO] [stderr] warning: variable `X` should have a snake case name [INFO] [stderr] --> src/dtree.rs:62:34 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stderr] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stderr] [INFO] [stderr] warning: `random-forest` (bin "random-forest") generated 75 warnings (66 duplicates) (run `cargo fix --bin "random-forest"` to apply 1 suggestion) [INFO] [stderr] warning: `random-forest` (lib test) generated 79 warnings (79 duplicates) [INFO] [stderr] warning: `random-forest` (bin "random-forest" test) generated 75 warnings (75 duplicates) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.08s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.83 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/random_forest-a1f2522c580c5f90) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/random_forest-1e399d32d12573bf) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Running tests/web.rs (/opt/rustwide/target/debug/deps/web-3a59c3a26d211a28) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Doc-tests random_forest [INFO] [stderr] warning: unnecessary parentheses around block return value [INFO] [stderr] --> src/dtree.rs:183:9 [INFO] [stderr] | [INFO] [stderr] 183 | (1.0 - gini) [INFO] [stderr] | ^ ^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] 183 - (1.0 - gini) [INFO] [stderr] 183 + 1.0 - gini [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `while` condition [INFO] [stderr] --> src/random_forest.rs:19:15 [INFO] [stderr] | [INFO] [stderr] 19 | while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stderr] | ^ ^ [INFO] [stderr] | [INFO] [stderr] help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] 19 - while (ft_ixs.contains(&rnd_ft_idx)) { [INFO] [stderr] 19 + while ft_ixs.contains(&rnd_ft_idx) { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: 2 warnings emitted [INFO] [stderr] [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "16d9c70f9cd9ac5b8b4b004e2f5bc89238318758fb6176ae1bd5fcf5736eb386", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "16d9c70f9cd9ac5b8b4b004e2f5bc89238318758fb6176ae1bd5fcf5736eb386", kill_on_drop: false }` [INFO] [stdout] 16d9c70f9cd9ac5b8b4b004e2f5bc89238318758fb6176ae1bd5fcf5736eb386