Tutorial gallery¶
Choose a tutorial by the scientific problem rather than by the function name.
-
See the methods before running them
Browse deterministic figures generated from the package's plotting API, with direct links to worked examples and equations.
-
Read the implementation-matched equations
Use the LaTeX mathematical reference to connect public functions to the exact estimands, transformations, studentization, and calibration implemented in code.
-
Query equations from Python
Inspect the same function → LaTeX contracts programmatically and export a tidy function-level table.
-
See the decision flow
Follow rendered diagrams from representation choice through validation and inferential scope.
-
Analyze recurrence and nonlinear state-space dynamics
Reconstruct state space explicitly, quantify recurrent structure, inspect time-varying RQA, estimate local divergence, and compare with IAAFT surrogates.
-
Inspect recurrence geometry as a sparse network
Convert one declared auto-recurrence plot to an undirected sparse graph and inspect degree, clustering, transitivity, and connected components without retuning the recurrence threshold.
-
Joint recurrence across synchronized systems
Keep gaze, pupil, physiology, or other synchronized subsystem state spaces separate, build their recurrence plots under explicit contracts, then inspect their logical intersection and JRQA summaries.
-
Preserve planar linear structure in surrogate testing
Generate joint x/y MIAAFT surrogates, inspect retained power/cross-spectrum mismatch, and evaluate a multichannel nonlinear statistic without independently randomizing gaze dimensions.
-
Study repeated-cycle return stability
Define an explicit Poincare section and fit an experimental local return map without calling the result classical Floquet stability.
-
Continuous 2-D viewing strategy
Preserve horizontal and vertical location jointly and identify dominant whole-trajectory modes.
-
Compare ordered gaze trajectories elastically
Contrast discrete Fréchet bottleneck separation with cumulative DTW alignment, compare the predeclared symmetric1 or symmetric2/N+M contract, inspect the path/coupling, and keep timing assumptions explicit.
-
Check whether trajectory similarity depends on the distance contract
Compare predeclared L2, discrete Fréchet, and DTW specifications using pair-distance rank agreement and local top-k neighbor overlap without selecting a winner.
-
Irregular sampling
Keep native sample times, audit gaps, then choose an explicit common-grid projection.
-
Repeated trials
Separate stable participant-level trajectory variation from trial-level deviation.
-
Are my FPCs stable?
Bootstrap people or curves, match component functions, and inspect reconstruction error.
-
How many FPCs should I retain?
Use leakage-safe held-out reconstruction CV, then inspect matched-bootstrap FPC shape uncertainty.
-
Which FPC count predicts an external outcome?
Tune ordinary FPC regression inside folds and use nested participant-grouped CV when predictive performance is itself a result.
-
Do my FPC labels rotate inside a stable subspace?
Inspect adjacent eigengaps, principal angles, and bootstrap projector distance for a component block.
-
Do I need uncertainty for the mean trajectory?
Use a studentized Gaussian multiplier maximum over the full observed time × dimension grid, with participant-level units for repeated trials.
-
What did registration remove?
Analyze warping functions as phase outcomes and compare spatial FPCs before and after alignment.
-
AOI allocation as a composition
Respect the probability simplex instead of treating AOI probabilities as independent channels.
-
Trajectory to behavioral outcome
Use retained FPC scores as a transparent low-dimensional approximation for scalar prediction.
-
Experimental predictors to continuous gaze response
Estimate coefficient functions for condition or participant variables and calibrate observed-grid simultaneous bands without silently treating repeated trials as independent.
-
Binary/count functional response with scalar predictors
Fit population-averaged Bernoulli/logit or Poisson/log coefficient functions with participant-clustered robust GEE, then calibrate whole-participant bootstrap simultaneous bands on the link scale.
-
What marginal probability/count trajectory is predicted for a fixed covariate profile?
Project a fitted generalized FoSR through predeclared scalar profiles, reuse the whole-participant bootstrap for simultaneous response-scale bands, flag extrapolative targets, and compare one predeclared pair without post-hoc profile selection.
-
Repeated trials with trial-varying predictors
Fit one joint Gaussian functional mixed model with a participant-specific functional random intercept, and optionally one explicitly declared random functional slope, instead of averaging trials or running separate pointwise models.
-
Do mixed-effects conclusions depend on covariance structure?
Compare already fitted, predeclared participant/trial/residual covariance structures against an explicit reference, retaining failed structures and separating coefficient, uncertainty, variance-decomposition, residual, and information-criterion sensitivity without automatic model selection.
-
Basis representation
Project a selected functional dimension to B-spline or Fourier coordinates through scikit-fda.
-
Is one participant driving the FPCA?
Combine reconstruction/score-space review diagnostics with participant-level omission sensitivity.
-
Are my irregular curves too sparse to interpolate?
Keep curve-specific grids and use optional FDApy covariance UFPCA with PACE conditional-expectation scores.
Simultaneous FPC-shape uncertainty¶
Use Simultaneous FPC bands when the scientific claim concerns an entire estimated eigenfunction rather than pointwise descriptive variation. The example uses participant-level resampling, compares component-wise and familywise calibration, and shows the near-tie identifiability screen.
FPCA spectrum uncertainty¶
Use FPCA spectrum uncertainty when eigenvalues or explained-variance summaries need uncertainty rather than point estimates alone. The worked example distinguishes matched individual spectrum quantities from rank-ordered cumulative variance and compares component-wise with familywise calibration.
FPC score basis-resampling uncertainty¶
Use FPC score basis uncertainty when score coordinates themselves need a stability/uncertainty analysis rather than being treated as fixed after FPCA. The worked example keeps targets fixed, resamples participants to refit the basis, matches/sign-aligns bootstrap components, and distinguishes basis uncertainty from measurement or downstream-model uncertainty.
Gaussian FPCR bootstrap uncertainty¶
Use Gaussian FPCR bootstrap uncertainty when a scalar-on-function Gaussian regression result needs uncertainty that propagates re-estimation of the FPCA basis. The worked example uses participant-level paired resampling, reconstructs the slope in original x/y units, and separates conditional-mean intervals from future-outcome prediction intervals.
Gaussian FPCR simultaneous slope bands¶
Use Gaussian FPCR simultaneous slope bands after a paired-bootstrap Gaussian FPCR fit when one observed-grid band is required for the reconstructed slope. The tutorial compares global and dimension-wise calibration and emphasizes that the result is neither a continuous-domain band nor the operator-scaled FPCR significance test.
Gaussian FPCR future-outcome prediction¶
Use Gaussian FPCR future-outcome prediction when the scientific target is a future observed scalar response rather than only its fitted conditional mean. The worked example keeps the underlying paired-bootstrap mean distribution visible and adds response noise through centered empirical residual resampling.
Conformal FPCA anomaly review¶
Use Conformal FPCA anomaly review when genuinely new common-grid trajectories must be assessed relative to a reference population. The example keeps proper training, calibration, and targets disjoint; demonstrates exact finite p-value resolution; and contrasts reconstruction versus score-space nonconformity.
Heteroscedastic Gaussian FPCR wild bootstrap¶
Use Heteroscedastic FPCR wild bootstrap when the functional regressors are treated as fixed but scalar response variance may be heterogeneous. The example uses one trajectory per participant, makes k=g and h explicit, recomputes the heteroscedastic studentization scale in each pseudo-fit, and distinguishes target projection inference from future-outcome prediction.
Simultaneous fixed-target FPCR wild bootstrap¶
Use Simultaneous fixed-target FPCR wild bootstrap when one declared family of fixed target projections needs familywise rather than separate target-wise calibration. The example reuses the exact heteroscedastic wild-bootstrap root matrix, compares target-wise with max-|t| simultaneous intervals, and makes the fixed-target scope explicit.
Fixed-family FPCR wild-bootstrap hypothesis tests¶
Use Fixed-family FPCR wild-bootstrap tests when a declared set of fixed target projections needs explicit two-sided testing rather than confidence intervals alone. The example compares target-wise and single-step maxT-adjusted bootstrap probabilities, reports the complete-family global test, and makes the subset-pivotality boundary explicit.
Wild-bootstrap Monte Carlo precision¶
Use Wild-bootstrap Monte Carlo precision after a fixed-family test when the finite number of retained bootstrap replicates needs an explicit precision audit. The example reports exceedance counts, raw tail fractions, MCSEs, exact binomial intervals, and stability flags without changing the original plus-one/raw test probabilities.
Stabilized-volatility FPCR wild-bootstrap selection¶
Use Stabilized-volatility wild-bootstrap selection when k=g is fixed but the target-inference truncation h needs a declared data-driven tuning rule. The example scans consecutive h values with shared multipliers, plots target-specific interval stability, applies explicit rho_w/rho_c/r criteria, and demonstrates the no-silent-fallback failure contract.
One participant random functional slope¶
Use the worked random-slope example when the scientific question is whether participants differ over trial time in the effect of one predeclared within-participant predictor. The example audits the 2q-dimensional covariance, participant-count guard, covariance blocks, eigenvalues, condition number, and participant BLUP slope functions.
See also the random-functional-slope method guide.
Simultaneous functional mixed-effects coefficient bands¶
Use the worked simultaneous mixed-effects example when repeated trials remain in the joint mixed model and the inferential target is an entire fixed coefficient trajectory rather than separate pointwise intervals. Whole participants are resampled, coefficient/family scope is explicit, and covariance parameters remain fixed at the reference fit.
See also the method guide.
Full-refit mixed-effects bootstrap¶
Use the worked full-refit mixed-effects example when the question is how re-estimating the random-effect covariance and residual variance changes fixed-effect whole-function uncertainty relative to the 0.44 fixed-covariance bootstrap.
The example also audits duplicate participant group identities and variance-component stability.
Directed dependence¶
For already-discrete source/target state sequences, continue with the transfer-entropy method guide and worked example. The workflow requires explicit histories, lag, and—when used—an explicit surrogate shift set.
For robustness across several defensible discrete-TE histories or lags, continue with the transfer-entropy sensitivity guide and worked sensitivity example.
For directed predictive information after adjusting for one explicitly supplied discrete process, continue with the conditional transfer entropy guide and worked conditional-TE example.