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

A question about data partition in vertical FL in standalone simulation #65

Closed Oqaily closed 1 year ago

Oqaily commented 1 year ago

Hi, I am using the standalone simulation vertical FL. I want to control the partition of the data for each party, to decide which attributes each party could have. Is this possible?

QinbinLi commented 1 year ago

Hi @Oqaily ,

You can partition the data by yourself and input the data paths to data separated by comma to run FedTree with the partitioned datasets.

Oqaily commented 1 year ago

Hi @QinbinLi , Thank you for the quick response. My question may not be complete. I mean using the Python interface (such as the example under the directory python/examples/regressor_example_vertical.py), how could we partition the data? If it's not supported is there a way to get the predicted labels using the command-line interface (./build/bin/FedTree-predict )?

QinbinLi commented 1 year ago

Hi @Oqaily ,

It's not supported in Python interface. I just added a parameter pred_output to specify the file to save the predicted labels for FedTree-predict using the command-line interface. The default value is predictions.txt. You may pull the latest version and try again. Thanks!

Oqaily commented 1 year ago

It's working. Thank you @QinbinLi for your help.