Skip to content

Extending PHOTONAI Graph

Extending PHOTONAI Graph is equally easy as extending PHOTONAI itself.

For new Transformers see adding Transformers.

For new Estimators see adding Estimators

PHOTONAI Graph specific base classes

PHOTONAI Graph offers a few base classes for simple integration.

To extend PHOTONAI Graph simply inherit from the desired base class and register your custom model to PHOTONAI.

GraphConstructor Base Class

Base class for all graph constructors. Implements methods shared by different constructors.

Parameters:

Name Type Description Default
one_hot_nodes int

whether to return a one hot node encoding as feature or not

0
use_abs int

whether to convert all matrix values to absolute values before applying other transformations

0
fisher_transform int

whether to perform a fisher transform of every matrix

0
discard_original_connectivity bool

If true the second index of the last dimension will be the original connectivity. Otherwise the original connectivity will be dropped from the matrix.

False
use_abs_fisher int

Changes the values to absolute values. Is applied after fisher transform and before z-score transformation

0
zscore int

performs a zscore transformation of the data. Applied after fisher transform and np_abs eval_final_perfomance is set to True

0
use_abs_zscore int

whether to use the absolute values of the z-score transformation or allow for negative values. Applied after fisher transform, use_abs and zscore

0
adjacency_axis int

position of the adjacency matrix, default being zero

0
logs str

Path to the log data

None

DGL Base Class - Classification

Abstract base class for classification algorithms

Parameters:

Name Type Description Default
nn_epochs int

Number of epochs to fit the model

200
learning_rate float

Learning rate for model training

0.001
batch_size int

Batch size for model training

32
adjacency_axis int

Axis which contains the adjacency

0
feature_axis int

Axis which contains the features

1
add_self_loops bool

If this value is true, a self loop is added to each node of each graph

True
allow_zero_in_degree bool

If true the dgl model allows zero-in-degree Graphs

False
validation_score bool

It true the input data is split into train and test (90%/10%). The testset is then used to get validation results during training

False
verbose bool

If true verbose output is generated

False
logs str

Default logging directory

None

DGL Base Class - Regression

Abstract base class for regression algorithms

Parameters:

Name Type Description Default
nn_epochs int

Number of epochs to fit the model

200
learning_rate float

Learning rate for model training

0.001
batch_size int

Batch size for model training

32
adjacency_axis int

Axis which contains the adjacency

0
feature_axis int

Axis which contains the features

1
add_self_loops bool

If this value is true, a self loop is added to each node of each graph

True
allow_zero_in_degree bool

If true the dgl model allows zero-in-degree Graphs

False
validation_score bool

If true the input data is split into train and test (90%/10%). The testset is then used to get validation results during training

False
verbose bool

If true verbose output is generated

False
logs str

Default logging directory

None