threshold

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IQR

func IQR(data []float64) float64

计算IQR(四分位距)

func IQRAnomalyDetect

func IQRAnomalyDetect(data []float64, k float64) []float64

IQRAnomalyDetect 返回每个点是否为异常(1为异常,0为正常)

func IQRAnomalyDetects

func IQRAnomalyDetects(data [][]float64, k float64) [][]float64

IQRAnomalyDetects 针对二维数组每列做异常检测

Types

type DynamicThresholdCalculator

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

DynamicThresholdCalculator 动态阈值计算器

func NewDynamicThresholdCalculator

func NewDynamicThresholdCalculator(windowSize int) *DynamicThresholdCalculator

NewDynamicThresholdCalculator 初始化计算器

func (*DynamicThresholdCalculator) AddData

func (dtc *DynamicThresholdCalculator) AddData(value float64)

AddData 向滑动窗口添加数据

func (*DynamicThresholdCalculator) CalculateThresholds

func (dtc *DynamicThresholdCalculator) CalculateThresholds() (lower, upper float64)

CalculateThresholds 计算动态阈值

func (*DynamicThresholdCalculator) VoteDetect

func (dtc *DynamicThresholdCalculator) VoteDetect(value float64, voteThreshold int) bool

VoteDetect 使用投票法进行异常检测

Jump to

Keyboard shortcuts

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