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

Add node regression in benchmarking code #399

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Jn-Huang
Copy link
Collaborator

As titled.

Provide mse and mae as metrics and loss function.

train.py can run successfully on cora (pretending it is a node regression task).

image

TODO: update train_minibatch.py and train_gbdt.py

return sum(rocauc_list)/len(rocauc_list)


def check_binary_classification(dataset):
Copy link
Contributor

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.

@Jn-Huang
Copy link
Collaborator Author

Update:

  1. remove redundant codes
  2. fix train_minibatch.py, training is successful

image

  1. fix typo in train.py

image

def read_input(self):
"""Read input."""
data = gli.dataloading.get_gli_dataset(self.args.dataset,
"NodeClassification")
Copy link
Contributor

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",
Copy link
Contributor

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.
Copy link
Contributor

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")
Copy link
Contributor

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.
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@jiaqima jiaqima changed the title Add node regression Add node regression in benchmarking code Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants