tumourkit.classification.train_graphs
Script to train and save several GNN configurations.
Copyright (C) 2023 Jose Pérez Cano
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Contact information: joseperez2000@hotmail.es
Functions
Appends result to given filename. |
|
Computes normalized neural persistence of the model using Gudhi. |
|
Creates header of .csv result file to append results. |
|
Evaluates model in loader. |
|
Concatenates both loaders into one. |
|
Generates a grid in the search space with no more than max_confs configurations. |
|
Creates Torch dataloaders for training. Folder structure: node_dir: - train - graphs - file1.nodes.csv ... - validation - graphs - file1.nodes.csv ... - test - graphs - file1.nodes.csv . |
|
Available models: GCN, ATT, HATT, SAGE, GIN Configuration space: NUM_LAYERS, DROPOUT, NORM_TYPE |
|
Generates a name from the configuration object. |
|
Save model weights and configuration file to SAVE_DIR |
|
Train the model with early stopping on either: F1 score (weighted) or neural persistence, or until 1000 iterations. |
|
Trains for one iteration, as the name says. |