A rust interface to OpenML

Overview

openml-rust

A rust interface to OpenML.

The aim of this crate is to give rust code access to Machine Learning data hosted by OpenML. Thus, Machine Learning algorithms developed in Rust can be easily applied to state-of-the-art data sets and their performance compared to existing implementations in a reproducable way.

Example

= task.run(|train, test| { // train classifier let nbc: NaiveBayesClassifier = train .map(|(x, y)| (x, y)) .collect(); // test classifier let y_out: Vec<_> = test .map(|x| nbc.predict(x)) .collect(); Box::new(y_out.into_iter()) }); println!("Classification Accuracy: {}", result.result()); }">
extern crate openml;

use openml::prelude::*;
use openml::{PredictiveAccuracy, SupervisedClassification};
use openml::baseline::NaiveBayesClassifier;

fn main() {
    // Load "Supervised Classification on iris" task (https://www.openml.org/t/59)
    let task = SupervisedClassification::from_openml(59).unwrap();

    println!("Task: {}", task.name());

    // run the task
    let result: PredictiveAccuracy<_> = task.run(|train, test| {
        // train classifier
        let nbc: NaiveBayesClassifier<u8> = train
            .map(|(x, y)| (x, y))
            .collect();

        // test classifier
        let y_out: Vec<_> = test
            .map(|x| nbc.predict(x))
            .collect();

        Box::new(y_out.into_iter())
    });

    println!("Classification Accuracy: {}", result.result());
}

Goals

  • get data sets
  • get tasks
    • Runtime check panics if the wrong task type is loaded (SupervisedRegression attempts to load a Clustering Task)
  • get split sets
  • task types
    • Supervised Classification
    • Supervised Regression
    • Learning Curve
    • Clustering
  • run tasks
    • runner takes a closure where the user defines learning and prediction
  • make openml.org optional (manual construction of tasks)

Future Maybe-Goals

  • flow support
  • run support
  • full OpenML API support
  • authentication
  • more tasks
    • Supervised Datastream Classification
    • Machine Learning Challenge
    • Survival Analysis
    • Subgroup Discovery

Non-Goals

  • implementations of machine learning algorithms
Comments
  • Add Regression Example

    Add Regression Example

    We have a Naive Bayes Classifier for classification examples. It would be nice to have something similar for regression (and in future for other tasks as well).

    However, I'm not sure what would be a useful and simple regression model... A few options come to mind:

    • Constant model: simply predict the mean of the training targets. Seems too naive.
    • Linear regression: I'd rather like to avoid linear algebra in this crate.
    • Independent univariate linear regressions on each feature, then select the best one: Seems promising, but there may be better options.
    opened by mbillingr 0
  • Need better unit tests

    Need better unit tests

    We have a few tests right now, but they are more like integration tests running on the whole system. They do not run on CI either, because I'm not sure if that would create too much traffic, making the openml servers angry...

    It would be good to have independent unit tests for each component like downloader, cache, and API structures.

    opened by mbillingr 0
  • Unsuccessful downloads create cache entry

    Unsuccessful downloads create cache entry

    When a download times out reqwest creates a cache file anyway. This file has zero size and causes read errors on subsequent load attempts.

    TODO:

    • [ ] Do not create invalid cache files
    • [ ] Re-download obviously invalid cache files
    bug 
    opened by mbillingr 0
  • Upgrade to `impl Trait`

    Upgrade to `impl Trait`

    Now that impl Trait has been stabilized it is finally possible to get rid of these pesky Box<Iterator> return type requirements in the task runner closures.

    breaking change 
    opened by mbillingr 0
  • Documentation

    Documentation

    Hi @mbillingr,

    Thanks for creating this! Would it be good if we add a page about this in the official OpenmML docs? https://docs.openml.org/APIs/

    It can either be a .md file, like this one: https://github.com/openml/OpenML/blob/master/docs/docs/Java-guide.md

    Or, if you create your own documentation page (e.g. with readthedocs), we can link to that, as we do for the Python API.

    Thanks again! Joaquin

    opened by joaquinvanschoren 1
Releases(v0.1.2)
Owner
null
Command line interface for BDSP RNG, primarily used as a reference implementation and as a tool for testing.

BDSP RNG Reference This is a command line interface for BDSP RNG, primarily used as a reference implementation and as a tool for testing. Building Bui

Zak 2 Nov 20, 2022
Msgpack serialization/deserialization library for Python, written in Rust using PyO3, and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

Aviram Hassan 139 Dec 30, 2022
Practice repo for learning Rust. Currently going through "Rust for JavaScript Developers" course.

rust-practice ?? Practice repo for learning Rust. Directories /rust-for-js-dev Files directed towards "Rust for JavaScript Developers" course. Thank y

Sammy Samkough 0 Dec 25, 2021
A Rust library with homemade machine learning models to classify the MNIST dataset. Built in an attempt to get familiar with advanced Rust concepts.

mnist-classifier Ideas UPDATED: Finish CLI Flags Parallelize conputationally intensive functions Class-based naive bayes README Image parsing Confusio

Neil Kaushikkar 0 Sep 2, 2021
🦀Rust Turkiye - Rust Dersleri

Rust Turkiye - Rust Dersleri CURIOSITY - Featuring Richard Feynman Bu repo Rust Turkiye tarafindan duzenlenen Rust Dersleri egitiminin alistirma ve ko

Theo M. Bulut 12 Jan 14, 2023
A Rust machine learning framework.

Linfa linfa (Italian) / sap (English): The vital circulating fluid of a plant. linfa aims to provide a comprehensive toolkit to build Machine Learning

Rust-ML 2.2k Jan 2, 2023
Machine Learning library for Rust

rusty-machine This library is no longer actively maintained. The crate is currently on version 0.5.4. Read the API Documentation to learn more. And he

James Lucas 1.2k Dec 31, 2022
Rust library for Self Organising Maps (SOM).

RusticSOM Rust library for Self Organising Maps (SOM). Using this Crate Add rusticsom as a dependency in Cargo.toml [dependencies] rusticsom = "1.1.0"

Avinash Shenoy 26 Oct 17, 2022
Rust language bindings for TensorFlow

TensorFlow Rust provides idiomatic Rust language bindings for TensorFlow. Notice: This project is still under active development and not guaranteed to

null 4.1k Jan 1, 2023
Machine learning crate for Rust

rustlearn A machine learning package for Rust. For full usage details, see the API documentation. Introduction This crate contains reasonably effectiv

Maciej Kula 547 Dec 28, 2022
Rust bindings for the C++ api of PyTorch.

tch-rs Rust bindings for the C++ api of PyTorch. The goal of the tch crate is to provide some thin wrappers around the C++ PyTorch api (a.k.a. libtorc

Laurent Mazare 2.3k Jan 1, 2023
个人的 rust 学习资料

?? 通知: 项目文档迁移到: https://github.com/higker/learn-rust learning-rust-zh 个人的 rust 学习资料 学习目录 目录 源代码地址 相关解析 第一个rust程序 https://github.com/higker/learning-ru

Jarvib Ding 16 Jun 21, 2022
Distributed compute platform implemented in Rust, and powered by Apache Arrow.

Ballista: Distributed Compute Platform Overview Ballista is a distributed compute platform primarily implemented in Rust, powered by Apache Arrow. It

Ballista 2.3k Jan 3, 2023
Tensors and differentiable operations (like TensorFlow) in Rust

autograd Differentiable operations and tensors backed by ndarray. Motivation Machine learning is one of the field where Rust lagging behind other lang

Ryo ASAKURA 403 Dec 25, 2022
Rust numeric library with R, MATLAB & Python syntax

Peroxide Rust numeric library contains linear algebra, numerical analysis, statistics and machine learning tools with R, MATLAB, Python like macros. W

Tae Geun Kim 351 Dec 29, 2022
A fast, safe and easy to use reinforcement learning framework in Rust.

RSRL (api) Reinforcement learning should be fast, safe and easy to use. Overview rsrl provides generic constructs for reinforcement learning (RL) expe

Thomas Spooner 139 Dec 13, 2022
Neural networks in Rust

deeplearn-rs Deep learning in Rust! This is my first shot at this. It's mostly just a proof of concept right now. The API will change. Status We have

Theodore DeRego 199 Oct 23, 2022
A deep learning library for rust

Alumina An experimental deep learning library written in pure rust. Breakage expected on each release in the short term. See mnist.rs in examples or R

zza 95 Nov 30, 2022
Machine learning in Rust.

Rustml Rustml is a library for doing machine learning in Rust. The documentation of the project with a descprition of the modules can be found here. F

null 60 Dec 15, 2022