MLJIteration.jl

A package for wrapping iterative MLJ models in a control strategy
Author JuliaAI
Popularity
10 Stars
Updated Last
4 Months Ago
Started In
March 2021

MLJIteration.jl

Linux Coverage Documentation
Build status codecov.io docs

A package for wrapping iterative models provided by the MLJ machine learning framework in a control strategy.

Builds on the generic iteration control tool IterationControl.jl.

Installation

Included as part of MLJ installation.

Alternatively, for a "minimal" installation:

using Pkg
Pkg.add("MLJBase")
Pkg.add("MLJIteration")
Pkg.add("MLJModels")     # to load models

Sample usage

Assuming MLJ is installed:

Pkg.add("EvoTrees")

using MLJ

X, y = make_moons(1000, rng=123)
EvoTreeClassifier = @load EvoTreeClassifier verbosity=0

iterated_model = IteratedModel(model=EvoTreeClassifier(rng=123, η=0.005),
                               resampling=Holdout(rng=123),
                               measures=log_loss,
                               controls=[Step(5),
                                         Patience(2),
                                         NumberLimit(100)],
                               retrain=true)

mach = machine(iterated_model, X, y) |> fit!;

Documentation

See the Controlling Iterative Models section of the MLJ manual.