Returns the induced subgraph on the selected feature columns, keeping the feature-to-column alignment. Use it after dropping invalid or constant columns from the feature matrix so the graph continues to describe exactly the columns the estimator sees.
Value
A spatial_graph over the kept columns. Its
parent_index field records the position of each kept column in
the parent graph.
Examples
ds <- gen_sample_dataset(c(4, 4, 4), 8)
g <- spatial_graph(ds$dataset)
g2 <- restrict_graph(g, seq_len(10))
g2$n_features
#> [1] 10