pub trait FpcPredictor {
// Required methods
fn fpca_mean(&self) -> &[f64];
fn fpca_rotation(&self) -> &FdMatrix;
fn ncomp(&self) -> usize;
fn training_scores(&self) -> &FdMatrix;
fn task_type(&self) -> TaskType;
fn predict_from_scores(
&self,
scores: &[f64],
scalar_covariates: Option<&[f64]>,
) -> f64;
// Provided method
fn project(&self, data: &FdMatrix) -> FdMatrix { ... }
}Expand description
Trait abstracting over any FPC-based model for generic explainability.
Implement this for a model that projects functional data onto FPC scores and produces a scalar prediction (value, probability, or class label).
Required Methods§
Sourcefn fpca_rotation(&self) -> &FdMatrix
fn fpca_rotation(&self) -> &FdMatrix
Rotation matrix from FPCA (m × ncomp).
Sourcefn training_scores(&self) -> &FdMatrix
fn training_scores(&self) -> &FdMatrix
Training FPC scores matrix (n × ncomp).