class ImpliedTimescales¶
- class deeptime.util.validation.ImpliedTimescales(lagtimes, its, its_stats=None)¶
Instances of this class hold a sequence of lagtimes and corresponding process timescales (potentially with process timescales of sampled models in a Bayesian setting). Objects can be used with
plot_implied_timescales
.In case models over a range of lagtimes are available, the static method
from_models()
can be used.- Parameters:
lagtimes (iterable of int) – Lagtimes corresponding to processes and their timescales.
its (iterable of ndarray) – The timescales for each process, shape (n_lagtimes, n_processes).
its_stats (list of list of ndarray, optional, default=None) – Sampled timescales of shape (n_lagtimes, n_processes, n_samples).
Attributes
Whether the data contains samples.
Yields the lagtimes corresponding to an instance of this class.
Maximum number of processes.
Maximum number of samples.
Number of lagtimes.
Methods
n_samples
(lagtime_index, process_index)Yields the number of samples for a particular lagtime and a particular process.
plot
(*args, **kw)Dispatches to
plot_implied_timescales()
.samples_for_process
(process_index)Yields timescales samples for a particular process.
timescales_for_process
(process_index)Yields maximum-likelihood timescales for a particular process.
- n_samples(lagtime_index: int, process_index: int) int ¶
Yields the number of samples for a particular lagtime and a particular process.
- Parameters:
lagtime_index (int) – The lagtime index corresponding to
lagtimes
.process_index (int) – The process index.
- Returns:
n_samples – The number of samples.
- Return type:
int
- plot(*args, **kw)¶
Dispatches to
plot_implied_timescales()
.
- samples_for_process(process_index: int) ndarray ¶
Yields timescales samples for a particular process.
- Parameters:
process_index (int) – The process.
- Returns:
timescales_samples – The sampled timescales for a particular process. Might contain NaN.
- Return type:
ndarray(lagtimes, max_n_samples)
- timescales_for_process(process_index: int) ndarray ¶
Yields maximum-likelihood timescales for a particular process.
- Parameters:
process_index (int) – The process.
- Returns:
timescales – The timescales for the particular process. Might contain NaN.
- Return type:
ndarray (lagtimes,)
- property has_samples: bool¶
Whether the data contains samples.
- property lagtimes: ndarray¶
Yields the lagtimes corresponding to an instance of this class.
- property max_n_processes: int¶
Maximum number of processes.
- property max_n_samples: int¶
Maximum number of samples.
- property n_lagtimes: int¶
Number of lagtimes.