You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, have a look at these [classification](https://github.com/cstjean/ScikitLearn.jl/blob/master/examples/Classifier_Comparison_Julia.ipynb) and [regression](https://github.com/cstjean/ScikitLearn.jl/blob/master/examples/Decision_Tree_Regression_Julia.ipynb) notebooks.
Models can be saved to disk and loaded back with the use of the [JLD2.jl](https://github.com/JuliaIO/JLD2.jl) package.
307
+
```julia
308
+
using JLD2
309
+
@save"model_file.jld2" model
310
+
```
311
+
Note that even though features and labels of type `Array{Any}` are supported, it is highly recommended that data be cast to explicit types (ie with `float.(), string.()`, etc). This significantly improves model training and prediction execution times, and also drastically reduces the size of saved models.
312
+
288
313
## MLJ.jl API
289
314
290
315
To use DecsionTree.jl models in
@@ -318,15 +343,6 @@ The following methods provide measures of feature importance for all models:
318
343
`impurity_importance`, `split_importance`, `permutation_importance`. Query the document
319
344
strings for details.
320
345
321
-
322
-
## Saving Models
323
-
Models can be saved to disk and loaded back with the use of the [JLD2.jl](https://github.com/JuliaIO/JLD2.jl) package.
324
-
```julia
325
-
using JLD2
326
-
@save"model_file.jld2" model
327
-
```
328
-
Note that even though features and labels of type `Array{Any}` are supported, it is highly recommended that data be cast to explicit types (ie with `float.(), string.()`, etc). This significantly improves model training and prediction execution times, and also drastically reduces the size of saved models.
329
-
330
346
## Visualization
331
347
A `DecisionTree` model can be visualized using the `print_tree`-function of its native interface
332
348
(for an example see above in section 'Classification Example').
@@ -335,3 +351,34 @@ In addition, an abstraction layer using `AbstractTrees.jl` has been implemented
335
351
336
352
Apart from this, `AbstractTrees.jl` brings its own implementation of `print_tree`.
0 commit comments