hampel

package module
v0.0.0-...-81ba8fd Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 3 Imported by: 0

README

Go Hampel Filter

Go Reference

A Hampel Filter ported from https://github.com/MichaelisTrofficus/hampel_filter.

The running median code is taken from https://stackoverflow.com/a/5971248/12514543.

Documentation

Index

Constants

View Source
const (
	DefaultWindow = 10
	DefaultN      = 3
)

Variables

This section is empty.

Functions

func Filter

func Filter(data []float64, windowSize, n int) []int

Returns the outlier indices for a given data array, window size, and n.

func FilterImpute

func FilterImpute(data []float64, windowSize, n int) []float64

Returns the transformed data with outliers set to the running median for a given data array, window size, and n.

func FilterImputeInPlace

func FilterImputeInPlace(data []float64, windowSize, n int)

Transforms the data with outliers set to the running median for a given data array, window size, and n.

Types

This section is empty.

Jump to

Keyboard shortcuts

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