Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



50 Commits

Repository files navigation


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.


extern crate openml;

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

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

    println!("Task: {}",;

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

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


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


  • 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 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


  • implementations of machine learning algorithms