getTreeInfo: Extract a single tree from the ensemble.

Description Usage Arguments Value Note Author(s) See Also Examples

Description

This function extracts the structure of a tree from a learnPattern object.

Usage

1
getTreeInfo(object, which.tree=1)

Arguments

object

a learnPattern object.

which.tree

which tree to extract?

Value

is a list with the following components:

segment.length

the proportion of the time series length used for both predictors and targets.

target

starting time of the target segment.

target.type

type of the target segment; 1 if observed series, 2 if difference series.

tree

Tree structure matrix with seven columns and number of rows equal to total number of nodes in the tree.

The seven columns of the tree structure matrix are:

left daughter

the row where the left daughter node is; 0 if the node is terminal

right daughter

the row where the right daughter node is; 0 if the node is terminal

split segment

start time of the segment used to split the node

split type

type of the predictor segment used to split the node; 1 if observed series, 2 if the different series are used. 0 if the node is terminal

split point

where the best split is

status

is the node terminal (-1) or not (-3)

depth

the depth of the node

prediction

the prediction for the node

Note

For numerical predictors, data with values of the variable less than or equal to the splitting point go to the left daughter node.

Author(s)

Mustafa Gokce Baydogan

See Also

learnPattern

Examples

1
2
3
4
5
6
data(GunPoint)
set.seed(71)

## Learn patterns on GunPoint training series with 50 trees
ensemble=learnPattern(GunPoint$trainseries,ntree=50)
getTreeInfo(ensemble, 3)

LPStimeSeries documentation built on May 2, 2019, 8:25 a.m.