How to adapt to breaking change in `fit` and `predict` for DecisionTree.jl models
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- julia
调研方向
首先查看 issue 正文中关于 MMI.fit、MMI.predict、reformat 和 selectrows 的迁移示例。完成标准是记录向后兼容的调用形式和子采样规则;payload 未指定任何仓库文件、测试或入口点。
由索引模型根据 Issue 内容生成。
描述
Version 0.3.1 (to be yanked) and version 0.4 introduced a breaking change to MLJModelInterface.fit and MLJModelInterface.predict for all 5 models. This change only effects developers who directly call those functions. Regular MLJ users who interact through the usual "machine" interface are not affected.
What changed is that the models mentioned now implement the MLJModelInterface data-front end. The most likely reason for breakage is that fit and predict are not being called with the model-specific form of data generated by the reformat method. This post describes a backwards-compatible fix.
Adding the model-specific pre-processor reformat to your fit/predict calls
If you are not already using reformat in your fit and predict calls then, where you previously made a call
MMI.fit(model, verbosity, data...) # MMI = MLJModelInterface
you instead want
MMI.fit(model, verbosity, MMI.reformat(model, data...)...)
And instead of
MMI.predict(model, fitresult, Xnew)
you want
MMI.predict(model, fitresult, MMI.reformat(model, Xnew)...)
You have backwards compatibility because the fallback for reformat just slurps the data. This also means you can change these calls for all models (not just the DecisionTree ones).
Subsampling
If you subsample reformatted data before passing to fit or predict, you should always use subsampled_data = selectrows(model, I, reformatted_data...) where I is the indices for subsampling.
- 主要语言
- Julia
- 星标
- 9
- 派生
- 3
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaAI/MLJDecisionTreeInterface.jl 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
JuliaAI/MLJDecisionTreeInterface.jl#59 · 1 条评论 ·
-
Plotting trees with TreeRecipe.jl可能重新可做 @adarshpalaskar1 于 995 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
JuliaAI/MLJDecisionTreeInterface.jl#56 · 3 条评论 ·
查看 JuliaAI/MLJDecisionTreeInterface.jl 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 72/100
SciML/PETScDiffEq.jl#438 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
Sienna-Platform/PowerSimulations.jl#1737 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
FluxML/Optimisers.jl#254 ·
-
Minor: floodplain warning percentage, scalar output error message and a never-true identity check未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复