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

Implement dgl check for graphs with different numbers of nodes #117

Open
VHolstein opened this issue May 12, 2023 · 0 comments
Open

Implement dgl check for graphs with different numbers of nodes #117

VHolstein opened this issue May 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@VHolstein
Copy link
Collaborator

VHolstein commented May 12, 2023

Is your feature request related to a problem? Please describe.
PHOTONAI-Graph only supports dgl graphs with the same number of node features. If you use dgl graphs with varying numbers of nodes/features (eg, dgl mini dataset), the pipeline does not work.

Describe the solution you'd like
Implement a new architecture that uses an MLP to sample down the number of node features to a fixed size. Also build a check that allows for using node degree from within the different architectures.

Additional context
This will be important for version 2.0

Unit Tests
Reimplement these unit tests that use the dgl mini dataset

    def test_gcn_classifier_dgl(self):
        gat_clf = GCNClassifierModel(nn_epochs=20)
        gat_clf.fit(self.X_dgl, self.y)
        output = gat_clf.predict(self.X_dgl)
        self.assertTrue(np.array_equal(np.array(output.shape), self.y.shape))
    def test_gat_classifier_dgl(self):
        gat_clf = GATClassifierModel(nn_epochs=20)
        gat_clf.fit(self.X_dgl, self.y)
        output = gat_clf.predict(self.X_dgl)
        self.assertEqual(output.shape, self.y.shape)
@VHolstein VHolstein added the enhancement New feature or request label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant