tail.DFNET.forest: Return the last trees in the forest

View source: R/methods.R

tail.DFNET.forestR Documentation

Return the last trees in the forest

Description

Returns the last (= newest) trees in the forest. The number of trees to keep is determined by multiplying the number of generations with the generation size of the forest (the ntrees parameter) in train.

Usage

## S3 method for class 'DFNET.forest'
tail(x, n.generations = 6L, ...)

Arguments

x

The original DFNET.forest.

n.generations

integer. The number of generations to keep.

...

arguments to be passed to or from other methods.

Details

This function can be used to shrink the forest while training (since only the last generation will be used anyway).

Value

The last n.generations generations worth of modules and trees.


pievos101/DFNET documentation built on Dec. 1, 2022, 3:44 p.m.