fdars 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. fdars-0.1.0/.github/workflows/ci.yml +77 -0
  2. fdars-0.1.0/.github/workflows/docs.yml +46 -0
  3. fdars-0.1.0/.github/workflows/publish.yml +96 -0
  4. fdars-0.1.0/.gitignore +27 -0
  5. fdars-0.1.0/Cargo.lock +647 -0
  6. fdars-0.1.0/Cargo.toml +20 -0
  7. fdars-0.1.0/Makefile +24 -0
  8. fdars-0.1.0/PKG-INFO +154 -0
  9. fdars-0.1.0/README.md +121 -0
  10. fdars-0.1.0/docs/align/advanced-alignment.md +225 -0
  11. fdars-0.1.0/docs/align/alignment-comparison.md +174 -0
  12. fdars-0.1.0/docs/align/elastic-alignment.md +419 -0
  13. fdars-0.1.0/docs/align/index.md +30 -0
  14. fdars-0.1.0/docs/align/landmark-registration.md +196 -0
  15. fdars-0.1.0/docs/align/shape-analysis.md +301 -0
  16. fdars-0.1.0/docs/align/tsrvf.md +174 -0
  17. fdars-0.1.0/docs/analyze/clustering.md +320 -0
  18. fdars-0.1.0/docs/analyze/covariance-functions.md +211 -0
  19. fdars-0.1.0/docs/analyze/elastic-clustering.md +211 -0
  20. fdars-0.1.0/docs/analyze/equivalence-testing.md +184 -0
  21. fdars-0.1.0/docs/analyze/gmm-clustering.md +215 -0
  22. fdars-0.1.0/docs/analyze/index.md +62 -0
  23. fdars-0.1.0/docs/analyze/outlier-detection.md +263 -0
  24. fdars-0.1.0/docs/analyze/seasonal-analysis.md +325 -0
  25. fdars-0.1.0/docs/analyze/tolerance-bands.md +233 -0
  26. fdars-0.1.0/docs/assets/cards/align.svg +20 -0
  27. fdars-0.1.0/docs/assets/cards/analyze.svg +14 -0
  28. fdars-0.1.0/docs/assets/cards/examples.svg +17 -0
  29. fdars-0.1.0/docs/assets/cards/hero.svg +30 -0
  30. fdars-0.1.0/docs/assets/cards/learn.svg +17 -0
  31. fdars-0.1.0/docs/assets/cards/monitoring.svg +20 -0
  32. fdars-0.1.0/docs/assets/cards/regression.svg +23 -0
  33. fdars-0.1.0/docs/assets/cards/represent.svg +15 -0
  34. fdars-0.1.0/docs/data/README.md +107 -0
  35. fdars-0.1.0/docs/data/canadian_weather.csv +366 -0
  36. fdars-0.1.0/docs/data/canadian_weather_meta.csv +36 -0
  37. fdars-0.1.0/docs/data/canadian_weather_precip.csv +366 -0
  38. fdars-0.1.0/docs/data/growth.csv +32 -0
  39. fdars-0.1.0/docs/data/phoneme.csv +401 -0
  40. fdars-0.1.0/docs/data/sonar.csv +209 -0
  41. fdars-0.1.0/docs/data/tecator.csv +241 -0
  42. fdars-0.1.0/docs/data/wine.csv +179 -0
  43. fdars-0.1.0/docs/examples/andrews-wine-clustering.md +236 -0
  44. fdars-0.1.0/docs/examples/andrews-wine-intro.md +190 -0
  45. fdars-0.1.0/docs/examples/andrews-wine-qc.md +267 -0
  46. fdars-0.1.0/docs/examples/andrews-wine.md +262 -0
  47. fdars-0.1.0/docs/examples/biopharma-monitoring.md +236 -0
  48. fdars-0.1.0/docs/examples/canadian-precipitation.md +211 -0
  49. fdars-0.1.0/docs/examples/canadian-seasonal.md +245 -0
  50. fdars-0.1.0/docs/examples/canadian-weather.md +186 -0
  51. fdars-0.1.0/docs/examples/cross-validation.md +265 -0
  52. fdars-0.1.0/docs/examples/explainability-regions.md +255 -0
  53. fdars-0.1.0/docs/examples/growth-alignment.md +158 -0
  54. fdars-0.1.0/docs/examples/index.md +159 -0
  55. fdars-0.1.0/docs/examples/inline-monitoring.md +230 -0
  56. fdars-0.1.0/docs/examples/phoneme-shape.md +220 -0
  57. fdars-0.1.0/docs/examples/sonar-tsrvf.md +204 -0
  58. fdars-0.1.0/docs/examples/tecator-monitoring.md +237 -0
  59. fdars-0.1.0/docs/examples/tecator-regression.md +177 -0
  60. fdars-0.1.0/docs/hooks.py +17 -0
  61. fdars-0.1.0/docs/index.md +303 -0
  62. fdars-0.1.0/docs/javascripts/katex.js +22 -0
  63. fdars-0.1.0/docs/learn/custom-plotting.md +301 -0
  64. fdars-0.1.0/docs/learn/derivatives.md +367 -0
  65. fdars-0.1.0/docs/learn/index.md +61 -0
  66. fdars-0.1.0/docs/learn/introduction.md +363 -0
  67. fdars-0.1.0/docs/learn/irregular-sampling.md +266 -0
  68. fdars-0.1.0/docs/learn/simulation.md +482 -0
  69. fdars-0.1.0/docs/learn/smoothing.md +423 -0
  70. fdars-0.1.0/docs/monitoring/advanced-spm.md +332 -0
  71. fdars-0.1.0/docs/monitoring/index.md +22 -0
  72. fdars-0.1.0/docs/monitoring/profile-partial-monitoring.md +219 -0
  73. fdars-0.1.0/docs/monitoring/spm.md +260 -0
  74. fdars-0.1.0/docs/reference/alignment.md +590 -0
  75. fdars-0.1.0/docs/reference/basis.md +262 -0
  76. fdars-0.1.0/docs/reference/classification.md +141 -0
  77. fdars-0.1.0/docs/reference/clustering.md +150 -0
  78. fdars-0.1.0/docs/reference/conformal.md +108 -0
  79. fdars-0.1.0/docs/reference/depth.md +326 -0
  80. fdars-0.1.0/docs/reference/explain.md +145 -0
  81. fdars-0.1.0/docs/reference/fdata.md +347 -0
  82. fdars-0.1.0/docs/reference/index.md +36 -0
  83. fdars-0.1.0/docs/reference/metric.md +426 -0
  84. fdars-0.1.0/docs/reference/outliers.md +85 -0
  85. fdars-0.1.0/docs/reference/regression.md +298 -0
  86. fdars-0.1.0/docs/reference/seasonal.md +175 -0
  87. fdars-0.1.0/docs/reference/simulation.md +95 -0
  88. fdars-0.1.0/docs/reference/smoothing.md +149 -0
  89. fdars-0.1.0/docs/reference/spm.md +99 -0
  90. fdars-0.1.0/docs/reference/tolerance.md +119 -0
  91. fdars-0.1.0/docs/regression/classification.md +243 -0
  92. fdars-0.1.0/docs/regression/conformal-classification.md +199 -0
  93. fdars-0.1.0/docs/regression/conformal-prediction.md +316 -0
  94. fdars-0.1.0/docs/regression/cross-validation.md +188 -0
  95. fdars-0.1.0/docs/regression/elastic-regression.md +227 -0
  96. fdars-0.1.0/docs/regression/explainability.md +281 -0
  97. fdars-0.1.0/docs/regression/function-on-scalar.md +204 -0
  98. fdars-0.1.0/docs/regression/index.md +70 -0
  99. fdars-0.1.0/docs/regression/regression-diagnostics.md +193 -0
  100. fdars-0.1.0/docs/regression/robust-regression.md +206 -0
  101. fdars-0.1.0/docs/regression/scalar-on-function.md +289 -0
  102. fdars-0.1.0/docs/regression/scalar-on-shape.md +199 -0
  103. fdars-0.1.0/docs/regression/uncertainty-quantification.md +178 -0
  104. fdars-0.1.0/docs/represent/andrews-transformation.md +192 -0
  105. fdars-0.1.0/docs/represent/basis-representation.md +357 -0
  106. fdars-0.1.0/docs/represent/depth-functions.md +361 -0
  107. fdars-0.1.0/docs/represent/distance-metrics.md +458 -0
  108. fdars-0.1.0/docs/represent/elastic-fpca.md +268 -0
  109. fdars-0.1.0/docs/represent/fpca.md +308 -0
  110. fdars-0.1.0/docs/represent/index.md +46 -0
  111. fdars-0.1.0/docs/represent/streaming-depth.md +173 -0
  112. fdars-0.1.0/docs/requirements.txt +9 -0
  113. fdars-0.1.0/docs/stylesheets/extra.css +206 -0
  114. fdars-0.1.0/mkdocs.yml +168 -0
  115. fdars-0.1.0/pyproject.toml +44 -0
  116. fdars-0.1.0/python/fdars/__init__.py +58 -0
  117. fdars-0.1.0/python/fdars/fdata_class.py +555 -0
  118. fdars-0.1.0/python/fdars/py.typed +0 -0
  119. fdars-0.1.0/scripts/docs_data.py +231 -0
  120. fdars-0.1.0/scripts/docs_fig.py +85 -0
  121. fdars-0.1.0/src/alignment_mod.rs +1866 -0
  122. fdars-0.1.0/src/basis_mod.rs +678 -0
  123. fdars-0.1.0/src/classification_mod.rs +279 -0
  124. fdars-0.1.0/src/clustering_mod.rs +298 -0
  125. fdars-0.1.0/src/conformal_mod.rs +487 -0
  126. fdars-0.1.0/src/convert.rs +76 -0
  127. fdars-0.1.0/src/depth_mod.rs +366 -0
  128. fdars-0.1.0/src/explain_mod.rs +2262 -0
  129. fdars-0.1.0/src/fdata_mod.rs +342 -0
  130. fdars-0.1.0/src/lib.rs +57 -0
  131. fdars-0.1.0/src/metric_mod.rs +431 -0
  132. fdars-0.1.0/src/outliers_mod.rs +160 -0
  133. fdars-0.1.0/src/regression_mod.rs +884 -0
  134. fdars-0.1.0/src/seasonal_mod.rs +694 -0
  135. fdars-0.1.0/src/simulation_mod.rs +349 -0
  136. fdars-0.1.0/src/smoothing_mod.rs +385 -0
  137. fdars-0.1.0/src/spm_mod.rs +636 -0
  138. fdars-0.1.0/src/tolerance_mod.rs +589 -0
  139. fdars-0.1.0/tests/test_basic.py +202 -0
  140. fdars-0.1.0/tests/test_fdata_class.py +306 -0
