get_best_tree
selects (looks up and identifies) the best tree (as an integer)
from the set (or “fan”) of FFTs contained in the current FFTrees
object x
,
an existing type of data
('train' or 'test'), and
a goal
for which corresponding statistics are available
in the designated data
type (in x$trees$stats
).
get_best_tree(x, data, goal, my.goal.max = TRUE)
An FFTrees
object.
The type of data to consider (as character: either 'train' or 'test').
A goal (as character) to be maximized or minimized when selecting a tree
from an existing FFTrees
object x
(with existing x$trees$stats
).
Default direction for user-defined my.goal
(as logical):
Should my.goal
be maximized?
Default: my.goal.max = TRUE
.
An integer denoting the tree
that maximizes/minimizes goal
in data
.
Importantly, get_best_tree
only identifies and selects the `tree` identifier
(as an integer) from the set of existing trees with known statistics,
rather than creating new trees or computing new cue thresholds.
More specifically, goal
is used for identifying and selecting the `tree`
identifier (as an integer) of the best FFT from an existing set of FFTs, but not for
computing new cue thresholds (see goal.threshold
and fftrees_cuerank()
) or
creating new trees (see goal.chase
and fftrees_ranktrees()
).
FFTrees
for creating FFTs from and applying them to data.
Other utility functions:
get_exit_type()
,
get_fft_df()