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

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed Mar 25, 2021
1 parent 3bd8cc0 commit 0cdf60b
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# MLJSerialization.jl

| Linux | Coverage |
| :-----------: | :------: |
| [![Build status](https://github.com/JuliaAI/MLJSerialization.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/MLJSerialization.jl/actions)| [![codecov.io](http://codecov.io/github/JuliaAI/MLJSerialization.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaAI/MLJSerialization.jl?branch=master) |

A package providing integration of [Serialization](https://www.openml.org) with the
[MLJ](https://alan-turing-institute.github.io/MLJ.jl/dev/) machine
learning framework.


## Installation

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

## Sample usage

Fit and save a decision tree model:

```julia
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:

```julia
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](https://alan-turing-institute.github.io/MLJ.jl/dev/machines/#Saving-machines-1)
section of the
[MLJManual](https://alan-turing-institute.github.io/MLJ.jl/dev/)


0 comments on commit 0cdf60b

Please sign in to comment.