prune: Prune the vistla tree

View source: R/prune.R

pruneR Documentation

Prune the vistla tree

Description

This function allows to filter out suboptimal branches, as well as weak ones or these not in particular paths of interest.

Usage

prune(x, targets, iomin, score)

Arguments

x

vistla object or a vistla_hierarchy object.

targets

a character vector of features. When not missing, all branches not on lying paths to these targets are pruned. Unreachable targets are ignored, while names not present in the analysed set cause an error.

iomin

a legacy name for score, valid only for vistla objects; passing a value to either of them works the same, but giving some values for both is an error.

score

a score threshold below which branches should be removed. When given, it effectively overrides the value of iomin or ensemble(prune,...) given to the vistla invocation; to this end, it can only be higher then the original value, since prune only modifies the output and cannot re-run the pathfinding.

Value

Pruned x; if both arguments are missing, this function still removes suboptimal branches.

Examples

## Not run: 
 data(chain)
 v<-vistla(Y~.,data=chain)
 print(v)
 print(prune(v,targets="M3"))
 print(prune(v,score=0.3))

## End(Not run)

vistla documentation built on Sept. 28, 2024, 1:08 a.m.

Related to prune in vistla...