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
A quick test seemed to show that the predict method is not robust to reordering the column order, which was a bit surprising.
using DataFrames
using MLJ
import MLJDecisionTreeInterface.DecisionTreeClassifier as Tree
iris = DataFrame(load_iris());
y, X = unpack(iris, ==(:target); rng=123)
tree = Tree()
mach = machine(tree, X, y)
train, test = partition(eachindex(y), 0.7)
fit!(mach, rows=train)
# Returns false
predict(mach, X[test,[3,2,1,4]]) == predict(mach, X[test,[1,2,3,4]])