src.report.torf_rfvsnn_report

Classes

TORFRFvsNNReport(**kwargs)

class src.report.torf_rfvsnn_report.TORFRFvsNNReport(**kwargs)
Author:

Alberto M. Esmoris Pena

Report comparing Random Forest (RF) and Neural Network (NN) predictions for the TransfOctoRF pipeline.

Exports CSV files with:

  1. Per-class F1 scores for RF and NN.

  2. Prediction agreement breakdown (agree correct, agree wrong, RF-only correct, NN-only correct, both wrong).

  3. Per-sample ambiguity for RF and NN with agreement flag.

Variables:
  • rf_proba (np.ndarray) – RF pseudoprobabilities (S, n_c).

  • nn_proba (np.ndarray) – NN probabilities (S, n_c).

  • y_true (np.ndarray) – Ground-truth labels (S,).

  • class_names (list) – Names for each class.

__init__(**kwargs)

Initialize a TORFRFvsNNReport.

Parameters:

kwargs – Report attributes including data arrays.

to_file(path, out_prefix=None)

Write CSV files to the directory at path.

Three CSV files are exported:

  • f1_comparison.csv: Per-class F1 scores.

  • agreement.csv: Prediction agreement breakdown.

  • ambiguity.csv: Per-sample RF/NN ambiguity.

Parameters:
  • path (str) – Directory where CSV files will be written.

  • out_prefix (str or None) – Output prefix for * expansion.