dumb_ai/
lib.rs

1#![allow(non_snake_case)]
2#![allow(dead_code)]
3
4pub mod ais;
5pub mod tools;
6
7pub use ais::train_ai::*;
8pub use std::vec;
9pub use tools::*;
10pub use vector_tools::*;
11pub use ais::ai::*;
12pub use ais::train_ai::*;
13pub use ais::test_ai::*;
14
15pub use crate::{ais::{ai::ToAI, test_ai::test_ai}, tools::vector_tools::{ToVectorOfVector, ToCorrectAmount}};
16
17pub fn run() {
18    let first_trimester_avg = vec![
19        vec![16.4, 12.2], vec![18.4, 15.5], vec![19.2, 18.7],vec![12.4, 11.2], vec![19.4, 18.5], vec![7.2, 9.7]
20    ];
21    let third_trimester_avg = vec![
22        vec![16.5, 12.75], vec![19.4, 16.25], vec![18.7, 19.2], vec![14.2, 11.2], vec![19.4, 18.2], vec![11.6, 12.9]
23    ];
24
25    let test_data_first = vec![
26        vec![18.2, 17.2], vec![19.3, 18.2], vec![16.4, 12.2]
27    ];
28
29    let test_data_second = vec![
30        vec![19.2, 18.2], vec![18.9, 17.3], vec![16.5, 12.6]
31    ];
32
33    let ai = train_ai(first_trimester_avg, third_trimester_avg, 20.0, 0.0001).to_ai();
34
35    println!(
36        "{:#?}",
37        // test_ai(ai, test_data_first, test_data_second, false),
38        vec![0.6, 19.3, 19.3, 10.2].to_vector_of_vector().to_correct_amount(2)
39    ); 
40}