JuliaAI / JuliaAI/MLJDecisionTreeInterface.jl
Plotting trees with TreeRecipe.jl
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 9
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/DecisionTree_iris.jl in TreeRecipe.jl and the MLJBase pull-request comment linked in the issue; compare them with MLJDecisionTreeInterface.DecisionTreeClassifier and the machine/plot example. Done means the shown MLJBase workflow can plot a decision tree, with the Plots integration handled as a weak dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data-visualization, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100