Class PersistenceOptimizer
java.lang.Object
org.broadinstitute.hellbender.tools.copynumber.utils.optimization.PersistenceOptimizer
Given 1-dimensional data, finds all local minima sorted by decreasing topological persistence.
This can be useful for finding the most significant local minima in noisy data and can be used
to smooth out less significant local minima that may be induced by noise.
Algorithm is adapted from
https://www.csc.kth.se/~weinkauf/notes/persistence1d.html.
-
Constructor Summary
ConstructorsConstructorDescriptionPersistenceOptimizer
(double[] data) Identifies the local minima ofdata
based on topological persistence upon construction. -
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable list of the indices of the local minima, sorted first by decreasing topological persistence and then by increasing index.Returns the corresponding unmodifiable list of the topological persistences of the local minima given bygetMinimaIndices()
.
-
Constructor Details
-
PersistenceOptimizer
public PersistenceOptimizer(double[] data) Identifies the local minima ofdata
based on topological persistence upon construction. Note that for a region where the data takes constant values that occurs either to the right of a local maximum or at the beginning of the data, the leftmost point in the region is considered a local minimum.- Parameters:
data
- values of a one-dimensional function evaluated at points in left-to-right order
-
-
Method Details
-
getMinimaIndices
Returns an unmodifiable list of the indices of the local minima, sorted first by decreasing topological persistence and then by increasing index. The first element is the index of the global minimum. -
getPersistences
Returns the corresponding unmodifiable list of the topological persistences of the local minima given bygetMinimaIndices()
.
-