mstop: Function to Extract (Optimal) Stopping Iteration

Description Usage Arguments Details Value See Also Examples

View source: R/mstop.R

Description

Extracts the number of boosting iterations from a model that where performed or estimates the optimal number of boosting iterations.

Usage

1
2
3
4
5
mstop(object, ...)
## S3 method for class 'cfboost'
mstop(object, opt = TRUE, ...)
## S3 method for class 'cv'
mstop(object, ...)

Arguments

object

object of class cfboost of of class cv.

opt

logic. If opt = FALSE the pre-defined stopping iteration is returned, if opt = TRUE the optimal stopping iteration (in the given range of iterations) is returned.

...

(not used a.t.m.)

Details

The calculated risk is the negative maximum log likelihood for each boosting step.

Applied to a model object of class cfboost the function mstop can be used to extract the number of boosting iterations that were performed (opt = FALSE) or the optimal number of boosting iterations opt = TRUE with respect to the in-bag risk or out-of-bag risk. In the first case, the risk is computed on the learning sample, in the latter case it is computed on the validation sample.

The samples can be specified by weights that are given to cfboost. The risk that is to be computed is specified in the call of cfboost, to be more precise by the boost_control function. If an out-of-bag sample is specified, the risk that is to be computed can be set to both alternatives, if not, only the inbag risk is appropriate.

The function mstop.cv is used to extract the optimal boosting iteration from a cross-validated model (as returned by cv.

Value

The (optimal) number of boosting iterations is returned.

See Also

boost_control for the specification of risk-type and cfboost for the specification of validation samples. See cv for cross-validation.

Examples

1
## see for example ?cfboost and ?cv for usage of mstop()

CoxFlexBoost documentation built on May 2, 2019, 6:53 p.m.