
Fit a Graph Attention Network on a WoSIS-style co-location graph
Source:R/pilar10_graph_nn.R
gnn_fit.RdFit a Graph Attention Network on a WoSIS-style co-location graph
Arguments
- graph
An
edaphos_gnn_graphfromgnn_build_graph().- targets
Numeric vector, one value per node.
Integer; output dimension of each GAT layer. Default
16L.- n_heads
Integer; number of attention heads. Default
4L.- n_layers
Integer; number of stacked GAT layers. Default
2L.- epochs
Integer; training epochs for the final linear head.
- lr
Numeric; learning rate.
- seed
RNG seed.
- backend
"r"(default, ELM-style) or"torch"(full autograd with multi-head attention; requires thetorchSuggests dependency). v2.7.0 upgrade.- device
"cpu"(default),"mps", or"cuda"whenbackend = "torch".