Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update xgb algo files #439

Merged
merged 27 commits into from
Nov 22, 2022
Merged

Conversation

qbc2016
Copy link
Collaborator

@qbc2016 qbc2016 commented Nov 21, 2022

  • refine each client's test data
  • refine testing procedure
  • add 3 more datasets for xgb algo

@xieyxclack xieyxclack self-requested a review November 22, 2022 02:39
@xieyxclack xieyxclack added the enhancement New feature or request label Nov 22, 2022
Copy link
Collaborator

@xieyxclack xieyxclack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please refer to inline comments for more suggestions


Arguments:
root (str): root path
name (str): name of dataset, ‘adult’ or ‘xxx’
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adult?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sry.., it should be 'blog'


Arguments:
root (str): root path
name (str): name of dataset, ‘adult’ or ‘xxx’
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@@ -0,0 +1,155 @@
import logging
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we can define a BaseDataset for vertical dataset

}
if tree_num + 1 < self.client.num_of_trees:
# TODO: add feedback during training
'''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this if it is redundant


tree_num = 0
self.test_for_root(tree_num)
def evaluation(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can Test_base support multiple (>2) clients?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

if self.own_label:
self.test_y = self.data['test']['y']

self.test_z = np.zeros(self.test_x.shape[0])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what test_z means?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is exactly the result outputted by the model on test data, I'll change the name.

Copy link
Collaborator

@rayrayraykk rayrayraykk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dataset part looks good to me. As the XGB module is independent, please consider adding it to SPHINX.

@@ -1,6 +1,10 @@
import numpy as np
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add these datasets to README and docstring.

feature_partition=feature_partition,
tr_frac=splits[0],
download=True,
seed=1234,
Copy link
Collaborator

@rayrayraykk rayrayraykk Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might maintain a global seed for data generation as it has been set in here. @xieyxclack @yxdyc @DavdGao

@xieyxclack xieyxclack merged commit 4eeff57 into alibaba:master Nov 22, 2022
@xieyxclack xieyxclack mentioned this pull request Nov 22, 2022
@qbc2016 qbc2016 deleted the dev_xgb_newfeedback branch November 22, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Tree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants