Choose solutions from a solution path based on number of edges, value of regularization parameter lambda, or index.
get.solution(x, edges, lambda, index)a sparsebnPath object.
number of edges to search for.
value of regularization parameter to search for.
integer index to select.
For edges (resp. lambda), the solution with the closest number
of edges (resp. regularization parameter) is returned. If there is no match
within a tolerance of 0.1 for lambda, nothing is returned. Fuzzy matching
is not used for when selecting by index.
If there is more than one match (for example, by number of edges), then
the first such estimate is returned. Note that select(x, index = j)
is equivalent to (but slightly slower than) x[[j]].