saving_factory#
- saving_factory(saving: str | tuple[Callable, Callable])[source]#
Return saving function and its initializer.
- Parameters:
- saving{“mean”} or tuple[Callable, Callable], default=”mean”
Name of saving function to use for anomaly detection.
- “mean”: The Gaussian likelihood ratio saving of a maximum likelihod
estimate of the mean versus a zero mean is used.
If a tuple, it must contain two numba jitted functions:
The first function is the saving function, which takes three arguments:
precomputed_params: The output of the second function.
starts: Start indices of the intervals to calculate the saving for.
ends: End indices of the intervals to calculate the saving for.
The algorithms that use the saving function govern what intervals are considered.
The second function is the initializer, which takes the data matrix as input and returns precomputed quantities that may speed up the saving calculations. If not relevant, just return the input data matrix.
- Returns:
- saving_funcCallable
Saving function.
- init_saving_funcCallable
Saving function initializer.
- Raises:
- ValueError
If saving is not recognized, an error is raised with a message indicating the valid options.