Crates.io | elm |
lib.rs | elm |
version | 0.3.2 |
source | src |
created_at | 2023-12-10 05:32:22.227146 |
updated_at | 2024-01-13 20:35:04.591679 |
description | A minimalist framework for Extreme Learning Machines (ELMs). |
homepage | |
repository | https://github.com/mbfernan/elm.git |
max_upload_size | |
id | 1064046 |
size | 28,149 |
Extreme Learning Machine (ELM) crate. A minimalistic and flexible crate that can be used to train ELMs, a type of Neural Networks. Currently supports a single hidden layer and regression tasks.
References:
Original paper: https://ieeexplore.ieee.org/document/1380068
Wikipedia: https://en.wikipedia.org/wiki/Extreme_learning_machine
use elm::{ELM, Epsilon};
use elm::activation_functions::ActivationFunction;
let mut elm = ELM::new(2, 4, 2, ActivationFunction::LeakyReLU, Epsilon::Default);
let inputs: Vec<Vec<f64>> = vec![vec![1.0, 0.0], vec![1.0, 0.0]];
let targets: Vec<Vec<f64>> = vec![vec![1.0, 1.0], vec![1.0, 1.5]];
elm.train(&inputs, &targets);
let new_inputs: Vec<Vec<f64>> = vec![vec![1.0, 4.0], vec![1.3, 0.6]];
let prediction = elm.predict(&new_inputs);