1.1 module-scoped API¶
Published 1.1.0 provides specialized sparse/irregular capabilities as stable module-scoped APIs. These names are intentionally not inserted into the frozen 1.0 root namespace. Later 1.2 workflow orchestration remains a separately qualified release candidate and is not part of the published 1.1 package.
Use the import paths shown below. The frozen 1.0 root API remains documented in Public API; the rationale and integration decisions are recorded in the 1.1 integration audit.
Conditional sparse PACE score uncertainty¶
eyetrajectoriespy.sparse_score_uncertainty.SparseFPCAScoreUncertaintyResult
dataclass
¶
Conditional Gaussian covariance for native sparse PACE scores.
Notes
These covariances condition on the fitted mean, covariance surface, eigensystem, measurement-error variance, and declared score-system regularization. They are not full sampling uncertainty for sparse FPCA.
Source code in src/eyetrajectoriespy/sparse_score_uncertainty.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
correlations
property
¶
correlations: ndarray
Return per-curve conditional score correlation matrices.
eyetrajectoriespy.sparse_score_uncertainty.sparse_fpca_score_uncertainty ¶
sparse_fpca_score_uncertainty(
fit: SparseFPCAResult,
trajectories: IrregularTrajectorySet,
*,
condition_limit: float | None = None,
failure_action: str = "error",
) -> SparseFPCAScoreUncertaintyResult
Compute conditional covariance of native sparse PACE scores.
For retained score vector xi_i and native observation times T_i,
this evaluates
Lambda - Lambda Phi_i.T Sigma_i^{-1} Phi_i Lambda
using the same full fitted covariance-plus-noise system as native PACE scoring. The calculation is conditional on the fitted population objects; population-estimation uncertainty is deliberately excluded.
Source code in src/eyetrajectoriespy/sparse_score_uncertainty.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
eyetrajectoriespy.sparse_score_uncertainty.sparse_fpca_score_uncertainty_frame ¶
sparse_fpca_score_uncertainty_frame(
result: SparseFPCAScoreUncertaintyResult,
) -> pd.DataFrame
Return one tidy row per curve and retained score component.
Source code in src/eyetrajectoriespy/sparse_score_uncertainty.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | |
eyetrajectoriespy.sparse_score_uncertainty_reporting.sparse_fpca_score_uncertainty_reporting_text ¶
sparse_fpca_score_uncertainty_reporting_text(
result: SparseFPCAScoreUncertaintyResult,
) -> str
Return manuscript-ready scope wording for conditional score uncertainty.
Source code in src/eyetrajectoriespy/sparse_score_uncertainty_reporting.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
Audited sparse-FPCA bandwidth selection¶
eyetrajectoriespy.sparse_bandwidth_selection.SparseFPCABandwidthSelectionResult
dataclass
¶
Auditable cross-validation result for sparse-FPCA bandwidth tuples.
Source code in src/eyetrajectoriespy/sparse_bandwidth_selection.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
eyetrajectoriespy.sparse_bandwidth_selection.select_sparse_fpca_bandwidths ¶
select_sparse_fpca_bandwidths(
trajectories: IrregularTrajectorySet,
*,
dimension: str,
evaluation_grid: ndarray,
mean_bandwidths: Sequence[float],
covariance_bandwidths: Sequence[float],
noise_bandwidth: float | None = None,
noise_support: tuple[float, float] | None = None,
analysis_support_action: str = "error",
noise_variance_method: str = "diagonal_difference",
measurement_error_variance: float | None = None,
n_splits: int = 5,
resampling_unit: str = "curve",
group_column: str | None = None,
shuffle: bool = True,
random_state: int | None = 0,
min_valid_folds: int | None = None,
failure_action: str = "retain",
predictive_condition_limit: float = 1000000000000.0,
psd_action: str = "error",
psd_tolerance: float = 1e-08,
positive_eigen_tolerance: float = 1e-10,
mean_smoother: str = "local_linear",
covariance_smoother: str = "local_linear",
kernel: str = "epanechnikov",
mean_min_local_points: int = 3,
covariance_min_local_pairs: int = 6,
noise_min_local_points: int = 3,
) -> SparseFPCABandwidthSelectionResult
Select sparse-FPCA mean/covariance bandwidths by held-out likelihood.
Each candidate is fitted from scratch inside every training fold. The loss for a held-out curve is its per-observation Gaussian negative log predictive density under the training-only fitted mean, full latent covariance, and measurement-error variance. Fold loss is the mean of the held-out curve losses, so curves rather than individual observations are the primary validation unit.
noise_bandwidth is not tuned in this first qualified tranche. When
diagonal-difference noise estimation is requested it must be supplied once
and is held fixed across all mean/covariance candidates and folds.
This selector never changes :func:fit_sparse_fpca defaults and never
invokes automatic tuning from inside the fitter. The selected numeric
bandwidths must be passed explicitly to a subsequent fit.
Source code in src/eyetrajectoriespy/sparse_bandwidth_selection.py
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | |
eyetrajectoriespy.sparse_bandwidth_selection.sparse_fpca_bandwidth_selection_reporting_text ¶
sparse_fpca_bandwidth_selection_reporting_text(
result: SparseFPCABandwidthSelectionResult,
) -> str
Return compact manuscript-ready wording for an audited selector result.
Source code in src/eyetrajectoriespy/sparse_bandwidth_selection.py
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | |
The result intentionally retains several audit tables rather than exposing one catch-all frame.
Observation-process diagnostics¶
eyetrajectoriespy.observation_process.ObservationProcessData
dataclass
¶
Validated explicit denominator for observation-process diagnostics.
Source code in src/eyetrajectoriespy/observation_process.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
eyetrajectoriespy.observation_process.ObservationProcessDiagnosticResult
dataclass
¶
Auditable descriptive diagnostics for an explicit observation process.
Source code in src/eyetrajectoriespy/observation_process.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
eyetrajectoriespy.observation_process.observation_process_data ¶
observation_process_data(
frame: DataFrame,
*,
curve_column: str,
time_column: str,
observed_column: str,
group_column: str | None = None,
candidate_predictors: Sequence[str] = (),
predictor_sources: Mapping[str, str] | None = None,
coordinate_columns: Sequence[str] = (),
time_unit: str = "unknown",
coordinate_system: str = "unknown",
provenance: Mapping[str, Any] | None = None,
) -> ObservationProcessData
Validate one explicit row per candidate/scheduled sample.
Candidate predictors must be available on every candidate row. Raw gaze
coordinates, when supplied, must be finite on retained rows and genuinely
missing (NaN) on unretained rows. Complete external state belongs in
candidate_predictors instead of being presented as recovered gaze.
Source code in src/eyetrajectoriespy/observation_process.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
eyetrajectoriespy.observation_process.diagnose_observation_process ¶
diagnose_observation_process(
process: ObservationProcessData,
*,
predictors: Sequence[str] | None = None,
history_predictors: Sequence[str] = (),
eccentricity_reference: tuple[float, float]
| None = None,
risk_set: str = "all_candidates",
time_basis: str | None = "linear",
time_bins: int | Sequence[float] | None = None,
association_bins: int | Sequence[float] | None = 4,
low_support_threshold: float = 0.1,
) -> ObservationProcessDiagnosticResult
Describe dependence and support in an explicit observation process.
No iid sample-level standard errors or p-values are reported. Association summaries are descriptive and do not identify MAR/MNAR mechanisms.
Source code in src/eyetrajectoriespy/observation_process.py
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | |
eyetrajectoriespy.observation_process.observation_process_frame ¶
observation_process_frame(
result: ObservationProcessDiagnosticResult,
*,
table: str = "associations",
) -> pd.DataFrame
Return one audited diagnostic table as a defensive copy.
Source code in src/eyetrajectoriespy/observation_process.py
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 | |
eyetrajectoriespy.observation_process.observation_process_reporting_text ¶
observation_process_reporting_text(
result: ObservationProcessDiagnosticResult,
) -> str
Return conservative manuscript-ready descriptive reporting text.
Source code in src/eyetrajectoriespy/observation_process.py
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | |
These APIs are descriptive diagnostics. They do not identify MAR/MNAR mechanisms or apply inverse-intensity correction.
Conditional sparse joint-PACE score uncertainty¶
eyetrajectoriespy.sparse_multivariate_score_uncertainty.SparseMFPCAScoreUncertaintyResult
dataclass
¶
Conditional Gaussian covariance for native sparse joint-PACE scores.
Notes
These covariances condition on the fitted joint covariance, eigensystem, measurement-error covariance, analysis support, and score-system ridge. They are not full sampling uncertainty for sparse multivariate FPCA.
Source code in src/eyetrajectoriespy/sparse_multivariate_score_uncertainty.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
correlations
property
¶
correlations: ndarray
Return per-curve conditional score correlation matrices.
eyetrajectoriespy.sparse_multivariate_score_uncertainty.sparse_mfpca_score_uncertainty ¶
sparse_mfpca_score_uncertainty(
fit: SparseMFPCAResult,
trajectories: IrregularTrajectorySet,
*,
condition_limit: float | None = None,
failure_action: str = "error",
) -> SparseMFPCAScoreUncertaintyResult
Compute conditional covariance of native sparse joint-PACE scores.
For the retained joint score vector xi_i this evaluates
Lambda - Lambda Phi_i.T Sigma_i^{-1} Phi_i Lambda
using exactly the full fitted joint latent covariance, two-channel
measurement-error covariance, native-time observation order, and score
ridge used by joint_pace_scores. Population-estimation uncertainty is
deliberately excluded.
Source code in src/eyetrajectoriespy/sparse_multivariate_score_uncertainty.py
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
eyetrajectoriespy.sparse_multivariate_score_uncertainty.sparse_mfpca_score_uncertainty_frame ¶
sparse_mfpca_score_uncertainty_frame(
result: SparseMFPCAScoreUncertaintyResult,
) -> pd.DataFrame
Return one tidy row per curve and retained joint score component.
Source code in src/eyetrajectoriespy/sparse_multivariate_score_uncertainty.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | |
eyetrajectoriespy.sparse_multivariate_score_uncertainty.sparse_mfpca_score_uncertainty_reporting_text ¶
sparse_mfpca_score_uncertainty_reporting_text(
result: SparseMFPCAScoreUncertaintyResult,
*,
digits: int = 3,
) -> str
Generate conservative manuscript-ready conditional-uncertainty text.
Source code in src/eyetrajectoriespy/sparse_multivariate_score_uncertainty.py
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | |
Audited sparse-MFPCA bandwidth selection¶
eyetrajectoriespy.sparse_multivariate_bandwidth_selection.SparseMFPCABandwidthSelectionResult
dataclass
¶
Auditable CV result for sparse-MFPCA mean/covariance bandwidths.
Source code in src/eyetrajectoriespy/sparse_multivariate_bandwidth_selection.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
eyetrajectoriespy.sparse_multivariate_bandwidth_selection.select_sparse_mfpca_bandwidths ¶
select_sparse_mfpca_bandwidths(
trajectories: IrregularTrajectorySet,
*,
dimensions: tuple[str, str] = ("x", "y"),
evaluation_grid: ndarray,
mean_bandwidths: Sequence[float],
covariance_bandwidths: Sequence[float],
measurement_error: str,
measurement_error_variance: tuple[float, float]
| None = None,
measurement_error_covariance: ndarray | None = None,
analysis_support_action: str = "error",
n_splits: int = 5,
resampling_unit: str = "curve",
group_column: str | None = None,
shuffle: bool = True,
random_state: int | None = 0,
min_valid_folds: int | None = None,
failure_action: str = "retain",
predictive_condition_limit: float = 1000000000000.0,
psd_action: str = "error",
psd_tolerance: float = 1e-08,
mean_min_local_points: int = 3,
covariance_min_local_pairs: int = 6,
) -> SparseMFPCABandwidthSelectionResult
Select native sparse-MFPCA mean/covariance bandwidths by CV likelihood.
Each candidate refits the direct sparse planar population mean and Cxx/Cxy/Cyy covariance surfaces from training curves only. Held-out loss is the Gaussian negative log predictive density from the full fitted joint covariance plus the analyst-declared 2x2 measurement-error covariance, normalized by the number of scalar planar observations (2*m_i). Fold loss is the equal-weight mean across held-out curves.
Joint-PACE score estimation is not part of the criterion. The selector does
not tune measurement error, rank, score ridge, PSD policy, evaluation grid,
or support policy and never applies selected bandwidths automatically to
:func:fit_sparse_mfpca.
Source code in src/eyetrajectoriespy/sparse_multivariate_bandwidth_selection.py
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 | |
eyetrajectoriespy.sparse_multivariate_bandwidth_selection.sparse_mfpca_bandwidth_selection_reporting_text ¶
sparse_mfpca_bandwidth_selection_reporting_text(
result: SparseMFPCABandwidthSelectionResult,
*,
digits: int = 3,
) -> str
Return conservative audit-oriented reporting text for the selector.
Source code in src/eyetrajectoriespy/sparse_multivariate_bandwidth_selection.py
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 | |
The measurement-error covariance is declared separately and is not silently tuned by this selector.
Native sparse participant/trial multilevel FPCA¶
eyetrajectoriespy.sparse_multilevel.SparseMultilevelFPCAResult
dataclass
¶
Native sparse two-level participant/trial functional decomposition.
Source code in src/eyetrajectoriespy/sparse_multilevel.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
eyetrajectoriespy.sparse_multilevel.fit_sparse_multilevel_fpca ¶
fit_sparse_multilevel_fpca(
trajectories: IrregularTrajectorySet,
*,
dimension: str,
participant_column: str,
participant_components: int,
trial_components: int,
evaluation_grid: ndarray,
mean_bandwidth: float,
total_covariance_bandwidth: float,
between_covariance_bandwidth: float,
noise_bandwidth: float | None = None,
noise_support: tuple[float, float] | None = None,
analysis_support_action: str = "error",
weighting: str = "observation",
mean_smoother: str = "local_linear",
covariance_smoother: str = "local_linear",
kernel: str = "epanechnikov",
noise_variance_method: str = "diagonal_difference",
measurement_error_variance: float | None = None,
psd_action: str = "error",
psd_tolerance: float = 1e-08,
positive_eigen_tolerance: float = 1e-10,
score_ridge: float = 0.0,
score_condition_limit: float = 1000000000000.0,
min_participant_score_samples: int = 2,
score_failure_action: str = "error",
mean_min_local_points: int = 3,
total_covariance_min_local_pairs: int = 6,
between_covariance_min_local_pairs: int = 6,
noise_min_local_points: int = 3,
) -> SparseMultilevelFPCAResult
Fit native sparse participant/trial multilevel FPCA.
The estimator targets an exchangeable two-level hierarchy. Trial-condition or visit-specific fixed functional effects are not estimated; users must stratify or remove such effects upstream when scientifically required.
Raw sparse trials remain on native grids. evaluation_grid is used only
for fitted population functions/operators. Population quantities are later
evaluated at native times for joint participant/trial BLUP scores.
The first tranche uses observation/raw-pair weighting. Participants with more retained observations or covariance pairs can therefore contribute more to local smoothers; this is recorded explicitly and is not described as equal-participant weighting.
Source code in src/eyetrajectoriespy/sparse_multilevel.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | |
eyetrajectoriespy.sparse_multilevel.sparse_multilevel_fpca_reporting_text ¶
sparse_multilevel_fpca_reporting_text(
result: SparseMultilevelFPCAResult, *, digits: int = 3
) -> str
Generate manuscript-ready wording for the sparse multilevel fit.
Source code in src/eyetrajectoriespy/sparse_multilevel.py
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | |
Participant scores, trial scores, and score diagnostics remain separate result tables because they have different observational units.
Asynchronous coordinate-specific sparse planar MFPCA¶
eyetrajectoriespy.sparse_multivariate_async.SparseAsyncMFPCAResult
dataclass
¶
Native asynchronous sparse planar MFPCA/PACE result.
The input may contain coordinate-specific missingness on each curve's exact union of native x/y timestamps. No raw interpolation or synchronization is implied by this result.
Source code in src/eyetrajectoriespy/sparse_multivariate_async.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
eyetrajectoriespy.sparse_multivariate_async.fit_sparse_mfpca_async ¶
fit_sparse_mfpca_async(
trajectories: IrregularTrajectorySet,
*,
dimensions: tuple[str, str] = ("x", "y"),
n_components: int,
evaluation_grid: ndarray,
mean_bandwidth: float,
covariance_bandwidth: float,
measurement_error: str,
measurement_error_variance: tuple[float, float]
| None = None,
measurement_error_covariance: ndarray | None = None,
analysis_support_action: str = "error",
same_time_tolerance: float = 0.0,
psd_action: str = "error",
psd_tolerance: float = 1e-08,
positive_eigen_tolerance: float = 1e-10,
score_ridge: float = 0.0,
score_condition_limit: float = 1000000000000.0,
min_score_observations: int = 2,
score_failure_action: str = "error",
mean_min_local_points: int = 3,
covariance_min_local_pairs: int = 6,
) -> SparseAsyncMFPCAResult
Fit native asynchronous sparse planar MFPCA with joint PACE scores.
Each curve may observe x and y on different native grids. The existing
:class:IrregularTrajectorySet is interpreted as an exact union-of-native-
timestamps representation: a coordinate-specific NaN means that
coordinate was not observed at that exact timestamp. Rows where both
requested coordinates are absent are invalid.
Raw observations are never interpolated, nearest-neighbour synchronized,
or binned. The common evaluation_grid belongs only to fitted population
functions. Latent Cxy excludes simultaneous x-y residual products, while a
declared correlated measurement-error covariance is used only for x/y
scalar observations that are simultaneous within same_time_tolerance.
Source code in src/eyetrajectoriespy/sparse_multivariate_async.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |
eyetrajectoriespy.sparse_multivariate_async.sparse_mfpca_async_score_frame ¶
sparse_mfpca_async_score_frame(
result: SparseAsyncMFPCAResult,
) -> pd.DataFrame
Return asynchronous joint scores with curve IDs and metadata.
Source code in src/eyetrajectoriespy/sparse_multivariate_async.py
290 291 292 293 294 295 296 297 298 299 300 301 | |
eyetrajectoriespy.sparse_multivariate_async.sparse_mfpca_async_reporting_text ¶
sparse_mfpca_async_reporting_text(
result: SparseAsyncMFPCAResult, *, digits: int = 3
) -> str
Generate audit-oriented reporting text for asynchronous sparse MFPCA.
Source code in src/eyetrajectoriespy/sparse_multivariate_async.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | |
This path operates on exact coordinate-specific native observation times represented by a union timestamp container. It does not interpolate or nearest-neighbour synchronize raw x/y measurements.
Sparse partial/future trajectory prediction¶
eyetrajectoriespy.sparse_partial_prediction.SparseFPCAPartialPredictionResult
dataclass
¶
Conditional prediction of a future trajectory segment.
The latent covariance is conditional on the fitted population mean,
covariance surface, measurement-error variance and declared history-system
regularization. observed_predictive_covariance additionally includes
the fitted measurement-error variance at each future target point. The
numerical history ridge is never relabelled as future measurement noise.
Source code in src/eyetrajectoriespy/sparse_partial_prediction.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
eyetrajectoriespy.sparse_partial_prediction.sparse_fpca_partial_trajectory_prediction ¶
sparse_fpca_partial_trajectory_prediction(
fit: SparseFPCAResult,
trajectory: IrregularTrajectorySet,
*,
history_cutoff: float,
prediction_grid: ndarray,
min_history_observations: int = 2,
condition_limit: float | None = None,
history_ridge: float | None = None,
) -> SparseFPCAPartialPredictionResult
Predict a latent future trajectory from native sparse history.
The conditional predictor uses the complete fitted covariance surface:
mu_f + C_fo Sigma_oo^{-1} (Y_o - mu_o)
with latent conditional covariance
C_ff - C_fo Sigma_oo^{-1} C_of.
Sigma_oo contains the full fitted history covariance plus fitted
measurement-error variance and an optional numerical history ridge. The
raw target history is never interpolated and observations after
history_cutoff are ignored completely.
Source code in src/eyetrajectoriespy/sparse_partial_prediction.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | |
eyetrajectoriespy.sparse_partial_prediction.sparse_fpca_partial_prediction_frame ¶
sparse_fpca_partial_prediction_frame(
result: SparseFPCAPartialPredictionResult,
) -> pd.DataFrame
Return one row per future prediction-grid point.
Source code in src/eyetrajectoriespy/sparse_partial_prediction.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | |
eyetrajectoriespy.sparse_partial_prediction.sparse_fpca_partial_prediction_reporting_text ¶
sparse_fpca_partial_prediction_reporting_text(
result: SparseFPCAPartialPredictionResult,
*,
digits: int = 3,
) -> str
Generate audit-oriented wording for a sparse partial prediction.
Source code in src/eyetrajectoriespy/sparse_partial_prediction.py
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | |
The conditional moments use the full fitted sparse-FPCA covariance and are conditional on the fitted population objects.
Participant-aware split-conformal future-trajectory bands¶
eyetrajectoriespy.sparse_partial_conformal.SparseFPCAPartialConformalCalibrationResult
dataclass
¶
Split-conformal calibration for a fixed future grid and cutoff.
Source code in src/eyetrajectoriespy/sparse_partial_conformal.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
eyetrajectoriespy.sparse_partial_conformal.SparseFPCAPartialConformalBandResult
dataclass
¶
Simultaneous finite-grid band for a future observed trajectory.
Source code in src/eyetrajectoriespy/sparse_partial_conformal.py
57 58 59 60 61 62 63 64 65 66 67 68 69 | |
eyetrajectoriespy.sparse_partial_conformal.calibrate_sparse_fpca_partial_prediction_conformal ¶
calibrate_sparse_fpca_partial_prediction_conformal(
fit: SparseFPCAResult,
calibration: IrregularTrajectorySet,
*,
history_cutoff: float,
prediction_grid: ndarray,
alpha: float = 0.05,
group_column: str | None = None,
min_history_observations: int = 2,
condition_limit: float | None = None,
history_ridge: float | None = None,
) -> SparseFPCAPartialConformalCalibrationResult
Calibrate a simultaneous finite-grid future-observation band.
Curve-level nonconformity is the maximum standardized absolute residual over
the declared future target grid. With group_column supplied, curve
scores are aggregated by maximum within participant/group before the
conformal order statistic is computed, making the declared exchangeability
unit the participant/group rather than repeated trial.
Source code in src/eyetrajectoriespy/sparse_partial_conformal.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | |
eyetrajectoriespy.sparse_partial_conformal.sparse_fpca_conformal_prediction_band ¶
sparse_fpca_conformal_prediction_band(
calibration: SparseFPCAPartialConformalCalibrationResult,
trajectory: IrregularTrajectorySet,
) -> SparseFPCAPartialConformalBandResult
Apply a fitted conformal calibration to one new target trajectory.
Source code in src/eyetrajectoriespy/sparse_partial_conformal.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | |
eyetrajectoriespy.sparse_partial_conformal.sparse_fpca_conformal_band_frame ¶
sparse_fpca_conformal_band_frame(
result: SparseFPCAPartialConformalBandResult,
) -> pd.DataFrame
Return the finite-grid conformal prediction band as a tidy frame.
Source code in src/eyetrajectoriespy/sparse_partial_conformal.py
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
eyetrajectoriespy.sparse_partial_conformal.sparse_fpca_conformal_band_reporting_text ¶
sparse_fpca_conformal_band_reporting_text(
result: SparseFPCAPartialConformalBandResult,
*,
digits: int = 3,
) -> str
Generate reporting text with an explicit finite-grid coverage scope.
Source code in src/eyetrajectoriespy/sparse_partial_conformal.py
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | |
The conformal claim is simultaneous finite-grid coverage for future observed measurements under the declared exchangeability/grouping contract. It is not continuous-domain latent-function coverage.
Compatibility note¶
These supported 1.1 module paths are additive. They do not alter the signatures, result schemas, or scientific meanings frozen in ONE_DOT_ZERO_API_STABILITY.json. A later decision to expose selected names at package root would itself be an additive API decision and would require a separate explicit review; this page does not imply such promotion.