nirs4all.controllers.models.components.prediction_assembler module

Prediction Data Assembler - Assemble prediction data for storage

This component creates structured prediction records from model outputs. Extracted from launch_training() lines 462-494 and _create_fold_averages() to eliminate duplicate assembly logic.

class nirs4all.controllers.models.components.prediction_assembler.PartitionPrediction(partition: str, indices: list[int], y_true: ndarray, y_pred: ndarray, score: float)[source]

Bases: object

Single partition prediction data.

indices: list[int]
partition: str
score: float
y_pred: ndarray
y_true: ndarray
class nirs4all.controllers.models.components.prediction_assembler.PredictionRecord(metadata: dict, partitions: list[tuple[str, list[int], ndarray, ndarray]])[source]

Bases: object

Complete prediction record for storage.

metadata: dict
partitions: list[tuple[str, list[int], ndarray, ndarray]]