cultivars.experimental#

Recent models that are not yet packaged anywhere, under a looser contract.

The stable subpackages promise that a public name keeps its meaning across minor releases. This one does not: it exists so that a model from a recent paper can be used, tested against its published results, and criticized before it earns that promise, and the price of that is that anything here may change or disappear in any minor release. Importing the package says so once, through ExperimentalWarning; filter that warning with warnings if you have read this page and accept the terms.

The rules a model here follows. It is not imported by the top-level package, so import cultivars never pays for it. It documents what has been verified and what has not: which fixture it reproduces, and which claims of its paper remain unchecked. It keeps the model-fit- result design of the stable packages, so a fitted result is a frozen record with a summary whose notes state its assumptions, and its errors derive from ValueError and RuntimeError like every other error the package raises. And it moves out on a schedule: once its replication fixture lands and its surface has held for two minor releases, it is promoted to its permanent subpackage under a stable name; four minor releases without promotion and it is removed. The roadmap lists what is here, what is next, and when each entry was admitted.

What is relaxed is the dependency contract, not the design. The stable packages run on numpy and scipy alone; a model here may be estimated by a library the core does not carry, in which case it lives in its own distribution and this package re-exports it, under a prefix that keeps its records distinct from the core’s. A re-exported result is not a cultivars result: the consumers written against the core’s protocols (identification, backtests, spectral views) do not accept it, and the page of each re-export says what does carry across.

Layout. spectral re-exports the Non-Stationary Spectral Decomposition Network from the ns-sdn distribution, a neural state-space model that reads a scalar series as a trend plus sinusoids whose amplitude, frequency and participation drift with a latent state.

Example

The warning is raised once, at import, and names its own class so that it can be silenced precisely:

>>> import warnings
>>> from cultivars.exceptions import ExperimentalWarning
>>> with warnings.catch_warnings():
...     warnings.simplefilter("ignore", ExperimentalWarning)
...     from cultivars.experimental.spectral import NSSDN
>>> NSSDN.__name__
'NSSDN'

Modules#

spectral

Non-Stationary Spectral Decomposition Network, re-exported from ns-sdn.