DecisionTree.jl icon indicating copy to clipboard operation
DecisionTree.jl copied to clipboard

Does not handle Adjoint nor Transposed features

Open byronbest opened this issue 6 years ago • 1 comments

in https://white.ucc.asn.au/2017/01/24/JuliaML-and-TensorFlow-Tuitorial.html rows and columns are swapped, as columns are labeled samples instead of rows

ERROR: LoadError: MethodError: no method matching build_tree(::Array{Bool,1}, ::LinearAlgebra.Adjoint{Int64,Array{Int64,2}}, ...

using DecisionTree
import ScikitLearnBase: fit!

features = [1 2;4 5;3 6]
labels = [true,false]
    
println("As array");fit!(DecisionTreeClassifier(), convert(Array{Float64,2},features'), labels)
println("Adjoint");fit!(DecisionTreeClassifier(), features', labels)

byronbest avatar Oct 10 '18 01:10 byronbest

Thanks for raising this. It may take a long time, because we are in the process of overhauling the library, but I will try to make accommodations for this issue.

Eight1911 avatar Oct 10 '18 22:10 Eight1911