-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The following example shows how to manually plot the trees learned in DecisionTree.jl:
https://github.com/JuliaAI/TreeRecipe.jl/blob/master/examples/DecisionTree_iris.jl
Currently, the way to integrate a plot recipe in MLJ.jl is not documented, but is sketched in this comment.
So, can we somehow put this together to arrange that a workflow like this generates a plot of a decision tree?
edited again (x2):
using MLJBase
using Plots # <---- added in edit
import MLJDecisionTreeInterface
tree = MLJDecisionTreeInterface.DecisionTreeClassifier()
X, y = @load_iris
mach = machine(tree, X, y) |> fit!
plot(mach, 0.8, 0.7; size = (1400,600))) # <---- added in edit
Note: It used to be that you made RecipesBase.jl your dependency, to avoid a full Plots.jl dependency. But now the recipes live in Plots.jl and you are expected to make Plots.jl a weak dependency. You can see an example of this here.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
priority low / involved