Face this run time error

I face this error in MJL pakage

Which version of MLJ are you on? You seem to roughly be running the intro example from the docs, which runs fine for me on MLJ version 0.6:

julia> using MLJ, RDatasets

julia> iris = dataset("datasets", "iris");

julia> y, X = unpack(iris, ==(:Species), colname -> true);

julia> tree_model = @load DecisionTreeClassifier verbosity = 1
import MLJModels βœ”
import DecisionTree βœ”
import MLJModels.DecisionTree_.DecisionTreeClassifier βœ”
DecisionTreeClassifier(pruning_purity = 1.0,
                       max_depth = -1,
                       min_samples_leaf = 1,
                       min_samples_split = 2,
                       min_purity_increase = 0.0,
                       n_subfeatures = 0,
                       display_depth = 5,
                       post_prune = false,
                       merge_purity_threshold = 0.9,
                       pdf_smoothing = 0.05,) @ 1…93

julia> tree = machine(tree_model, X, y)
Machine{DecisionTreeClassifier} @ 4…03

Now its show this error on my data

Could you maybe post an MWE that reproduces your error as in the linked post? This would make it a lot more likely that someone on this forum can work out what’s going awry in your code.

1 Like