treeple.stats.build_oob_forest#
- treeple.stats.build_oob_forest(est, X, y, use_sparse=False, verbose=False, **est_kwargs)[source]#
Build a hypothesis testing forest using oob samples.
- Parameters:
- estForest
The type of forest to use. Must be enabled with
bootstrap=True
. The forest should have eitheroob_samples_
orestimators_samples_
property defined, which will be used to compute the out of bag samples per tree.- XArrayLike of shape (n_samples, n_features)
Data.
- yArrayLike of shape (n_samples, n_outputs)
Binary target, so
n_outputs
should be at most 1.- use_sparse
bool
, optional Whether or not to use a sparse representation for the posteriors.
- verbose
bool
, optional Verbosity, by default False.
- **est_kwargs
dict
, optional Additional keyword arguments to pass to the forest estimator
fit
function.
- Returns:
- estForest
Fitted forest.
- all_probaArrayLike of shape (n_estimators, n_samples, n_outputs)
The predicted posterior probabilities for each estimator on their out of bag samples.
Examples using treeple.stats.build_oob_forest
#
Calculating S@98
Calculating MI
Calculating pAUC
Calculating Hellinger Distance
Calculating Hellinger Distance
Calculating S@98 with multiview data
Calculating S@98 with multiview data
Calculating CMI