Skip to content

Commit 775803c

Browse files
committed
Update README.md
1 parent 0715d4b commit 775803c

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,24 @@ train = (feature1=rand(100), feature2=rand(100), target=rand(1:2, 100))
2626
test = (feature1=rand(20), feature2=rand(20))
2727
```
2828

29-
One can train a learning `model` (e.g. `RandomForestClassifier`) with
30-
the `train` table:
29+
It is possible train a learning `model` (e.g. `RandomForestClassifier`) with
30+
the `train` table to approximate a `:target` label and perform predictions
31+
with the `test` table:
3132

3233
```julia
3334
model = RandomForestClassifier()
34-
35-
learn = Learn(train, model, ["feature1","feature2"] => "target")
35+
learn = Learn(label(train, :target); model)
36+
preds = learn(test)
3637
```
3738

38-
and apply the trained `model` to the `test` table:
39-
40-
```julia
41-
pred = learn(test)
42-
```
39+
The function `label` is used to tag columns of the table with target labels,
40+
which can be categorical or continuous. All remaining columns are assumed to
41+
be predictors.
4342

4443
The package exports native Julia models from various packages
4544
in the ecosystem. It is also possible to use models from the
4645
[MLJ.jl](https://github.com/JuliaAI/MLJ.jl) stack.
4746

48-
The combination of TableTransforms.jl with StatsLearnModels.jl
49-
can be thought of as a powerful alternative to MLJ.jl.
50-
5147
[build-img]: https://img.shields.io/github/actions/workflow/status/JuliaML/StatsLearnModels.jl/CI.yml?branch=main&style=flat-square
5248
[build-url]: https://github.com/JuliaML/StatsLearnModels.jl/actions
5349

0 commit comments

Comments
 (0)