Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

JuliaAI/MLJSerialization.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLJSerialization.jl

As of MLJ 0.18, this package is no longer a dependecy of MLJ, with serialization functionality provided by MLJBase 0.20

Linux Coverage
Build status codecov.io

A package adding model serialization to the MLJ machine learning framework.

Installation

using Pkg
Pkg.add("MLJ")
Pkg.add("MLJSerialization")

Sample usage

Fit and save a decision tree model:

Pkg.add("DecisionTree")

using MLJ
using MLJSerialization

X, y = @load_iris

Tree = @load DecisionTreeClassifier pkg=DecisionTree
tree = Tree()
mach = fit!(machine(tree, X, y))
MLJSerialization.save("my_machine.jlso", mach)

Retrieve the saved machine:

mach2 = machine("my_machine.jlso")

Xnew = selectrows(X, 1:3)
predict_mode(mach2, Xnew)

julia> predict_mode(mach2, Xnew)
3-element CategoricalArrays.CategoricalArray{String,1,UInt32}:
 "setosa"
 "setosa"
 "setosa"

Documentation

Documentation is provided in the Saving machines section of the MLJManual

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages