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

Multi-output (multi-target) problems

Open steffiel opened this issue 9 years ago • 3 comments

Hi, is it possible to do something like the multi-output from scikit-learn in Julia? Cause my input matrix has 3 features, and I have 12 different outputs per example. I tried to train 12 separate trees, but this didn't work.

steffiel avatar May 11 '16 13:05 steffiel

Multitarget regression is not possible - for regression currently the target must have Float64 type.

ablaom avatar Mar 29 '23 21:03 ablaom

Copying post of @fipelle from another thread:


Also, it seems that loss is only available for classification trees - not regression trees.

Is it possible to repurpose the existing code for classification trees to run regression tasks? It would be convenient both for

regression tasks with one target and a custom loss, and

multi-target problems (the current implementation for regression trees does not allow for labels that are not Float64 - i.e., single targets).

ablaom avatar Mar 29 '23 21:03 ablaom

This is an question here and I have wondered before why classification and regression have separate implementations. I diff'ed the two tree.jl files and found quite a few differences. For example, in classification there are array pre-allocations based on the total number of target classes, something you won't want to do in regression.

My initial guess is that generalizing regression.jl would be more useful than re-purposing classification.jl.

ablaom avatar Mar 29 '23 21:03 ablaom