JuliaAI / DecisionTree.jl

Julia implementation of Decision Tree (CART) and Random Forest algorithms
Other
356 stars 102 forks source link

readme example errors...? #139

Closed zahachtah closed 3 years ago

zahachtah commented 3 years ago

I am running the random forest example using latest updates and Julia 1.6.0

apply_forest(model, [5.9,3.0,5.1,1.9])

gives

MethodError: no method matching apply_forest(::DecisionTree.Ensemble{Any, Any}, ::Vector{Float64}) Closest candidates are: apply_forest(::DecisionTree.Ensemble{S, T}, !Matched::AbstractVector{S}) where {S, T} at /Users/jonnorberg/.julia/packages/DecisionTree/tD5uM/src/classification/main.jl:257 apply_forest(::DecisionTree.Ensemble{S, T}, !Matched::AbstractMatrix{S}) where {S, T} at /Users/jonnorberg/.julia/packages/DecisionTree/tD5uM/src/classification/main.jl:271 top-level scope@Local: 2[inlined]

zahachtah commented 3 years ago

Nevermind, forcing the concrete type fixed it, but it seems necessary, not only for improving performance.