Skip to contents

Chooses the graph using inner-fold loss only, then assembles its outer-fold predictions. Only graphs with full inner-fold prediction coverage compete; unsupported outer predictions remain NA. Candidate vertex identities and ordering must agree. Final graph selection uses full-data inner CV.

Usage

select.masked.graph.field(comparison, study)

Arguments

comparison

Output from compare.masked.graph.fields.

study

Name of the study used to choose graphs (for example HMP).

Value

Selected graph per outer fold, outer predictions and coverage, participant-balanced MSE, final graph name, and its final fitted field.

Examples

op <- metric.graph.lowpass.operator(list(2L, c(1L, 3L), 2L),
                                   list(1, c(1, 1), 1))
studies <- list(example = list(vertex = rep(c(1, 3), 6), y = 1:12,
                               group = letters[1:12]))
comparison <- compare.masked.graph.fields(list(path = op), studies,
    lambdas = c(0.01, 1), outer.folds = 3, inner.folds = 2)
selected <- select.masked.graph.field(comparison, "example")
selected$final.graph
#> [1] "path"
selected$coverage
#> [1] 1