src.eval.rand_forestpp_evaluator
Classes
|
- class src.eval.rand_forestpp_evaluator.RandForestPPEvaluator(**kwargs)
- Author:
Alberto M. Esmoris Pena
Class to evaluate trained C++ random forest models. See
RandomForestPPClassificationModel.The evaluator computes MDI feature importances from the C++ backend and optionally computes permutation importance. Unlike the sklearn evaluator, tree plotting produces feature importance bar charts instead of tree diagrams.
- Variables:
compute_permutation_importance (bool) – Whether to compute permutation importance (True) or not (False).
n_repeats (int) – Number of shuffle repeats for permutation importance.
- __init__(**kwargs)
Initialize/instantiate a RandForestPPEvaluator.
- Parameters:
kwargs – The attributes for the RandForestPPEvaluator.
- eval(model, X=None, y=None, **kwargs)
Evaluate a trained C++ random forest model.
- Parameters:
model (
RandomForestPPClassificationModel) – The C++ random forest model.X – The matrix of point-wise features. Rows are points, columns are features.
y – The vector of classes.
- Returns:
The evaluation of the trained C++ random forest.
- Return type: