src.eval.torf_rfvsnn_evaluator
Classes
|
- class src.eval.torf_rfvsnn_evaluator.TORFRFvsNNEvaluator(**kwargs)
- Author:
Alberto M. Esmoris Pena
Evaluator that compares Random Forest (RF) and Neural Network (NN) predictions for a trained TransfOctoRF model.
The evaluator runs the RF and NN stages independently on the provided centroid features and collects the probabilities needed for the comparison evaluation.
Can be used:
Internally by the TORF model during training via
rfvsnn_plot_path/rfvsnn_report_path.As a pipeline component referenced in JSON as
"eval": "TORFRFvsNNEvaluator".
See
TORFRFvsNNEvaluation.- Variables:
plot_path (str or None) – Path for the comparison plot.
report_path (str or None) – Directory path for the CSV reports.
- static extract_eval_args(spec)
Extract arguments from a pipeline JSON specification.
- Parameters:
spec – The key-word specification.
- Returns:
The arguments to initialize/instantiate a TORFRFvsNNEvaluator.
- Return type:
dict
- __init__(**kwargs)
Initialize a TORFRFvsNNEvaluator.
- Parameters:
kwargs – Evaluator attributes.
- eval(model, X=None, y=None, **kwargs)
Evaluate a trained TransfOctoRF model by comparing RF and NN predictions.
- Parameters:
model (
TransfOctoRFClassificationModel) – The trained TransfOctoRF model.X (
np.ndarray) – Centroid feature matrix (S, n_f).y (
np.ndarray) – Ground-truth centroid labels (S,).
- Returns:
The RF vs NN evaluation.
- Return type:
- __call__(pcloud, **kwargs)
Pipeline-based execution entry point.
- Parameters:
pcloud (
PointCloud) – The point cloud with predictions.model – The TORF model.
y – Ground-truth labels.
out_prefix – Output prefix for path expansion.
- eval_args_from_state(state)
Obtain arguments from the pipeline state.
- Parameters:
state (
SimplePipelineState) – The pipeline’s state.- Returns:
Dictionary of arguments for
__call__.- Return type:
dict