sklears-neural 0.1.1

Neural network implementations for the sklears machine learning library
Documentation
//! Neural network implementations for the sklears machine learning library.
//!
//! This crate provides implementations of neural network algorithms compatible with
//! the scikit-learn API, including Multi-Layer Perceptron (MLP) for classification
//! and regression tasks.
//!
//! # Examples
//!
//! ```rust,ignore
//! use sklears_neural::{MLPClassifier, Activation};
//! use sklears_core::traits::{Predict};
//! use scirs2_core::ndarray::Array2;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let x = Array2::from_shape_vec((4, 2), vec![
//!     0.0, 0.0,
//!     0.0, 1.0,
//!     1.0, 0.0,
//!     1.0, 1.0,
//! ])?;
//! let y = vec![0, 1, 1, 0]; // XOR problem
//!
//! let mlp = MLPClassifier::new()
//!     .hidden_layer_sizes(&[10, 5])
//!     .activation(Activation::Relu)
//!     .max_iter(1000)
//!     .learning_rate_init(0.01)
//!     .random_state(42);
//!
//! let trained_mlp = mlp.fit(&x, &y)?;
//! let predictions = trained_mlp.predict(&x)?;
//! # Ok(())
//! # }
//! ```

pub mod activation;
pub mod attention_rnn;
pub mod autoencoder;
pub mod benchmarking;
pub mod checkpointing;
pub mod config;
pub mod conv_layers;
pub mod curriculum;
pub mod data_augmentation;
pub mod diffusion;
/// Distributed training utilities
pub mod distributed;
pub mod ebm;
pub mod evolutionary_nas;
pub mod experiment_tracking;
pub mod gan;
pub mod gnn;
pub mod gpu;
/// Numerical gradient checking for verifying analytic gradients
pub mod gradient_checking;
pub mod interpretation;
pub mod knowledge_distillation;
pub mod layers;
pub mod memory_leak_tests;
pub mod mlp_classifier;
pub mod mlp_regressor;
/// Cross-validation and model selection utilities
pub mod model_selection;
pub mod models;
pub mod multi_agent_rl;
pub mod multi_task;
pub mod nas;
pub mod neural_metrics;
pub mod normalizing_flows;
pub mod once_for_all;
pub mod performance_testing;
pub mod quantization;
pub mod rbm;
pub mod regularization;
pub mod reinforcement_learning;
/// Self-supervised and contrastive learning methods
pub mod self_supervised;
pub mod seq2seq;
pub mod solvers;
pub mod transfer_learning;
pub mod transformer;
pub mod utils;
pub mod vae;
pub mod validation;
/// Model versioning and change tracking
pub mod versioning;
pub mod visualization;
pub mod weight_init;

pub use activation::*;
pub use attention_rnn::*;
pub use autoencoder::*;
pub use benchmarking::*;
pub use checkpointing::*;
pub use config::*;
pub use conv_layers::*;
pub use curriculum::*;
pub use data_augmentation::*;
pub use diffusion::*;
pub use distributed::*;
pub use ebm::*;
pub use evolutionary_nas::*;
pub use experiment_tracking::*;
pub use gan::*;
pub use gnn::*;
pub use gpu::*;
pub use gradient_checking::*;
pub use interpretation::*;
pub use knowledge_distillation::*;
pub use layers::*;
pub use memory_leak_tests::*;
pub use mlp_classifier::*;
pub use mlp_regressor::*;
pub use model_selection::*;
pub use models::*;
pub use multi_agent_rl::*;
pub use multi_task::*;
pub use nas::*;
pub use neural_metrics::*;
pub use normalizing_flows::*;
pub use once_for_all::*;
pub use performance_testing::*;
pub use quantization::*;
pub use rbm::*;
pub use regularization::*;
pub use reinforcement_learning::*;
pub use self_supervised::*;
pub use seq2seq::*;
pub use solvers::*;
pub use transfer_learning::*;
pub use transformer::*;
pub use utils::*;
pub use vae::*;
pub use validation::*;
pub use versioning::*;
pub use visualization::*;
pub use weight_init::*;

#[allow(non_snake_case)]
#[cfg(test)]
mod test_simple;

#[allow(non_snake_case)]
#[cfg(test)]
mod advanced_property_tests;

use sklears_core::error::SklearsError;

/// Result type for neural network operations
pub type NeuralResult<T> = Result<T, SklearsError>;