andrey.RegimeOutput#
- class andrey.RegimeOutput[source]#
The result of a regime-dependent method: the regime of each time step and one graph per regime.
rpcmcireturns this read-only result:regimesholds each step’s regime,weightsthe assigning process, andoutputs[k]theStructureOutputof regimek, as from a single-regime temporal method.metadataholds run values such as the algorithm name.print(out)shows each regime’s time-step share and graph.- classmethod new(outputs, weights, *, metadata=None)[source]#
Build a result from the regimes’ results and the regime-assigning process.
- Parameters:
outputs (
tuple[StructureOutput,...] |list[StructureOutput]) – One result per regime, in the order of the rows ofweights.weights (
ndarray) – The weight of each regime at each time step, each in[0, 1], summing to1at every step.metadata (
Mapping[str,str|bool|int|float|None|list|dict] |None) – Run values by name, asStructureOutput.new()takes them.
- Returns:
The result.
- Return type:
- Raises:
TypeError – If
metadatahas a valueStructureOutput.new()refuses.ValueError – If
weightsis not a 2-D array with one row per result, holds a value outside[0, 1], or has a column that does not sum to1within1e-9.
- property outputs: tuple[StructureOutput, ...]#
outputs[k]holds the graph of regimek.- Type:
One
StructureOutputper regime
- property weights: ndarray#
The
(n_regimes, n_samples)weight of each regime at each time step, a new array.