ppeaks

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2020 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package ppeaks detects the peaks in a time series by means of persistent homology: https://www.sthu.org/blog/13-perstopology-peakdetection/index.html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peak

type Peak struct {
	// contains filtered or unexported fields
}

type Peaks

type Peaks struct {
	// contains filtered or unexported fields
}

func GetPeaks

func GetPeaks(seq []float64) *Peaks

GetPeaks returns the peaks in a floating point time series. Peaks are returnend in increasing order of their indices.

func GetPeaksInt

func GetPeaksInt(seq []int) *Peaks

GetPeaksInt finds the peaks in an integer time series. Peaks are returnend in increasing order of their indices.

func (*Peaks) GetIndices

func (pks *Peaks) GetIndices(fracOfMaxPersistence float64) []int

GetIndices returns the indices in the original time series `seq` of the peaks with persistence/max(persitence of seq) >= `fracOfMaxPersistence`

func (*Peaks) Max

func (pks *Peaks) Max(fracOfMaxPersistence float64) int

Max returns the index in the original time series `seq` of the peak with the highest y-value. See GetIndices for fracOfMaxPersistence.

func (*Peaks) MinMaxPersistence

func (pks *Peaks) MinMaxPersistence() (min, max float64)

MinMaxPersistence returns the minimum and maximum persistence of the peaks in `seq`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL