geese and flock.geese-common.RdCommon functions for geese and flock.
init_model(p, verb = 80L)
nterms(p)
nnodes(p)
ntrees(p)
nleafs(p)
likelihood(p, par, as_log = FALSE, trunc_seq = TRUE, ncores = 1L)
get_probabilities(p)
get_sequence(p, reduced_sequence = TRUE)
set_seed(p, s)
sim_geese(p, par, seed = -1L)
observed_counts(p)
print_observed_counts(p)
support_size(p)
parse_polytomies(p, verbose = TRUE)
nfuns(p)
# S3 method for geese
names(p)
predict_geese(
p,
par,
leave_one_out = FALSE,
use_reduced_sequence = TRUE,
only_annotated = FALSE
)
predict_flock(
p,
par,
leave_one_out = FALSE,
use_reduced_sequence = TRUE,
only_annotated = FALSE
)
predict_geese_simulate(p, par, nsim, use_reduced_sequence = TRUE, seed = -1L)
# S3 method for flock
names(x)
# S3 method for geese
print(x, ...)
print_nodes(x, ...)
# S3 method for flock
print(x, ...)nterms returns the number of terms included in the model. This
is different from the number of parameters as the later includes the number
of functions in the data.
nnodes returns the number of nodes in the data, this includes
internal nodes. If p is a flock, then it will return a vector of length
ntrees().
ntrees returns the number of trees in the model. For a geese object
this will be equal to one.
init_model initializes the model. This triggers the calculation
of the support using the vector of terms included. Initializing a model can
only be done once.
Using the truncated pruning sequence (trunc_seq = TRUE) involves
traversing the trees throught the induced subtree. This is relevant in the case
that not all the leafs are annotated.