cultivars.summary#
The reporting surface: the records every fitted result renders itself through.
A fitted result is a frozen record, and summary() does not format
it; it returns a SummaryTable, a second record holding the
structure of the report – a title, a block of scalar metadata, one
coefficient table, and the closing notes that state what the numbers
assume – which renders on demand as fixed-width text, as HTML in a
notebook, or as a dataframe. InformationCriteria is the record
behind every information_criteria property: the three penalized
likelihoods,
for a maximized log-likelihood \(\ell\), parameter count \(k\) and sample size \(n\), with the convention for \(k\) stated by the result that produced it.
Two commitments shape the surface. First, the two records are defined
once, in _core, and this module is their public name: every
summary() and information_criteria in the package returns an
instance of the classes documented here, so their methods and fields are
stable API, and the engine pages document the same objects only as
internals. Second, nothing here is specific to a model family; a record
that needs more structure than a title, metadata, one table and notes
belongs beside the result that needs it.
Layout. SummaryTable with its to_text, to_html,
to_pandas and to_polars renderers, and InformationCriteria
with from_likelihood. Both live in _core._containers and are bound
to this module so that annotations, pickles and the API reference all
name them here.
Example
>>> import numpy as np
>>> from cultivars.summary import InformationCriteria, SummaryTable
>>> from cultivars.univariate.box_jenkins import ARIMA
>>> res = ARIMA(np.random.default_rng(0).standard_normal(120), order=(1, 0, 0)).fit()
>>> isinstance(res.summary(), SummaryTable)
True
>>> isinstance(res.information_criteria, InformationCriteria)
True
>>> SummaryTable.__module__, SummaryTable.__qualname__
('cultivars.summary', 'SummaryTable')
Classes#
Model-selection criteria computed from a fitted log-likelihood. |
|
A rendered-on-demand estimation summary. |