You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Compute and return the largest possible leaf index computable by `computeForestLeafIndices` for the forests in a designated forest sample container.
207
207
#'
208
208
#' @param model_object Object of type `bartmodel`, `bcfmodel`, or `ForestSamples` corresponding to a BART / BCF model with at least one forest sample, or a low-level `ForestSamples` object.
209
-
#' @param covariates Covariates to use for prediction. Must have the same dimensions / column types as the data used to train a forest.
210
209
#' @param forest_type Which forest to use from `model_object`.
211
210
#' Valid inputs depend on the model type, and whether or not a
Compute and return the largest possible leaf index computable by `compute_forest_leaf_indices` for the forests in a designated forest sample container.
115
+
116
+
Parameters
117
+
----------
118
+
model_object : BARTModel, BCFModel, or ForestContainer
119
+
Object corresponding to a BART / BCF model with at least one forest sample, or a low-level `ForestContainer` object.
120
+
forest_type : str
121
+
Which forest to use from `model_object`. Valid inputs depend on the model type, and whether or not a given forest was sampled in that model.
122
+
123
+
* **BART**
124
+
* `'mean'`: `'mean'`: Extracts leaf indices for the mean forest
125
+
* `'variance'`: Extracts leaf indices for the variance forest
126
+
* **BCF**
127
+
* `'prognostic'`: Extracts leaf indices for the prognostic forest
128
+
* `'treatment'`: Extracts leaf indices for the treatment effect forest
129
+
* `'variance'`: Extracts leaf indices for the variance forest
130
+
* **ForestContainer**
131
+
* `NULL`: It is not necessary to disambiguate when this function is called directly on a `ForestSamples` object. This is the default value of this
132
+
133
+
forest_inds : int or np.ndarray
134
+
Indices of the forest sample(s) for which to compute max leaf indices. If not provided, this function will return max leaf indices for every sample of a forest.
135
+
This function uses 0-indexing, so the first forest sample corresponds to `forest_num = 0`, and so on.
136
+
137
+
Returns
138
+
-------
139
+
Numpy array containing the largest possible leaf index computable by `compute_forest_leaf_indices` for the forests in a designated forest sample container.
0 commit comments