src.eval.torf_rfvsnn_evaluation
Classes
|
- class src.eval.torf_rfvsnn_evaluation.TORFRFvsNNEvaluation(**kwargs)
- Author:
Alberto M. Esmoris Pena
Evaluation result comparing Random Forest (RF) and Neural Network (NN) predictions in the TransfOctoRF pipeline.
Holds the data necessary to generate a
TORFRFvsNNReport(CSV files), aTorfRFvsNNPlot(multi-panel figure), and an output point cloud with RF, NN, and final predictions, class ambiguities, probabilities, and their differences.- Variables:
rf_proba (
np.ndarray) – RF pseudoprobabilities (S, n_c).nn_proba (
np.ndarray) – NN probabilities (S, n_c).final_proba (
np.ndarray) – Final probabilities (S, n_c).final_preds (
np.ndarray) – Final predicted labels (S,).y_true (
np.ndarray) – Ground-truth labels (S,).class_names (list or None) – Names for each class.
centroids (
np.ndarrayor None) – Centroid coordinates (S, 3).
- __init__(**kwargs)
Initialize a TORFRFvsNNEvaluation.
- Parameters:
kwargs – Evaluation attributes including data arrays.
- report(**kwargs)
Transform the evaluation into a TORFRFvsNNReport.
See
TORFRFvsNNReport.- Returns:
The report.
- Return type:
- can_report()
See
Evaluationandevaluation.Evaluation.can_report().
- plot(**kwargs)
Transform the evaluation into a TorfRFvsNNPlot.
See
TorfRFvsNNPlot.- Keyword Arguments:
path (
str) – The path to store the plot.show (
bool) – Boolean flag for showing the plot (True) or not (False).
- Returns:
The plot.
- Return type:
- can_plot()
See
Evaluationandevaluation.Evaluation.can_plot().
- write_pcloud(path, point_coords=None, point_labels=None, nearest_idx=None, include_prediction=True, include_class_ambiguity=True, include_probabilities=True)
Write a point cloud (LAS/LAZ) with RF, NN, and final predictions, class ambiguities, probabilities, and their differences (NN - RF).
When
point_coordsandnearest_idxare given, centroid-level values are propagated to the original points via closest-centroid assignment. Otherwise the point cloud is written at centroid level.- Parameters:
path (str) – Output file path.
point_coords (
np.ndarrayor None) – Original point coordinates (N, 3).point_labels (
np.ndarrayor None) – Original point labels (N,).nearest_idx (
np.ndarrayor None) – Centroid index for each point (N,).include_prediction (bool) – Include predicted labels.
include_class_ambiguity (bool) – Include class ambiguity.
include_probabilities (bool) – Include class-wise probabilities.