Documentation
¶
Index ¶
- Variables
- func AutoCorrelation(samples []float64) []float64
- func Debug(predictor prediction.Interface, namer metricnaming.MetricNamer, ...) (*Signal, *Signal, *Signal, error)
- func NewPrediction(realtimeProvider providers.RealTime, historyProvider providers.History, ...) prediction.Interface
- type Estimator
- type Signal
- func (s *Signal) Denormalize(min, max float64) (*Signal, error)
- func (s *Signal) Duration() float64
- func (s *Signal) Filter(threshold float64) *Signal
- func (s *Signal) FindPeriod() time.Duration
- func (s *Signal) Max() float64
- func (s *Signal) Min() float64
- func (s *Signal) Normalize() (*Signal, error)
- func (s *Signal) Num() int
- func (s *Signal) Plot(color string, o ...charts.GlobalOpts) *charts.Line
- func (s *Signal) String() string
- func (s *Signal) Truncate(d time.Duration) (*Signal, int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MaxAutoCorrelationPeakSearchIntervalSeconds is the maximum search interval for validating if // a periodicity hint is a peak of the ACF. MaxAutoCorrelationPeakSearchIntervalSeconds = (time.Hour * 4).Seconds() )
Functions ¶
func AutoCorrelation ¶ added in v0.6.0
func Debug ¶ added in v0.6.0
func Debug(predictor prediction.Interface, namer metricnaming.MetricNamer, config *config.Config) (*Signal, *Signal, *Signal, error)
func NewPrediction ¶
func NewPrediction(realtimeProvider providers.RealTime, historyProvider providers.History, mc config.AlgorithmModelConfig) prediction.Interface
Types ¶
type Estimator ¶
type Estimator interface { GetEstimation(signal *Signal, periodLength time.Duration) *Signal String() string }
func NewFFTEstimator ¶
func NewMaxValueEstimator ¶
type Signal ¶
type Signal struct { // SampleRate is the sampling rate in hertz SampleRate float64 // Samples store all samples Samples []float64 }
Signal represents a discrete signal.
func SamplesToSignal ¶
func (*Signal) Denormalize ¶
Denormalize denormalizes the signal between min and max.
func (*Signal) Filter ¶
Filter filters out frequency components whose amplitudes are less than the threshold and returns a new signal
func (*Signal) FindPeriod ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.