@@ -0,0 +1,77 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ env:
9
+ CARGO_TERM_COLOR: always
10
+ RUSTFLAGS: "-D warnings"
11
+
12
+ jobs:
13
+ fmt:
14
+ name: Rustfmt
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: dtolnay/rust-toolchain@stable
19
+ with:
20
+ components: rustfmt
21
+ - run: cargo fmt --check
22
+
23
+ clippy:
24
+ name: Clippy
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: dtolnay/rust-toolchain@stable
29
+ with:
30
+ components: clippy
31
+ - uses: Swatinem/rust-cache@v2
32
+ - run: cargo clippy --all-targets -- -D warnings
33
+
34
+ test-rust:
35
+ name: Rust tests (${{ matrix.toolchain }})
36
+ runs-on: ubuntu-latest
37
+ strategy:
38
+ matrix:
39
+ toolchain: [stable, "1.83"]
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - uses: dtolnay/rust-toolchain@master
43
+ with:
44
+ toolchain: ${{ matrix.toolchain }}
45
+ - uses: Swatinem/rust-cache@v2
46
+ with:
47
+ key: ${{ matrix.toolchain }}
48
+ - run: cargo test
49
+
50
+ test-python:
51
+ name: Python tests (${{ matrix.python-version }})
52
+ runs-on: ubuntu-latest
53
+ strategy:
54
+ matrix:
55
+ python-version: ["3.10", "3.12", "3.13"]
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ - uses: dtolnay/rust-toolchain@stable
59
+ - uses: Swatinem/rust-cache@v2
60
+ with:
61
+ key: py${{ matrix.python-version }}
62
+ - uses: actions/setup-python@v5
63
+ with:
64
+ python-version: ${{ matrix.python-version }}
65
+ - name: Create virtualenv and install dependencies
66
+ run: |
67
+ python -m venv .venv
68
+ source .venv/bin/activate
69
+ pip install maturin numpy pandas pytest
70
+ - name: Build and install
71
+ run: |
72
+ source .venv/bin/activate
73
+ maturin develop --release
74
+ - name: Run tests
75
+ run: |
76
+ source .venv/bin/activate
77
+ pytest tests/ -v
@@ -0,0 +1,46 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "docs/**"
8
+ - "python/**"
9
+ - "src/**"
10
+ - "scripts/**"
11
+ - "mkdocs.yml"
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: write
16
+
17
+ jobs:
18
+ deploy:
19
+ name: Deploy docs
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: "3.12"
26
+ - name: Install Rust toolchain
27
+ uses: dtolnay/rust-toolchain@stable
28
+ - name: Cache cargo
29
+ uses: Swatinem/rust-cache@v2
30
+ - name: Install docs dependencies
31
+ # maturin develop needs an activated virtualenv (same pattern as ci.yml).
32
+ run: |
33
+ python -m venv .venv
34
+ source .venv/bin/activate
35
+ pip install -r docs/requirements.txt maturin
36
+ - name: Build and install fdars (needed for build-time figures)
37
+ run: |
38
+ source .venv/bin/activate
39
+ maturin develop --release
40
+ - name: Build and deploy
41
+ # PYTHONPATH exposes scripts/docs_fig.py to markdown-exec code blocks.
42
+ env:
43
+ PYTHONPATH: scripts
44
+ run: |
45
+ source .venv/bin/activate
46
+ mkdocs gh-deploy --force
@@ -0,0 +1,96 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ linux:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ target: [x86_64, aarch64]
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.12"
23
+ - uses: PyO3/maturin-action@v1
24
+ with:
25
+ target: ${{ matrix.target }}
26
+ args: --release --out dist --find-interpreter
27
+ manylinux: auto
28
+ - uses: actions/upload-artifact@v4
29
+ with:
30
+ name: wheels-linux-${{ matrix.target }}
31
+ path: dist
32
+
33
+ macos:
34
+ runs-on: macos-latest
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ target: [x86_64, aarch64]
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.12"
44
+ - uses: PyO3/maturin-action@v1
45
+ with:
46
+ target: ${{ matrix.target }}
47
+ args: --release --out dist
48
+ - uses: actions/upload-artifact@v4
49
+ with:
50
+ name: wheels-macos-${{ matrix.target }}
51
+ path: dist
52
+
53
+ windows:
54
+ runs-on: windows-latest
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - uses: actions/setup-python@v5
58
+ with:
59
+ python-version: "3.12"
60
+ - uses: PyO3/maturin-action@v1
61
+ with:
62
+ args: --release --out dist
63
+ - uses: actions/upload-artifact@v4
64
+ with:
65
+ name: wheels-windows-x86_64
66
+ path: dist
67
+
68
+ sdist:
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - uses: PyO3/maturin-action@v1
73
+ with:
74
+ command: sdist
75
+ args: --out dist
76
+ - uses: actions/upload-artifact@v4
77
+ with:
78
+ name: wheels-sdist
79
+ path: dist
80
+
81
+ publish:
82
+ name: Publish to PyPI
83
+ runs-on: ubuntu-latest
84
+ needs: [linux, macos, windows, sdist]
85
+ environment: pypi
86
+ permissions:
87
+ id-token: write
88
+ steps:
89
+ - uses: actions/download-artifact@v4
90
+ with:
91
+ pattern: wheels-*
92
+ merge-multiple: true
93
+ path: dist
94
+ - uses: pypa/gh-action-pypi-publish@release/v1
95
+ with:
96
+ attestations: false
fdars-0.1.0/.gitignore ADDED
@@ -0,0 +1,27 @@
1
+ # Rust
2
+ /target/
3
+ Cargo.lock
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.pyc
8
+ *.pyo
9
+ *.egg-info/
10
+ dist/
11
+ build/
12
+ .venv/
13
+ *.so
14
+ *.whl
15
+
16
+ # IDE
17
+ .idea/
18
+ .vscode/
19
+ *.swp
20
+ *.swo
21
+
22
+ # mkdocs
23
+ /site/
24
+
25
+ # OS
26
+ .DS_Store
27
+ Thumbs.db