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
Covariates to use for prediction. Must have the same dimensions / column types as the data used to train a forest.
36
36
forest_type : str
37
-
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.
38
-
39
-
* **BART**
40
-
* `'mean'`: `'mean'`: Extracts leaf indices for the mean forest
41
-
* `'variance'`: Extracts leaf indices for the variance forest
42
-
* **BCF**
43
-
* `'prognostic'`: Extracts leaf indices for the prognostic forest
44
-
* `'treatment'`: Extracts leaf indices for the treatment effect forest
45
-
* `'variance'`: Extracts leaf indices for the variance forest
46
-
* **ForestContainer**
47
-
* `NULL`: It is not necessary to disambiguate when this function is called directly on a `ForestSamples` object. This is the default value of this
48
-
37
+
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. See Notes for a mapping from model type to valid forest types.
49
38
propensity : `np.array`, optional
50
39
Optional test set propensities. Must be provided if propensities were provided when the model was sampled.
Numpy array with dimensions `num_obs` by `num_trees`, where `num_obs` is the number of rows in `covariates` and `num_trees` is the number of trees in the relevant forest of `model_object`.
47
+
48
+
Notes
49
+
-----
50
+
Mapping from model type to forest types:
51
+
52
+
- **BART**
53
+
- `'mean'`: `'mean'`: Extracts leaf indices for the mean forest
54
+
- `'variance'`: Extracts leaf indices for the variance forest
55
+
- **BCF**
56
+
- `'prognostic'`: Extracts leaf indices for the prognostic forest
57
+
- `'treatment'`: Extracts leaf indices for the treatment effect forest
58
+
- `'variance'`: Extracts leaf indices for the variance forest
59
+
- **ForestContainer**
60
+
- `NULL`: It is not necessary to disambiguate when this function is called directly on a `ForestSamples` object. This is the default value of this
model_object : BARTModel, BCFModel, or ForestContainer
176
179
Object corresponding to a BART / BCF model with at least one forest sample, or a low-level `ForestContainer` object.
177
180
forest_type : str
178
-
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.
179
-
180
-
* **BART**
181
-
* `'mean'`: `'mean'`: Extracts leaf indices for the mean forest
182
-
* `'variance'`: Extracts leaf indices for the variance forest
183
-
* **BCF**
184
-
* `'prognostic'`: Extracts leaf indices for the prognostic forest
185
-
* `'treatment'`: Extracts leaf indices for the treatment effect forest
186
-
* `'variance'`: Extracts leaf indices for the variance forest
187
-
* **ForestContainer**
188
-
* `NULL`: It is not necessary to disambiguate when this function is called directly on a `ForestSamples` object. This is the default value of this
189
-
181
+
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. See Notes for a mapping from model type to valid forest types.
190
182
forest_inds : int or np.ndarray
191
183
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.
192
184
This function uses 0-indexing, so the first forest sample corresponds to `forest_num = 0`, and so on.
193
185
194
186
Returns
195
187
-------
196
188
Numpy array containing the largest possible leaf index computable by `compute_forest_leaf_indices` for the forests in a designated forest sample container.
189
+
190
+
Notes
191
+
-----
192
+
Mapping from model type to forest types:
193
+
194
+
- **BART**
195
+
- `'mean'`: `'mean'`: Extracts leaf indices for the mean forest
196
+
- `'variance'`: Extracts leaf indices for the variance forest
197
+
- **BCF**
198
+
- `'prognostic'`: Extracts leaf indices for the prognostic forest
199
+
- `'treatment'`: Extracts leaf indices for the treatment effect forest
200
+
- `'variance'`: Extracts leaf indices for the variance forest
201
+
- **ForestContainer**
202
+
- `NULL`: It is not necessary to disambiguate when this function is called directly on a `ForestSamples` object. This is the default value of this
0 commit comments