[INFO] cloning repository https://github.com/kernelmachine/rsml [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kernelmachine/rsml" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkernelmachine%2Frsml", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkernelmachine%2Frsml'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ba18ae61ebe818f95b3e62af8a9de7d1eb169f21 [INFO] checking kernelmachine/rsml against try#8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 for pr-82565 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkernelmachine%2Frsml" "/workspace/builds/worker-14/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-14/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/kernelmachine/rsml on toolchain 8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/kernelmachine/rsml [INFO] finished tweaking git repo https://github.com/kernelmachine/rsml [INFO] tweaked toml for git repo https://github.com/kernelmachine/rsml written to /workspace/builds/worker-14/source/Cargo.toml [INFO] crate git repo https://github.com/kernelmachine/rsml already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] error: the lock file /workspace/builds/worker-14/source/Cargo.lock needs to be updated but --locked was passed to prevent this [INFO] [stderr] If you want to try to generate the lock file without accessing the network, use the --offline flag. [INFO] the lockfile is outdated, regenerating it [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded num-complex v0.3.1 [INFO] [stderr] Downloaded matrixmultiply v0.2.4 [INFO] [stderr] Downloaded rand_distr v0.4.0 [INFO] [stderr] Downloaded libm v0.2.1 [INFO] [stderr] Downloaded ndarray v0.14.0 [INFO] [stderr] Downloaded ndarray-rand v0.13.0 [INFO] [stderr] Downloaded rust-tfidf v1.1.0 [INFO] [stderr] Downloaded typenum v1.2.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/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" "rustops/crates-build-env@sha256:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ddbdcfed0b368f2392e8e565b9a967452a0033649ef2cc5596b7f685015da934 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "ddbdcfed0b368f2392e8e565b9a967452a0033649ef2cc5596b7f685015da934", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ddbdcfed0b368f2392e8e565b9a967452a0033649ef2cc5596b7f685015da934", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ddbdcfed0b368f2392e8e565b9a967452a0033649ef2cc5596b7f685015da934", kill_on_drop: false }` [INFO] [stdout] ddbdcfed0b368f2392e8e565b9a967452a0033649ef2cc5596b7f685015da934 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/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=forbid" "-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" "rustops/crates-build-env@sha256:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bdaa06d8d2d3acfde674a0e552e345a71518ff1949b96366c2578cb98904bc7e [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "bdaa06d8d2d3acfde674a0e552e345a71518ff1949b96366c2578cb98904bc7e", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling libc v0.2.89 [INFO] [stderr] Compiling getrandom v0.2.2 [INFO] [stderr] Checking scopeguard v1.1.0 [INFO] [stderr] Compiling rayon-core v1.9.0 [INFO] [stderr] Compiling ndarray v0.14.0 [INFO] [stderr] Compiling serde v1.0.124 [INFO] [stderr] Compiling serde_json v1.0.64 [INFO] [stderr] Compiling typenum v1.2.0 [INFO] [stderr] Checking itoa v0.4.7 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking rustc-serialize v0.3.24 [INFO] [stderr] Checking rust-tfidf v1.1.0 [INFO] [stderr] Checking matrixmultiply v0.2.4 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling crossbeam-utils v0.8.3 [INFO] [stderr] Compiling memoffset v0.6.1 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling rayon v1.5.0 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking rand_core v0.6.2 [INFO] [stderr] Checking crossbeam-epoch v0.9.3 [INFO] [stderr] Checking crossbeam-channel v0.5.0 [INFO] [stderr] Checking rand_chacha v0.3.0 [INFO] [stderr] Checking rand v0.8.3 [INFO] [stderr] Checking crossbeam-deque v0.8.0 [INFO] [stderr] Checking num-complex v0.3.1 [INFO] [stderr] Checking rand_distr v0.4.0 [INFO] [stderr] Checking ndarray-rand v0.13.0 [INFO] [stderr] Checking rsml v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0557]: feature has been removed [INFO] [stdout] --> src/lib.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(custom_derive, plugin)] [INFO] [stdout] | ^^^^^^^^^^^^^ feature has been removed [INFO] [stdout] | [INFO] [stdout] = note: subsumed by `#[proc_macro_derive]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0557]: feature has been removed [INFO] [stdout] --> src/lib.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(custom_derive, plugin)] [INFO] [stdout] | ^^^^^^^^^^^^^ feature has been removed [INFO] [stdout] | [INFO] [stdout] = note: subsumed by `#[proc_macro_derive]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `rand::distributions::Range` [INFO] [stdout] --> src/tree/test.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::distributions::Range; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Range` in `distributions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved imports `rand::distributions::IndependentSample`, `rand::distributions::Range` [INFO] [stdout] --> src/random_forest/model.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | use rand::distributions::{IndependentSample, Range}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^ no `Range` in `distributions` [INFO] [stdout] | | [INFO] [stdout] | no `IndependentSample` in `distributions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `rand::StdRng` [INFO] [stdout] --> src/random_forest/model.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::StdRng; [INFO] [stdout] | ^^^^^^^^^^^^ no `StdRng` in the root [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved imports `rand::distributions::IndependentSample`, `rand::distributions::Range` [INFO] [stdout] --> src/random_forest/model.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | use rand::distributions::{IndependentSample, Range}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^ no `Range` in `distributions` [INFO] [stdout] | | [INFO] [stdout] | no `IndependentSample` in `distributions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `rand::StdRng` [INFO] [stdout] --> src/random_forest/model.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::StdRng; [INFO] [stdout] | ^^^^^^^^^^^^ no `StdRng` in the root [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `rand::distributions::Range` [INFO] [stdout] --> src/random_forest/test.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::Range; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Range` in `distributions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `rand::distributions::Range` [INFO] [stdout] --> src/accuracy/test.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::Range; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Range` in `distributions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/lib.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | #[macro_use(s)] [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `...` range patterns are deprecated [INFO] [stdout] --> src/tfidf_helper/tfidf_helper.rs:99:11 [INFO] [stdout] | [INFO] [stdout] 99 | 97...122 => true, [INFO] [stdout] | ^^^ help: use `..=` for an inclusive range [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/lib.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | #[macro_use(s)] [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rng` [INFO] [stdout] --> src/tree/test.rs:13:28 [INFO] [stdout] | [INFO] [stdout] 13 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rng` [INFO] [stdout] --> src/random_forest/test.rs:11:28 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `...` range patterns are deprecated [INFO] [stdout] --> src/tfidf_helper/tfidf_helper.rs:99:11 [INFO] [stdout] | [INFO] [stdout] 99 | 97...122 => true, [INFO] [stdout] | ^^^ help: use `..=` for an inclusive range [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Rng` [INFO] [stdout] --> src/accuracy/test.rs:11:28 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated trait `std::ascii::AsciiExt`: use inherent methods instead [INFO] [stdout] --> src/tfidf_helper/tfidf_helper.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ascii::AsciiExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated trait `std::ascii::AsciiExt`: use inherent methods instead [INFO] [stdout] --> src/tfidf_helper/tfidf_helper.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ascii::AsciiExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for struct `ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:135:37 [INFO] [stdout] | [INFO] [stdout] 135 | for (idx, &elem) in feature.iter().enumerate() { [INFO] [stdout] | ^^^^ method cannot be called on `ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for struct `ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:179:36 [INFO] [stdout] | [INFO] [stdout] 179 | let mut xy_pairs = feature.iter().zip(target.iter()).collect::>(); [INFO] [stdout] | ^^^^ method cannot be called on `ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:179:54 [INFO] [stdout] | [INFO] [stdout] 179 | let mut xy_pairs = feature.iter().zip(target.iter()).collect::>(); [INFO] [stdout] | ^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `scalar_sum` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:183:33 [INFO] [stdout] | [INFO] [stdout] 183 | let target_sum = target.scalar_sum(); [INFO] [stdout] | ^^^^^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `len` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:190:61 [INFO] [stdout] | [INFO] [stdout] 190 | let left_proportion = cumulative_count / target.len() as f64; [INFO] [stdout] | ^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `scalar_sum` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:239:31 [INFO] [stdout] | [INFO] [stdout] 239 | let num_plus = target.scalar_sum(); [INFO] [stdout] | ^^^^^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `len` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:240:52 [INFO] [stdout] | [INFO] [stdout] 240 | let probability = num_plus as f64 / target.len() as f64; [INFO] [stdout] | ^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for struct `ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:135:37 [INFO] [stdout] | [INFO] [stdout] 135 | for (idx, &elem) in feature.iter().enumerate() { [INFO] [stdout] | ^^^^ method cannot be called on `ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `len` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:244:19 [INFO] [stdout] | [INFO] [stdout] 244 | target.len() < self.min_samples_split as usize { [INFO] [stdout] | ^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `axis_iter` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:252:45 [INFO] [stdout] | [INFO] [stdout] 252 | for (feature_idx, feature) in train.axis_iter(Axis(1)).enumerate() { [INFO] [stdout] | ^^^^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] `<(usize, usize) as Dimension>::Smaller = _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `column` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/tree/model.rs:263:34 [INFO] [stdout] | [INFO] [stdout] 263 | let best_feature = train.column(best_feature_idx); [INFO] [stdout] | ^^^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:270:36 [INFO] [stdout] | [INFO] [stdout] 270 | let left_train = train.select(Axis(0), &left_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for struct `ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:179:36 [INFO] [stdout] | [INFO] [stdout] 179 | let mut xy_pairs = feature.iter().zip(target.iter()).collect::>(); [INFO] [stdout] | ^^^^ method cannot be called on `ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:271:38 [INFO] [stdout] | [INFO] [stdout] 271 | let left_target = target.select(Axis(0), &left_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:179:54 [INFO] [stdout] | [INFO] [stdout] 179 | let mut xy_pairs = feature.iter().zip(target.iter()).collect::>(); [INFO] [stdout] | ^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:272:37 [INFO] [stdout] | [INFO] [stdout] 272 | let right_train = train.select(Axis(0), &right_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `scalar_sum` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:183:33 [INFO] [stdout] | [INFO] [stdout] 183 | let target_sum = target.scalar_sum(); [INFO] [stdout] | ^^^^^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `len` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:190:61 [INFO] [stdout] | [INFO] [stdout] 190 | let left_proportion = cumulative_count / target.len() as f64; [INFO] [stdout] | ^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:273:39 [INFO] [stdout] | [INFO] [stdout] 273 | let right_target = target.select(Axis(0), &right_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0608]: cannot index into a value of type `&ArrayBase, usize>` [INFO] [stdout] --> src/tree/model.rs:301:23 [INFO] [stdout] | [INFO] [stdout] 301 | match test[feature] <= threshold { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `scalar_sum` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:239:31 [INFO] [stdout] | [INFO] [stdout] 239 | let num_plus = target.scalar_sum(); [INFO] [stdout] | ^^^^^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `len` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:240:52 [INFO] [stdout] | [INFO] [stdout] 240 | let probability = num_plus as f64 / target.len() as f64; [INFO] [stdout] | ^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `len` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:244:19 [INFO] [stdout] | [INFO] [stdout] 244 | target.len() < self.min_samples_split as usize { [INFO] [stdout] | ^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:313:32 [INFO] [stdout] | [INFO] [stdout] 313 | let n_features = train.shape()[1]; [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `axis_iter` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:252:45 [INFO] [stdout] | [INFO] [stdout] 252 | for (feature_idx, feature) in train.axis_iter(Axis(1)).enumerate() { [INFO] [stdout] | ^^^^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] `<(usize, usize) as Dimension>::Smaller = _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `column` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/tree/model.rs:263:34 [INFO] [stdout] | [INFO] [stdout] 263 | let best_feature = train.column(best_feature_idx); [INFO] [stdout] | ^^^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:314:32 [INFO] [stdout] | [INFO] [stdout] 314 | let n_outputs = target.shape()[0]; [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:270:36 [INFO] [stdout] | [INFO] [stdout] 270 | let left_train = train.select(Axis(0), &left_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:271:38 [INFO] [stdout] | [INFO] [stdout] 271 | let left_target = target.select(Axis(0), &left_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:317:40 [INFO] [stdout] | [INFO] [stdout] 317 | let mut target_cloned = target.iter().cloned().collect::>(); [INFO] [stdout] | ^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:272:37 [INFO] [stdout] | [INFO] [stdout] 272 | let right_train = train.select(Axis(0), &right_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:273:39 [INFO] [stdout] | [INFO] [stdout] 273 | let right_target = target.select(Axis(0), &right_data_idx); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0608]: cannot index into a value of type `&ArrayBase, usize>` [INFO] [stdout] --> src/tree/model.rs:301:23 [INFO] [stdout] | [INFO] [stdout] 301 | match test[feature] <= threshold { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `inner_iter` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/tree/model.rs:345:33 [INFO] [stdout] | [INFO] [stdout] 345 | let data = test.inner_iter() [INFO] [stdout] | ^^^^^^^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/model.rs:348:20 [INFO] [stdout] | [INFO] [stdout] 348 | Ok(Array::from_vec(data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:313:32 [INFO] [stdout] | [INFO] [stdout] 313 | let n_features = train.shape()[1]; [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:314:32 [INFO] [stdout] | [INFO] [stdout] 314 | let n_outputs = target.shape()[0]; [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `iter` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/tree/model.rs:317:40 [INFO] [stdout] | [INFO] [stdout] 317 | let mut target_cloned = target.iter().cloned().collect::>(); [INFO] [stdout] | ^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `inner_iter` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/tree/model.rs:345:33 [INFO] [stdout] | [INFO] [stdout] 345 | let data = test.inner_iter() [INFO] [stdout] | ^^^^^^^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/model.rs:348:20 [INFO] [stdout] | [INFO] [stdout] 348 | Ok(Array::from_vec(data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/model.rs:348:20 [INFO] [stdout] | [INFO] [stdout] 348 | Ok(Array::from_vec(data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/model.rs:348:20 [INFO] [stdout] | [INFO] [stdout] 348 | Ok(Array::from_vec(data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `rows` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/random_forest/model.rs:66:49 [INFO] [stdout] | [INFO] [stdout] 66 | let index_matrix = Array::random((train.rows(), self.trees.len()), [INFO] [stdout] | ^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `rows` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/random_forest/model.rs:67:62 [INFO] [stdout] | [INFO] [stdout] 67 | ... Range::new(0, train.rows())); [INFO] [stdout] | ^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/random_forest/model.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | let train_subset = train.select(Axis(0), indices.as_slice().unwrap()); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/random_forest/model.rs:79:40 [INFO] [stdout] | [INFO] [stdout] 79 | let target_subset = target.select(Axis(0), indices.as_slice().unwrap()); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/random_forest/model.rs:94:40 [INFO] [stdout] | [INFO] [stdout] 94 | let mut df = Array::zeros(test.shape()[0]); [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `ArrayBase, usize>` to `ArrayBase, _>` [INFO] [stdout] --> src/random_forest/model.rs:97:25 [INFO] [stdout] | [INFO] [stdout] 97 | df = df + pred; [INFO] [stdout] | ^ no implementation for `ArrayBase, _> + ArrayBase, usize>` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add, usize>>` is not implemented for `ArrayBase, _>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/random_forest/model.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | df = df / (self.trees.len() as f64); [INFO] [stdout] | ^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `Div` for `ArrayBase, usize>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/random_forest/model.rs:94:22 [INFO] [stdout] | [INFO] [stdout] 94 | let mut df = Array::zeros(test.shape()[0]); [INFO] [stdout] | ^^^^^^^^^^^^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] | [INFO] [stdout] = note: required by `ndarray::impl_constructors::>::zeros` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/util/util.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | Array::from_vec(indices.iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0608]: cannot index into a value of type `&ArrayBase, usize>` [INFO] [stdout] --> src/util/util.rs:42:38 [INFO] [stdout] | [INFO] [stdout] 42 | ... .map(|&x| mat[x]) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:37:49 [INFO] [stdout] | [INFO] [stdout] 37 | let (left, right) = DecisionTree::split(X.column(feature_idx), value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/test.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | let y = Array::from_vec(vec![1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0]); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/util/util.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn noncontig_1d_slice(mat: &Col, indices: &[usize]) -> Col { [INFO] [stdout] | -------- expected `ArrayBase, usize>` because of return type [INFO] [stdout] 38 | / Array::from_vec(indices.iter() [INFO] [stdout] 39 | | .cloned() [INFO] [stdout] 40 | | .collect::>() [INFO] [stdout] 41 | | .iter() [INFO] [stdout] 42 | | .map(|&x| mat[x]) [INFO] [stdout] 43 | | .collect::>()) [INFO] [stdout] | |________________________________________________^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `row` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/util/util.rs:69:30 [INFO] [stdout] | [INFO] [stdout] 69 | mat.row(x) [INFO] [stdout] | ^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/util/util.rs:70:49 [INFO] [stdout] | [INFO] [stdout] 70 | ... .into_shape((1, mat.shape()[1])) [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ascii::AsciiExt` [INFO] [stdout] --> src/tfidf_helper/tfidf_helper.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ascii::AsciiExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 35 previous errors; 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0432, E0557, E0599, E0608. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rsml` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:49:76 [INFO] [stdout] | [INFO] [stdout] 49 | let (threshold, split_impurity) = DecisionTree::find_optimal_split(X.column(0), &y); [INFO] [stdout] | ^^^^^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:49:89 [INFO] [stdout] | [INFO] [stdout] 49 | let (threshold, split_impurity) = DecisionTree::find_optimal_split(X.column(0), &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/test.rs:60:17 [INFO] [stdout] | [INFO] [stdout] 60 | let y = Array::from_vec(vec![1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0]); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:62:76 [INFO] [stdout] | [INFO] [stdout] 62 | let (threshold, split_impurity) = DecisionTree::find_optimal_split(X.column(0), &y); [INFO] [stdout] | ^^^^^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:62:89 [INFO] [stdout] | [INFO] [stdout] 62 | let (threshold, split_impurity) = DecisionTree::find_optimal_split(X.column(0), &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/test.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | let y = Array::from_vec(vec![1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0]); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 79 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:79:20 [INFO] [stdout] | [INFO] [stdout] 79 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:81:31 [INFO] [stdout] | [INFO] [stdout] 81 | let pred = dt.predict(&X).ok().unwrap(); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::numeric::impl_numeric::>::all_close`: Use `abs_diff_eq` - it requires the `approx` crate feature [INFO] [stdout] --> src/tree/test.rs:83:19 [INFO] [stdout] | [INFO] [stdout] 83 | assert!(y.all_close(&pred, 1e-8)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/tree/test.rs:83:19 [INFO] [stdout] | [INFO] [stdout] 83 | assert!(y.all_close(&pred, 1e-8)); [INFO] [stdout] | ^^^^^^^^^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/test.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | let y = Array::from_vec((0..rows) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `choose` found for struct `ThreadRng` in the current scope [INFO] [stdout] --> src/tree/test.rs:96:51 [INFO] [stdout] | [INFO] [stdout] 96 | ... .map(|_| *rng.choose(&vec![0.0, 1.0][..]).unwrap()) [INFO] [stdout] | ^^^^^^ method not found in `ThreadRng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:100:16 [INFO] [stdout] | [INFO] [stdout] 100 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/test.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | let y = Array::from_vec((0..rows) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `choose` found for struct `ThreadRng` in the current scope [INFO] [stdout] --> src/tree/test.rs:114:51 [INFO] [stdout] | [INFO] [stdout] 114 | ... .map(|_| *rng.choose(&vec![0.0, 1.0][..]).unwrap()) [INFO] [stdout] | ^^^^^^ method not found in `ThreadRng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 118 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:118:20 [INFO] [stdout] | [INFO] [stdout] 118 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/tree/test.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | let y = Array::from_vec((0..rows) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `choose` found for struct `ThreadRng` in the current scope [INFO] [stdout] --> src/tree/test.rs:131:51 [INFO] [stdout] | [INFO] [stdout] 131 | ... .map(|_| *rng.choose(&vec![0.0, 1.0][..]).unwrap()) [INFO] [stdout] | ^^^^^^ method not found in `ThreadRng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tree/test.rs:138:24 [INFO] [stdout] | [INFO] [stdout] 138 | dt.fit(&X, &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `rows` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/random_forest/model.rs:66:49 [INFO] [stdout] | [INFO] [stdout] 66 | let index_matrix = Array::random((train.rows(), self.trees.len()), [INFO] [stdout] | ^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `rows` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/random_forest/model.rs:67:62 [INFO] [stdout] | [INFO] [stdout] 67 | ... Range::new(0, train.rows())); [INFO] [stdout] | ^^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/random_forest/model.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | let train_subset = train.select(Axis(0), indices.as_slice().unwrap()); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `select` exists for reference `&ArrayBase, usize>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/random_forest/model.rs:79:40 [INFO] [stdout] | [INFO] [stdout] 79 | let target_subset = target.select(Axis(0), indices.as_slice().unwrap()); [INFO] [stdout] | ^^^^^^ method cannot be called on `&ArrayBase, usize>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `usize: Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/random_forest/model.rs:94:40 [INFO] [stdout] | [INFO] [stdout] 94 | let mut df = Array::zeros(test.shape()[0]); [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `ArrayBase, usize>` to `ArrayBase, _>` [INFO] [stdout] --> src/random_forest/model.rs:97:25 [INFO] [stdout] | [INFO] [stdout] 97 | df = df + pred; [INFO] [stdout] | ^ no implementation for `ArrayBase, _> + ArrayBase, usize>` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add, usize>>` is not implemented for `ArrayBase, _>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/random_forest/model.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | df = df / (self.trees.len() as f64); [INFO] [stdout] | ^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] | [INFO] [stdout] = note: required because of the requirements on the impl of `Div` for `ArrayBase, usize>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/random_forest/model.rs:94:22 [INFO] [stdout] | [INFO] [stdout] 94 | let mut df = Array::zeros(test.shape()[0]); [INFO] [stdout] | ^^^^^^^^^^^^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] | [INFO] [stdout] = note: required by `ndarray::impl_constructors::>::zeros` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/random_forest/test.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | let target = Array::from_vec(vec![1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0]); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/random_forest/test.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | rf.fit(&train, &target); [INFO] [stdout] | ^^^^^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/random_forest/test.rs:24:24 [INFO] [stdout] | [INFO] [stdout] 24 | rf.fit(&train, &target); [INFO] [stdout] | ^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/random_forest/test.rs:26:31 [INFO] [stdout] | [INFO] [stdout] 26 | let pred = rf.predict(&train).ok().unwrap(); [INFO] [stdout] | ^^^^^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::numeric::impl_numeric::>::all_close`: Use `abs_diff_eq` - it requires the `approx` crate feature [INFO] [stdout] --> src/random_forest/test.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | assert!(target.all_close(&pred, 0.3)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/random_forest/test.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | assert!(target.all_close(&pred, 0.3)); [INFO] [stdout] | ^^^^^^^^^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/random_forest/test.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | let y = Array::from_vec((0..rows) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `choose` found for struct `ThreadRng` in the current scope [INFO] [stdout] --> src/random_forest/test.rs:42:51 [INFO] [stdout] | [INFO] [stdout] 42 | ... .map(|_| *rng.choose(&vec![0.0, 1.0][..]).unwrap()) [INFO] [stdout] | ^^^^^^ method not found in `ThreadRng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/random_forest/test.rs:48:20 [INFO] [stdout] | [INFO] [stdout] 48 | rf.fit(&x, &y); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/random_forest/test.rs:48:24 [INFO] [stdout] | [INFO] [stdout] 48 | rf.fit(&x, &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/util/util.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | Array::from_vec(indices.iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0608]: cannot index into a value of type `&ArrayBase, usize>` [INFO] [stdout] --> src/util/util.rs:42:38 [INFO] [stdout] | [INFO] [stdout] 42 | ... .map(|&x| mat[x]) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/util/util.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn noncontig_1d_slice(mat: &Col, indices: &[usize]) -> Col { [INFO] [stdout] | -------- expected `ArrayBase, usize>` because of return type [INFO] [stdout] 38 | / Array::from_vec(indices.iter() [INFO] [stdout] 39 | | .cloned() [INFO] [stdout] 40 | | .collect::>() [INFO] [stdout] 41 | | .iter() [INFO] [stdout] 42 | | .map(|&x| mat[x]) [INFO] [stdout] 43 | | .collect::>()) [INFO] [stdout] | |________________________________________________^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `ArrayBase, usize>` [INFO] [stdout] found struct `ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `row` found for reference `&ArrayBase, (usize, usize)>` in the current scope [INFO] [stdout] --> src/util/util.rs:69:30 [INFO] [stdout] | [INFO] [stdout] 69 | mat.row(x) [INFO] [stdout] | ^^^ method not found in `&ArrayBase, (usize, usize)>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `shape` exists for reference `&ArrayBase, (usize, usize)>`, but its trait bounds were not satisfied [INFO] [stdout] --> src/util/util.rs:70:49 [INFO] [stdout] | [INFO] [stdout] 70 | ... .into_shape((1, mat.shape()[1])) [INFO] [stdout] | ^^^^^ method cannot be called on `&ArrayBase, (usize, usize)>` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] = note: the following trait bounds were not satisfied: [INFO] [stdout] `(usize, usize): Dimension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/accuracy/test.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | let target = Array::from_vec(vec![1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0]); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/accuracy/test.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | rf.fit(&train, &target); [INFO] [stdout] | ^^^^^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/accuracy/test.rs:24:24 [INFO] [stdout] | [INFO] [stdout] 24 | rf.fit(&train, &target); [INFO] [stdout] | ^^^^^^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/accuracy/test.rs:26:31 [INFO] [stdout] | [INFO] [stdout] 26 | let pred = rf.predict(&train).ok().unwrap(); [INFO] [stdout] | ^^^^^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::numeric::impl_numeric::>::all_close`: Use `abs_diff_eq` - it requires the `approx` crate feature [INFO] [stdout] --> src/accuracy/test.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | assert!(target.all_close(&pred, 0.3)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `usize: Dimension` is not satisfied [INFO] [stdout] --> src/accuracy/test.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | assert!(target.all_close(&pred, 0.3)); [INFO] [stdout] | ^^^^^^^^^ the trait `Dimension` is not implemented for `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `ndarray::impl_constructors::>>::from_vec`: use standard `from` [INFO] [stdout] --> src/accuracy/test.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | let y = Array::from_vec((0..rows) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `choose` found for struct `ThreadRng` in the current scope [INFO] [stdout] --> src/accuracy/test.rs:42:51 [INFO] [stdout] | [INFO] [stdout] 42 | ... .map(|_| *rng.choose(&vec![0.0, 1.0][..]).unwrap()) [INFO] [stdout] | ^^^^^^ method not found in `ThreadRng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/accuracy/test.rs:48:20 [INFO] [stdout] | [INFO] [stdout] 48 | rf.fit(&x, &y); [INFO] [stdout] | ^^ expected tuple, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, (usize, usize)>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 2]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/accuracy/test.rs:48:24 [INFO] [stdout] | [INFO] [stdout] 48 | rf.fit(&x, &y); [INFO] [stdout] | ^^ expected `usize`, found struct `Dim` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&ArrayBase, usize>` [INFO] [stdout] found reference `&ArrayBase, Dim<[usize; 1]>>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ascii::AsciiExt` [INFO] [stdout] --> src/tfidf_helper/tfidf_helper.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ascii::AsciiExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 70 previous errors; 22 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0432, E0557, E0599, E0608. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "bdaa06d8d2d3acfde674a0e552e345a71518ff1949b96366c2578cb98904bc7e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bdaa06d8d2d3acfde674a0e552e345a71518ff1949b96366c2578cb98904bc7e", kill_on_drop: false }` [INFO] [stdout] bdaa06d8d2d3acfde674a0e552e345a71518ff1949b96366c2578cb98904bc7e