Creates a Graph Neural Network that incorporates biological pathway information for omics classification.
Usage
make_gnn_learner(
adjacency_matrix = NULL,
n_hidden = 64L,
n_layers = 2L,
dropout = 0.3,
aggregation = "mean",
epochs = 100L
)Arguments
- adjacency_matrix
Adjacency matrix defining feature relationships (e.g., from pathway databases, correlation, or PPI networks)
Number of hidden units (default: 64)
- n_layers
Number of GNN layers (default: 2)
- dropout
Dropout rate (default: 0.3)
- aggregation
Message aggregation: "mean", "sum", "max"
- epochs
Number of epochs (default: 100)
Details
The GNN uses: - Graph Convolutional layers to propagate information - Feature relationships from biological networks - Node-level predictions aggregated to graph-level
Examples
if (FALSE) { # \dontrun{
if (requireNamespace("torch", quietly = TRUE) &&
requireNamespace("mlr3torch", quietly = TRUE)) {
# Create adjacency from correlation
cor_mat <- cor(data)
adj <- (abs(cor_mat) > 0.7) * 1
diag(adj) <- 0
learner <- make_gnn_learner(adj)
learner$train(task)
}
} # }