MultiSampleAnalysis.classify_new_samples¶
Module: workflow.py
Reuse the fitted preprocessing, detection state, feature settings, and model to classify events from new samples. This is the single public prediction method for both classical ML and DL models.
Parameters¶
new_sample_paths(dict[str, str | Path]): Mapping from new sample identifiers to input paths.reader(str | None): Optional reader override ("abf"or"csv").reader_kwargs(dict[str, Any] | None): Optional reader keyword arguments.custom_feature_fns(dict[str, Callable] | None): Optional custom feature functions forwarded toextract_features.model(str | Any | None): Optional trained model name or model object. Classical ML names come frombuild_best_model(for example"Random Forest"); DL names are the exactmodel_nameused during training, such as"residual-CNN","1D-CNN","MAGJAM", or"MAGJAM_d4".
If model is omitted, the stored best classical model is preferred; otherwise the stored DL package is used.
Returns¶
tuple[MultiSampleAnalysis, pandas.DataFrame]:
- The new analysis object, including traces, events, features, and
pl/plotaccessors. - The per-event prediction table. ML columns are
pred_labelandpred_proba_<class>; DL columns arepred_label_<model_name>andpred_proba_<class>_<model_name>.
DL prediction reuses the stored interp_length, interp_method, expand, scale, and handcrafted-feature configuration from the trained package.