Julia下的混合集成学习包:Orchestra

jopen 9年前

Orchestra是Julia编程语言的一个异构集成学习包。它由一个统一的机器学习API驱动,是Julia下对Scikit-Learn和Carret的统一。

入门

We will cover how to predict on a dataset using Orchestra.

获取数据

A tabular dataset will be used to obtain our instances and labels.

This will be split it into a training and test set using holdout method.

import RDatasets  using Orchestra.Util  using Orchestra.Transformers    # Obtain instances and labels  dataset = RDatasets.dataset("datasets", "iris")  instances = array(dataset[:, 1:(end-1)])  labels = array(dataset[:, end])    # Split into training and test sets  (train_ind, test_ind) = holdout(size(instances, 1), 0.3)

Create a Learner

A transformer processes instances in some form. Coincidentally, a learner is a subtype of transformer.

A transformer can be created by instantiating it, taking an options dictionary as an optional argument.

All transformers, including learners are called in the same way.

# Learner with default settings  learner = PrunedTree()    # Learner with some of the default settings overriden  learner = PrunedTree({    :impl_options => {      :purity_threshold => 0.5    }  })    # All learners are called in the same way.  learner = StackEnsemble({    :learners => [      PrunedTree(),       RandomForest(),      DecisionStumpAdaboost()    ],     :stacker => RandomForest()  })

项目主页:http://www.open-open.com/lib/view/home/1426142887638