DARJEELING
Machine learning and data manipulation tools for Rust
Contact
Installation
Add the following to your Cargo.toml file
darjeeling = "0.3.1"
Examples
Machine Learning Networks
Categorization
This program reads from a file containing all possible inputs to a binary logic gate, and all the correct answers.
Then it trains a model with 1 hidden layer. 2 nodes in its input layer, because there are two inputs. 2 Nodes for its output layer because there are two possible answers(the "brighter" one is selected a the chosen answer) And 2 nodes in its hidden layer, because I like patterns.
If this doesn't work, check the tests.ts source code for verified working code.
Hint: Try fiddling with the learning rate you're using if things aren't working properly.
Different problems work differently with different learning rates, although I recommend one of 0.5 to start.
use ;
use ;
use ;
// This isn't very important, this just reads the file you want to and format it as Inputs
Generation
This program doesn't have a large enough dataset to get interesting results. All it does is just create a network and
use ;
// A file with data
// To make sure the networked is properly trained, make sure it follows some sort of pattern
// This is just sample data, for accurate results, around 3800 datapoints is needed
// 1 2 3 4 5 6 7 8
// 3 2 5 4 7 6 1 8
// 0 2 5 4 3 6 1 8
// 7 2 3 4 9 6 1 8
// You also need to write the file input function
// Automatic file reading and formatting function coming soon
let mut data: = file;
let mut net = new;
let learning_rate = 1.0;
let model_name = net.learn.unwrap;
let new_data: = net.test.unwrap;
TODO:
- Add Support for Polars Dataframes
Dataframes are now deprecated