Xtra-Computing / FedTree

A tree-based federated learning system (MLSys 2023)
https://fedtree.readthedocs.io/en/latest/index.html
Apache License 2.0
140 stars 38 forks source link

Horizontal Federated Random Forest - Errors for Multiclass Classification #57

Closed WilliamLindskog closed 1 year ago

WilliamLindskog commented 1 year ago

Hi,

I am trying to apply Federated Random Forest (horizontal setting) setting the parameter baggingto 1 using several pre-split data sets, as in my previous issue. The data set I am using is Forest Cover Type data set, classification, 54 features and 7 classes.

However, when running this it seems that it only predicts 0s and 1s. Federated GBDTs can make relevant predictions for all classes but not random forests. Is there another parameter I must set so that the random forests can predict all classes for horizontal federated learning?

The error message I get after the the horizontal trainer is done and it is predicting the score is: FATAL multiclass_metric.cpp:12 : Check failed: [num_class * y.size() == y_p.size()] 7 * 11620 != 11620

Best regards, W

QinbinLi commented 1 year ago

@WilliamLindskog ,

I have fixed the issue. You can pull the latest version and try again. Also, as mentioned in #52 , there is no performance guarantee for random forest.