-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add node regression in benchmarking code #399
base: main
Are you sure you want to change the base?
Add node regression in benchmarking code #399
Conversation
benchmarks/NodeRegression/utils.py
Outdated
return sum(rocauc_list)/len(rocauc_list) | ||
|
||
|
||
def check_binary_classification(dataset): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do some cleaning on the redundant functions that are not needed for regression tasks. Please also change "classification" to "regression" in function names and comments.
def read_input(self): | ||
"""Read input.""" | ||
data = gli.dataloading.get_gli_dataset(self.args.dataset, | ||
"NodeClassification") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to change to "NodeRegression" here?
|
||
def run(self, | ||
save_folder: str = None, | ||
task: str = "NodeClassification", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regression?
@@ -0,0 +1,207 @@ | |||
""" | |||
Train for node classification dataset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> regression
def parse_args(): | ||
"""Parse the command line arguments.""" | ||
parser = argparse.ArgumentParser(description="train for node\ | ||
classification") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regression
|
||
## Supported datasets | ||
|
||
No `NodeRegrssion` datasets available now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a regression dataset in the next couple of days.
If the regression implementation already seems to work well, could you add a test for NodeRegression training in another PR? Maybe let's first add the test, then I'll add a regression dataset, and let's merge this PR after I add the dataset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, I will open another PR for this test.
As titled.
Provide
mse
andmae
as metrics and loss function.train.py
can run successfully oncora
(pretending it is a node regression task).TODO: update
train_minibatch.py
andtrain_gbdt.py