getTerminalNodeIDs: Get terminal node IDs (deprecated)

Description Usage Arguments Value Examples

View source: R/getTerminalNodeIDs.R

Description

This function is deprecated. Please use predict() with type = "terminalNodes" instead. This function calls predict() now.

Usage

1

Arguments

rf

ranger object.

dat

New dataset. Terminal node IDs for this dataset are obtained.

Value

Matrix with terminal nodeIDs for all observations in dataset and trees.

Examples

1
2
rf <- ranger(Species ~ ., data = iris, num.trees = 5, write.forest = TRUE)
getTerminalNodeIDs(rf, iris)

Example output

       [,1] [,2] [,3] [,4] [,5]
  [1,]    3    1    3    3    1
  [2,]    3    1    3    3    1
  [3,]    3    1    3    3    1
  [4,]    3    1    3    3    1
  [5,]    3    1    3    3    1
  [6,]    3    1    3    3    1
  [7,]    3    1    3    3    1
  [8,]    3    1    3    3    1
  [9,]    3    1    3    3    1
 [10,]    3    1    3    3    1
 [11,]    3    1    3    3    1
 [12,]    3    1    3    3    1
 [13,]    3    1    3    3    1
 [14,]    3    1    3    3    1
 [15,]    3    1   15    7    1
 [16,]    3    1   10    7    1
 [17,]    3    1    3    3    1
 [18,]    3    1    3    3    1
 [19,]    3    1   10    7    1
 [20,]    3    1    3    3    1
 [21,]    3    1    3    3    1
 [22,]    3    1    3    3    1
 [23,]    3    1    3    3    1
 [24,]    3    1    3    3    1
 [25,]    3    1    3    3    1
 [26,]    3    1    3    3    1
 [27,]    3    1    3    3    1
 [28,]    3    1    3    3    1
 [29,]    3    1    3    3    1
 [30,]    3    1    3    3    1
 [31,]    3    1    3    3    1
 [32,]    3    1    3    3    1
 [33,]    3    1    3    3    1
 [34,]    3    1   10    3    1
 [35,]    3    1    3    3    1
 [36,]    3    1    3    3    1
 [37,]    3    1   10    3    1
 [38,]    3    1    3    3    1
 [39,]    3    1    3    3    1
 [40,]    3    1    3    3    1
 [41,]    3    1    3    3    1
 [42,]    3    1    3    3    1
 [43,]    3    1    3    3    1
 [44,]    3    1    3    3    1
 [45,]    3    1    3    3    1
 [46,]    3    1    3    3    1
 [47,]    3    1    3    3    1
 [48,]    3    1    3    3    1
 [49,]    3    1    3    3    1
 [50,]    3    1    3    3    1
 [51,]    4    8   16    8   12
 [52,]    4   18   16    8   12
 [53,]    7    8   23    8   12
 [54,]    4    9   13    4   15
 [55,]    4   18   16    8   12
 [56,]    4    9   13    8   12
 [57,]    4   18   16    8   12
 [58,]    4    9    7    4    9
 [59,]    4   18   16    8   12
 [60,]    4    9    8    4   15
 [61,]    4    9    8    4   15
 [62,]    4    9   16    8   12
 [63,]    4    9   16    8   12
 [64,]    4    9   16    8   12
 [65,]    4    9   13    8   15
 [66,]    4   18   16    8   12
 [67,]    4    9   13    8   15
 [68,]    4    9   16    8   12
 [69,]    4   17   16    8   12
 [70,]    4    9   13    8   15
 [71,]    6   12   18   11   12
 [72,]    4    9   16    8   12
 [73,]    7   18   23    8   12
 [74,]    4    9   16    8   12
 [75,]    4   18   16    8   12
 [76,]    4   18   16    8   12
 [77,]    7   18   23    8   12
 [78,]    6   14   23    8    8
 [79,]    4    9   16    8   12
 [80,]    4    9   13    8   12
 [81,]    4    9   13    4   15
 [82,]    4    9   13    4   15
 [83,]    4    9   16    8   12
 [84,]    6   16   22    8   14
 [85,]    4    9    8    4   15
 [86,]    4    9   16    8   12
 [87,]    4   18   16    8   12
 [88,]    4   18   16    8   12
 [89,]    4    9   13    8   15
 [90,]    4    9   13    4   15
 [91,]    4    9   13    4   15
 [92,]    4    9   16    8   12
 [93,]    4    9   16    8   12
 [94,]    4    9    8    4   15
 [95,]    4    9   13    8   15
 [96,]    4    9   13    8   12
 [97,]    4    9   13    8   12
 [98,]    4   17   16    8   12
 [99,]    4    9    8    4   15
[100,]    4    9   13    8   12
[101,]    6   14   18   10    8
[102,]    6   11   18   10   13
[103,]    6    8   18   10    8
[104,]    6   14   18   10    8
[105,]    6   14   18   10    8
[106,]    6    8   18   10    8
[107,]    4   11    7    4   10
[108,]    6    8   18   10    8
[109,]    6   14   18   10    8
[110,]    6    8   18   10    8
[111,]    6   14   18   10    8
[112,]    6   14   18   10    8
[113,]    6   14   18   10    8
[114,]    6   11   14   10   13
[115,]    6   11   18   10   13
[116,]    6   14   18   10    8
[117,]    6   14   18   10    8
[118,]    6    8   18   10    8
[119,]    6    8   18   10    8
[120,]    8   15   21    8   14
[121,]    6    8   18   10    8
[122,]    6   11   14   10   16
[123,]    6    8   18   10    8
[124,]    6   18   18   10   12
[125,]    6   14   18   10    8
[126,]    6    8   18   10    8
[127,]    6   17   18   12   12
[128,]    6   11   18   10   12
[129,]    6   14   18   10    8
[130,]    6    8   24    8    8
[131,]    6    8   18   10    8
[132,]    6    8   18   10    8
[133,]    6   14   18   10    8
[134,]    8   14   24    8    8
[135,]    8   16   21    8    8
[136,]    6    8   18   10    8
[137,]    6   14   18   10    8
[138,]    6   14   18   10    8
[139,]    6   11   18   11   12
[140,]    6    8   18   10    8
[141,]    6   14   18   10    8
[142,]    6    8   18   10    8
[143,]    6   11   18   10   13
[144,]    6   14   18   10    8
[145,]    6   14   18   10    8
[146,]    6   14   18   10    8
[147,]    6   14   18   10    8
[148,]    6   14   18   10    8
[149,]    6   14   18   10    8
[150,]    6   11   18   10   13
Warning message:
In getTerminalNodeIDs(rf, iris) :
  Function getTerminalNodeIDs() deprecated, calling predict().

ranger documentation built on Jan. 11, 2020, 9:21 a.m.