net_deprune() restores the weights a network had before
net_prune(), without recomputing anything, and marks its pruning
inactive. The pruning record stays on the network, so net_reprune()
can re-apply it and net_pruning_details() still lists what the
pruning removed. A netobject_group is restored network by network.
Usage
net_deprune(x, ...)
# S3 method for class 'netobject'
net_deprune(x, ...)
# S3 method for class 'netobject_group'
net_deprune(x, ...)
# Default S3 method
net_deprune(x, ...)Value
The input, of the same class, with the original weights, its edge table and edge count updated to them, and its pruning marked inactive.
Examples
seqs <- data.frame(V1 = c("A","B","C"), V2 = c("B","C","A"),
V3 = c("C","A","B"))
net <- build_network(seqs, method = "relative")
pruned <- net_prune(net, threshold = 0.2)
net_deprune(pruned)
#> Transition Network (relative probabilities) [directed]
#> Weights: [1.000, 1.000] | mean: 1.000
#>
#> Strongest edges (3 of 3):
#> from to weight
#> A B 1
#> B C 1
#> C A 1
#>
#> extract_edges(include_self = TRUE) lists every edge; extract_transition_matrix() gives the weight matrix;
#> extract_initial_probs() the initial probabilities.