JuliaAI / JuliaAI/DecisionTree.jl

Does not handle Adjoint nor Transposed features

Open
#91 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
364
Forks
100
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided fit! examples, comparing the converted array with the Adjoint input and the build_tree MethodError. Start at the fit! entry point and the build_tree dispatch shown in the error; done means both Adjoint and Transposed feature inputs are accepted without this method error and retain the expected feature orientation.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.