Closed juliohm closed 1 year ago
Thanks for reporting @juliohm.
Yes, MLJDecisionTreeInterface.jl 0.3.1 should have been tagged breaking. The issue was previously reported here. We are working on 0.4 and will be yanking 0.3.1. But you should be able to make a backwards compatible fix in any case.
What changed is that trees implemented the MLJModelInterface data-front end.
reformat
to your fit
/predict
callsIf 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.
If you subsample reformat
ted 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.
If you already includereformat
in your fit
/predict
calls you should provide more detail to help me diagnose the problem. In the case cited above the issue was an assumption about the number of arguments output by reformat
and the fix is here which you may want to check out in any case.
Closing in favor of https://github.com/JuliaAI/MLJDecisionTreeInterface.jl/issues/51 but @juliohm feel free to continue discussion in either place.
Can you please clarify what changed that broke the fit interface?
This code was working fine in previous releases where X is a table and y is a vector.