Giter Club home page Giter Club logo

concision's Introduction

Concision

crates.io docs.rs

clippy rust


The library is currently in the early stages of development and is not yet ready for production use.

Concision is designed to be a complete toolkit for building machine learning models in Rust.

Concision is a machine learning library for building powerful models in Rust prioritizing ease-of-use, efficiency, and flexability. The library is built to make use of the both the upcoming autodiff experimental feature and increased support for generics in the 2024 edition of Rust.

Getting Started

Building from the source

Start by cloning the repository

git clone https://github.com/FL03/concision.git
cd concision
cargo build --features full -r --workspace

Usage

Example: Linear Model (biased)

    extern crate concision as cnc;

    use cnc::prelude::{linarr, Linear, Result, Sigmoid};
    use ndarray::Ix2;

    fn main() -> Result<()> {
        tracing_subscriber::fmt::init();
        tracing::info!("Starting linear model example");

        let (samples, d_in, d_out) = (20, 5, 3);
        let data = linarr::<f64, Ix2>((samples, d_in)).unwrap();

        let model = Linear::<f64>::from_features(d_in, d_out).uniform();
        // let model = Linear::<f64, cnc::linear::Unbiased>::from_features(d_in, d_out).uniform();

        assert!(model.is_biased());

        let y = model.activate(&data, Sigmoid::sigmoid).unwrap();
        assert_eq!(y.dim(), (samples, d_out));
        println!("Predictions:\n{:?}", &y);

        Ok(())
    }

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

concision's People

Contributors

dependabot[bot] avatar fl03 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

concision's Issues

Reinforcement Learning

Reinforcement learning is a type of machine learning that involves training an agent to take actions that maximize a reward signal.

Description
Implement a complete framework for building reinforcement learning models in pure Rust.

Scaled Dot-Product Attention

Formula

$$\text{Attention}\left({Q, K, V}\right)=\text{softmax}\left(\frac{Q\cdot{K^T}}{\sqrt{d_k}}\right)\cdot{V}$$

Tracking issue for the `Transformer` model

The transformer model was introduced in 2017 with the release of the Attention is all you need paper. Over the last few years, the popularity of the Transformer model has grown exponentially due to its abilities in natural language processing (NLP) workloads.

Transformers are mathematically simply, primarily relying on dot-product / matrix multiplication algorithms.

Issues

Pull Requests

Resources

Bayesian Network

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Multi-Head Attention

General Formula

$$\text{MultiHead}({Q, K, V}) = \text{concat}({\textbf{z}_0, ..., \textbf{z}_n })\cdot{W^O}$$

Update the Artificial Neurons

Artificial neurons are given two free-parameters, bias and weights, that are to be learned through training. The bias describes an array of values that don't require any input to have an affect.

Decision Trees

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Clustering

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Update the casual convolution function

The casual convolution function currently considers two array's of equal dimensions, however, the generated kernel is defined to be a one-dimensional array by the 'kernel_dplr' function.

Neural Networks

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Implement an `NdTensor` trait

This trait should unify all numeric operators implemented in the crate and streamline several additional processes.

Implement the State-Space Model Scanner

In the paper, the Annotated S4, they leverage the scan function from jax. While Rust has a well-developed scan feature present in iterators, it seems to differ in execution than the one from jax.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.