test/
test.rs

1use error_predictive_learning::*;
2
3pub fn lin(ws: &[f64]) -> f64 {
4    utils::cmp(20, 0.0, 6.283185307179586,
5        |x| x.sin(),
6        |x| (x - 0.25 * ws[0]).cos())
7}
8
9fn main() {
10    let settings = TrainingSettings {
11        accuracy_error: 0.0,
12        step: 0.00000000000000000000001,
13        max_iterations: 1000000000000,
14        error_predictions: 3,
15        reset_interval: 40200,
16        elasticity: 1.55,
17        debug: true,
18    };
19    let weights = [6.283185176129033];
20    println!("{:?}", train(settings, &weights, lin));
21}