https://github.com/axect/noisy_candle
A Rust project showcasing regression on noisy data using machine learning libraries.
https://github.com/axect/noisy_candle
machine-learning rust
Last synced: 3 months ago
JSON representation
A Rust project showcasing regression on noisy data using machine learning libraries.
- Host: GitHub
- URL: https://github.com/axect/noisy_candle
- Owner: Axect
- License: mit
- Created: 2024-03-27T07:48:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-30T14:41:29.000Z (about 1 year ago)
- Last Synced: 2025-03-19T22:17:26.867Z (3 months ago)
- Topics: machine-learning, rust
- Language: Rust
- Homepage:
- Size: 1.04 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Noisy Regression with Candle
This project demonstrates how to perform regression on noisy data using various Rust libraries for machine learning. The main libraries used in this project are:
- `peroxide`: A library for data generation, preprocessing and visualization
- `candle`: A library for defining and training machine learning models
- `rayon`: A library for parallel processing
- `indicatif`: A library for progress tracking and visualization## Key Features
1. Dataset Generation and Preprocessing
- Generate noisy data using the `peroxide` library.
- Split the data into train, validation, and test sets.
- Scale the data using scalers such as `MinMaxScaler`, `StandardScaler`, and `RobustScaler`.2. Model Definition and Training
- Define an MLP (Multi-Layer Perceptron) model using the `candle` library.
- Train the model using the Adam optimizer.
- Track the training progress using the `indicatif` library.3. Model Evaluation and Visualization
- Evaluate the trained model on the test dataset and calculate the MSE.
- Visualize the predictions using `plot` feature of `peroxide` library.## Prerequisites
- Rust
- Python
- Required python libraries
- `matplotlib`
- `scienceplots` (optional)## Usage
Just run the Rust code:
```sh
cargo run --release
```## Results
- The training and validation losses are printed during the training process.
- The MSE on the test dataset is displayed after the model evaluation.
- The predicted results are visualized and saved to the `test_plot.png` file.
## LICENSE
This project is licensed under the MIT license.