krikkit 0.1.0.dev0__py3-none-any.whl

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.
krikkit/__init__.py ADDED
@@ -0,0 +1,16 @@
1
+ """Select, validate and interpret latent dynamical-systems models of neural populations.
2
+
3
+ krikkit does not fit models itself. It drives and inspects models fitted by other
4
+ libraries, through a small set of capability protocols, and it reports every result with
5
+ what the latent inference was allowed to see, which coordinates the quantity lives in,
6
+ and how far it can be trusted.
7
+
8
+ The package is a scaffold for now: its subpackages exist and hold no analyses yet.
9
+ """
10
+
11
+ from importlib.metadata import version
12
+
13
+ __version__ = version("krikkit")
14
+ """Version of the installed krikkit distribution."""
15
+
16
+ __all__ = ["__version__"]
@@ -0,0 +1,8 @@
1
+ """Adapters that make models from third-party libraries speak the capability protocols.
2
+
3
+ Each adapter lives in its own module, imports its own third-party library and is imported
4
+ only when a user asks for it, so krikkit itself never depends on a modeling library. An
5
+ adapter imports the foundation modules and nothing else from krikkit.
6
+
7
+ No adapter exists yet.
8
+ """
@@ -0,0 +1,8 @@
1
+ """What a model's dynamics imply: fixed points, stability, sweeps and attractors.
2
+
3
+ The analyses here read a model through the capability protocols alone, exactly where the
4
+ model describes itself with canonical records and numerically where it offers only
5
+ callables. They import the foundation modules and nothing else from krikkit.
6
+
7
+ Nothing is implemented here yet.
8
+ """
@@ -0,0 +1,8 @@
1
+ """The shape of trajectories and subspaces: tangling, alignment and dimensionality.
2
+
3
+ Quantities that depend on the latent basis are computed in a canonical basis tied to the
4
+ observations, so that fits can be compared. The analyses here import the foundation
5
+ modules and nothing else from krikkit.
6
+
7
+ Nothing is implemented here yet.
8
+ """
krikkit/py.typed ADDED
File without changes
@@ -0,0 +1,9 @@
1
+ """Comparing a fit with a planted truth.
2
+
3
+ Recovery scores need ground truth, which sets them apart from the checks in
4
+ :mod:`krikkit.validation`. One study cell simulates, selects, validates, analyses and
5
+ compares, so this subpackage may import the foundation modules, the analyses, the
6
+ implementers and :mod:`krikkit.selection`.
7
+
8
+ Nothing is implemented here yet.
9
+ """
@@ -0,0 +1,8 @@
1
+ """Reference models: simple, exact implementations of the capability protocols.
2
+
3
+ They serve tests, tutorials and checks against known answers, and are not meant for
4
+ analysing recordings. As implementers of the protocols they import only the foundation
5
+ modules of krikkit.
6
+
7
+ Nothing is implemented here yet.
8
+ """
@@ -0,0 +1,9 @@
1
+ """What a reader sees: the audit of a fitted model, and optional plots.
2
+
3
+ The audit gathers what was fitted, what was tested and every caveat into one page. Plots
4
+ are drawn from saved results and need matplotlib, which is imported only inside the
5
+ function that draws. This subpackage may import every other part of krikkit except the
6
+ adapters and the testing tools.
7
+
8
+ Nothing is implemented here yet.
9
+ """
@@ -0,0 +1,8 @@
1
+ """Choosing a model: search over hyperparameters, folds and random starts.
2
+
3
+ Every run is kept, the choice follows a paired one-standard-error rule, and the chosen
4
+ model is refitted on all data and compared with its folds. This subpackage orchestrates
5
+ the analyses, so it imports the foundation modules and the analysis subpackages.
6
+
7
+ Nothing is implemented here yet.
8
+ """
@@ -0,0 +1,9 @@
1
+ """Simulated recordings with planted dynamics and a machine-checkable truth.
2
+
3
+ A simulation is assembled from latent dynamics, an optional switching rule, an emission
4
+ model and a sampling design. The planted system implements the same capability protocols
5
+ as a fitted model, so the truth goes through the same analyses as a fit. This subpackage
6
+ imports the foundation modules and the reference models.
7
+
8
+ Nothing is implemented here yet.
9
+ """
@@ -0,0 +1,9 @@
1
+ """Tools for testing a model against the capability protocols.
2
+
3
+ An ``isinstance`` check against a protocol confirms only that a method exists. The
4
+ conformance suite planned here checks what the method does, and it is meant for krikkit's
5
+ own tests and for the authors of adapters alike. It imports the foundation modules and
6
+ nothing else from krikkit.
7
+
8
+ Nothing is implemented here yet.
9
+ """
@@ -0,0 +1,9 @@
1
+ """Checks of a fitted model that need no ground truth.
2
+
3
+ Every score records what the latent inference was allowed to see: which units and which
4
+ time bins. The checks cover co-smoothing, forecasts, held-out likelihood, posterior
5
+ predictive checks and residuals, each against baselines. They import the foundation
6
+ modules and nothing else from krikkit.
7
+
8
+ Nothing is implemented here yet.
9
+ """
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: krikkit
3
+ Version: 0.1.0.dev0
4
+ Summary: Select, validate and interpret latent dynamical-systems models of neural population recordings
5
+ Keywords: neuroscience,dynamical systems,state-space models,model selection,model validation
6
+ Author: Darik A. O'Neil
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 2 - Pre-Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Topic :: Scientific/Engineering
17
+ Classifier: Typing :: Typed
18
+ Requires-Dist: numpy>=2.1
19
+ Requires-Dist: scipy>=1.14
20
+ Requires-Python: >=3.12
21
+ Project-URL: Repository, https://github.com/darikoneil/krikkit
22
+ Description-Content-Type: text/markdown
23
+
24
+ # krikkit
25
+
26
+ Select, validate and interpret latent dynamical-systems models fitted to neural population
27
+ recordings.
28
+
29
+ krikkit does not fit models itself. It drives and inspects models fitted by other libraries,
30
+ through a small set of capability protocols, and it reports every result with three labels:
31
+ what the latent inference was allowed to see, which coordinates the quantity lives in, and how
32
+ far it can be trusted.
33
+
34
+ ## Status
35
+
36
+ Pre-alpha. The repository holds the scaffold only: packaging, tool configuration, the empty
37
+ subpackages, and a test that enforces the layering between them. No analysis is implemented
38
+ yet.
39
+
40
+ The design is in
41
+ [`docs/specs/2026-11-25-krikkit-design.md`](docs/specs/2026-11-25-krikkit-design.md).
42
+
43
+ ## Layout
44
+
45
+ The package directory `krikkit/` sits at the repository root. A module imports only from the
46
+ layers below it, and `tests/test_layering.py` checks every import against that rule.
47
+
48
+ | Layer | Subpackages and modules | Job |
49
+ |---|---|---|
50
+ | Foundation | `data`, `splits`, `protocols`, `systems`, `results`, `errors` | The data container, the capability protocols, canonical records and result records |
51
+ | Implementers | `reference`, `simulate` | Reference models and planted systems that implement the protocols |
52
+ | Analyses | `dynamics`, `geometry`, `validation` | What a model implies and whether it predicts, read through the protocols alone |
53
+ | Orchestration | `selection`, `recovery` | Model search, and comparison of a fit with a planted truth |
54
+ | Presentation | `report` | The audit and the optional plots |
55
+ | Tooling | `testing` | The conformance suite for adapters |
56
+ | Adapters | `adapters` | One module per third-party modeling library |
57
+
58
+ The foundation modules are planned and not yet written.
59
+
60
+ ## Development
61
+
62
+ You need Python 3.12 or later and [uv](https://docs.astral.sh/uv/).
63
+
64
+ ```shell
65
+ git clone https://github.com/darikoneil/krikkit.git
66
+ cd krikkit
67
+ uv sync
68
+ ```
69
+
70
+ ```shell
71
+ uv run pytest # tests
72
+ uv run coverage run # tests under coverage
73
+ uv run coverage report # fails below 85% branch coverage
74
+ uv run ruff format . # format
75
+ uv run ruff check . --output-format concise # lint (the configured format is JSON)
76
+ uv run pyrefly check # type check
77
+ ```
78
+
79
+ ## License
80
+
81
+ MIT; see [LICENSE](LICENSE).
@@ -0,0 +1,16 @@
1
+ krikkit/__init__.py,sha256=XFJPl-PLqMrDTEGBtacNWtDwlDQRitz0TzUWn5Q_t5g,621
2
+ krikkit/adapters/__init__.py,sha256=Ix89hgpFBlARy4L881TJue7Z5VOhHiUjABQsTlHugII,365
3
+ krikkit/dynamics/__init__.py,sha256=T3_tWvXEGvJfSW7d9aVmDoswwvV408h6Mvo5_OKiPUY,370
4
+ krikkit/geometry/__init__.py,sha256=w7I0-0sxyNusYdXzgQzFZIq0ARitAvjy2h2ayefOJgA,335
5
+ krikkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ krikkit/recovery/__init__.py,sha256=Yl5orYBk2uxedNGD1rguKSzcZe_AFZfQFoDKDDwpqEU,367
7
+ krikkit/reference/__init__.py,sha256=7k7ull0fbVy0xnd78sWeNzXgPkys-6BjtkWbwj_iitk,310
8
+ krikkit/report/__init__.py,sha256=cQ8KGcB7tEkaQeNnBK4H1rqkEK-T1iJA5KsrHF9-Wa0,403
9
+ krikkit/selection/__init__.py,sha256=fPbiDcaOxwMy69YJDi_WJdW4DLelAGsBYYme4zFQucU,370
10
+ krikkit/simulate/__init__.py,sha256=_i0L9Wd9eIPNkW0RjkN8DEsZb-u2YAOFOoAuV1C1Kxg,439
11
+ krikkit/testing/__init__.py,sha256=4zb5BKrXja-4i8BFMunb1wVjzwKisoKr-sVKTUR_A2I,389
12
+ krikkit/validation/__init__.py,sha256=eLzKQo9cZXVBV1mcJi_54mcYw2-gFbrExkL4dr4iHG4,389
13
+ krikkit-0.1.0.dev0.dist-info/licenses/LICENSE,sha256=a2SlYfCMk47CDIWlMYBf2hm1bKpS1mCtYbtrIu2A33g,1094
14
+ krikkit-0.1.0.dev0.dist-info/WHEEL,sha256=UH59_qNuDUAa1VxQvC6fxmbl24EMw6DOIlT1yp8oeuU,78
15
+ krikkit-0.1.0.dev0.dist-info/METADATA,sha256=Yzame7hU0J0LGQqGhgNMSz-wgDCsHc59apURdMESSF8,3280
16
+ krikkit-0.1.0.dev0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.9.6
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Darik A O’Neil
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.