Skip to content

Examples

End-to-end case studies on real, classic functional-data datasets. Each page loads a vendored dataset, runs a genuine fdars analysis, and generates its figures at build time — so the code you read is exactly the code that produced the plots.

The datasets (Berkeley Growth, Canadian Weather, Tecator, Phoneme, Wine, Sonar) live under docs/data/ with sources and licenses documented in the data README; the penicillin batches are synthetic. All are loaded through the small helper docs_data.

Alignment & shape

Representation: Andrews curves

Regression & explainability

Classification

Seasonal & regional analysis

Process monitoring

What each example shows

Example Dataset fdars techniques
Growth curve alignment Berkeley Growth deriv_1d, elastic_align_pair, karcher_mean
Sonar: mine vs rock Sonar tsrvf_transform, elastic_self_distance_matrix, fclassif_knn
Andrews Wine: why curves? Wine Andrews transform, Fdata
Andrews Wine: outliers Wine depth, outliergram, magnitude_shape
Andrews Wine: clustering Wine kmeans_fd, gmm_cluster, silhouette_score_data
Andrews Wine: quality control Wine fpca_tolerance_band / spm
Predicting fat from NIR spectra Tecator fregre_pls, predict_fregre_pls, fregre_np
Honest model comparison Tecator fregre_cv, model_selection_ncomp
Recovering predictive regions Tecator significant_regions, pointwise_importance, functional_pdp
Phoneme recognition Phoneme fclassif_knn, fclassif_lda, fclassif_cv
Weather curves: FPCA & clustering Canadian Weather fpca, kmeans_fd, silhouette_score_data
Annual cycle detection Canadian Weather estimate_period_fft, seasonal_strength, stl_decompose
Geographic effects on rainfall Canadian Weather fpca, fosr
Inline spectra monitoring Tecator spm_phase1, spm_monitor, hotelling_t2
Detection power & false alarms Penicillin (synthetic) spm_phase1, t2_control_limit, arl0_t2
Penicillin batch monitoring Penicillin (synthetic) spm_phase1, spm_monitor, t2_pc_contributions

Reproducing locally

Every dataset is loadable outside the docs too:

import sys; sys.path.insert(0, "scripts")
from docs_data import (load_growth, load_canadian_weather, load_tecator,
                       load_phoneme, load_wine, load_sonar, load_penicillin)

age, X, meta = load_growth()          # (argvals, curves, labels)