dendritic_preprocessing/lib.rs
1
2//! # Dendritic Preprocessing Crate
3//!
4//! This crate contains functionality for performing normalization of data during the preprocessing stage for a model.
5//! Contains preprocessing for encoding and standard scaling.
6//!
7//! ## Features
8//! - **Standard Scalar**: Standard scalar and min max normlization of data.
9//! - **Encoding**: One hot encoding for multi class data
10//!
11//! ## Example Usage
12//! This is an example of using the one hot encoder for data with multiple class labels
13//! ```rust
14//! use dendritic_ndarray::ndarray::NDArray;
15//! use dendritic_preprocessing::encoding::{OneHotEncoding};
16//!
17//! fn main() {
18//!
19//! // Data to one hot encode for multi class classification
20//! let x = NDArray::array(vec![10, 1], vec![
21//! 1.0,2.0,0.0,2.0,0.0,
22//! 0.0,1.0,0.0,2.0,2.0
23//! ]).unwrap();
24//!
25//! let mut encoder = OneHotEncoding::new(x).unwrap();
26//! println!("Max Value: {:?}", encoder.max_value()); // 3.0
27//! println!("Num Samples: {:?}", encoder.num_samples()); // 10.0
28//!
29//! let encoded_vals = encoder.transform();
30//! println!("Encoded Values: {:?}", encoded_vals);
31//!
32//! }
33//! ```
34//! ## Disclaimer
35//! The dendritic project is a toy machine learning library built for learning and research purposes.
36//! It is not advised by the maintainer to use this library as a production ready machine learning library.
37//! This is a project that is still very much a work in progress.
38pub mod standard_scalar;
39pub mod encoding;