Anticpy

Latest version: v0.0.8.post1

Safety actively analyzes 630094 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.0.7

The structure of the package has changed slightly due to enhancements of the `early_warnings` package and significant improvements of the already implemented methods. The update is backwards compatible. It might only be necessary to adapt the antiCPy import statements of old Python scripts.

This **antiCPy** "James Bond" release 0.0.7 contains significant enhancements and improvements:

- The MCMC based `LangevinEstimation` model is complemented by a two dimensional model in the `NonMarkovEstimation` class. Instead of a Wiener process noise term, an Ornstein-Uhlenbeck process Y couples into X. It is possible to define _a priori_ a time scale separation between X and Y to mirror prior knowledge.
- The implemented models including the new two dimensional model can be estimated via a maximum posterior (MAP) approach which is much faster than the MCMC version. The corresponding method is `perform_MAP_resilience_scan(...)`. This is thought to be advantageous to scan new data for resilience changes without time-consuming computations. Special attention might be dedicated to the confidence bands of the MAP estimates (cf. documentation).
- Furthermore, the MAP approach is implemented in the child class `BinningLangevinEstimation`. The binned version leads to additional speed ups if the time windows contain much data. Otherwise, use the normal MAP approach.
- Additionally, the computation time of the MCMC and MAP versions is optimized by implementing the resilience estimation of multiple windows at the same time by `multiprocessing`. In that way, the serial computation times are basically divided by the number of dedicated processes. To this end, a superclass `RocketFastResilienceEstimation` implements a `fast_resilience_scan(...)` and `fast_MAP_resilience_scan(...)` method. They make use of the child classes per parallel window calculation.
- A second resilience measure, the _dominant eigenvalue_ is introduced under `early_warnings`: first, the _drift slope_ (in the `drift_slope` package) and second, the _dominant eigenvalue_. The `dominant_eigenvalue` package implements basic functions to perform a dominant eigenvalue estimation. It is not structured by classes, but by procedural modules.

Further notes:

- The documentation is largely enhanced and includes now comments on the efficient change point analysis as well as a description of the added classes and methods which are mentioned above.
- In case of the `dominant_eigenvalue` package, a tutorial and mathematical chapters are added to the documentation.

0.0.6

**Main Enhancements:**

1. Linear detrending or Gaussian kernel smoothed detrending window-wise or for whole datasets in the early warning subpackage with complete documentation.
2. Multiprocessing of the BatchedCPSegmentFit class in the trend_extrapolation package and improved memory management.
3. Simple function to compute the expected change point positions.
4. Function with multiprocessing option to compute the whole change point probability density functions.

**Bug fixes:**

1. Fix unnecessary and too early memory allocation of the A_matrix in BatchedCPSegmentFit to avoid memory issues.

0.0.5

**Main enhancement:**

- Add a batch-wise implementation of the change point analysis algorithm to avoid memory errors in the case of a high amount of data and possible change point configurations.

**Bug fixes:**
- Fix an index error in the change point probability normalization via a Riemann sum of rectangles.

0.0.4

The release contains bug fixes for the ``LangevinEstimation`` class:

- The attributes ``drift_model`` and ``diffusion_model`` were missing.
- The error if the noise level or the transition marker were not given is fixed.
- The documenation is adapted.

The release contains bug fixes for the ``CPSegmentFit`` class:

- The print output is adapted.
- The division by zero error for some ``normalizing_Z_factor`` values is fixed.
- The sometimes unstable integration via the Simpson rule is complemented with the simple summation of values.

0.0.3

The release contains bug fixes for the ``LangevinEstimation`` class:

- The attributes ``drift_model`` and ``diffusion_model`` were missing.
- The error if the noise level or the transition marker were not given is fixed.
- The documenation is adapted.

The release contains bug fixes for the ``CPSegmentFit`` class:

- The print output is adapted.
- The division by zero error for some ``normalizing_Z_factor`` values is fixed.
- The sometimes unstable integration via the Simpson rule is complemented with the simple summation of values.

0.0.2

This beta-release v0.0.2 contains

- the Markov Chain Monte Carlo algorithm to estimate the drift-slope as resilience measure and the noise level of a Langevin model from time series data in sliding windows,
- the option to create an animation of the sliding window procedure,
- methods to calculate change point probabilities
- and functions to create a Bayesian non-parametric, segmental linear fit to extrapolate the time horizon of an upcoming transition based on the current information and model assumptions.

The algorithms are described in the related publication "Bayesian on-line estimation of critical transitions". The general functionalities can also be used to reproduce the results of the publication. The simulated data sets of the article can be found in the folder "tutorial_data" of the related github repository.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.