Documentation ¶
Index ¶
- Constants
- func BatchConvexHull(sortOnly bool) bitflow.BatchProcessingStep
- func ComputeAndProjectPCA(containedVariance float64) bitflow.BatchProcessingStep
- func FeatureWindowAverage(stats *FeatureWindowStats) bitflow.Value
- func FeatureWindowSlope(stats *FeatureWindowStats) bitflow.Value
- func LoadBatchPCAModel(filename string, containedVariance float64) (bitflow.BatchProcessingStep, error)
- func LoadStreamingPCAModel(filename string, containedVariance float64) (bitflow.SampleProcessor, error)
- func RegisterAggregateAvg(b reg.ProcessorRegistry)
- func RegisterAggregateSlope(b reg.ProcessorRegistry)
- func RegisterBatchAggregator(b reg.ProcessorRegistry)
- func RegisterConvexHull(b reg.ProcessorRegistry)
- func RegisterConvexHullSort(b reg.ProcessorRegistry)
- func RegisterFFT(b reg.ProcessorRegistry)
- func RegisterMinMaxScaling(b reg.ProcessorRegistry)
- func RegisterPCA(b reg.ProcessorRegistry)
- func RegisterPCALoad(b reg.ProcessorRegistry)
- func RegisterPCALoadStream(b reg.ProcessorRegistry)
- func RegisterPCAStore(b reg.ProcessorRegistry)
- func RegisterRMS(b reg.ProcessorRegistry)
- func RegisterSphere(b reg.ProcessorRegistry)
- func RegisterStandardizationScaling(b reg.ProcessorRegistry)
- func SamplesToMatrix(samples []*bitflow.Sample) mat.Matrix
- func StorePCAModel(filename string) bitflow.BatchProcessingStep
- type Aggregator
- type AngleBasedSort
- type AverageAggregator
- type BatchAggregator
- type BatchFft
- type BatchRms
- type ConvexHull
- type FeatureAggregator
- func (agg *FeatureAggregator) Add(suffix string, operation FeatureAggregatorOperation) *FeatureAggregator
- func (agg *FeatureAggregator) AddAvg(suffix string) *FeatureAggregator
- func (agg *FeatureAggregator) AddSlope(suffix string) *FeatureAggregator
- func (agg *FeatureAggregator) MergeProcessor(other bitflow.SampleProcessor) bool
- func (agg *FeatureAggregator) OutputSampleSize(sampleSize int) int
- func (agg *FeatureAggregator) Sample(sample *bitflow.Sample, header *bitflow.Header) error
- func (agg *FeatureAggregator) String() string
- type FeatureAggregatorOperation
- type FeatureWindowStats
- type MinMaxScaling
- type MultiplyAggregator
- type PCAModel
- func (model *PCAModel) ComponentsContainingVariance(variance float64) (count int, sum float64)
- func (model *PCAModel) ComputeAndReport(samples []*bitflow.Sample) error
- func (model *PCAModel) ComputeModel(samples []*bitflow.Sample) error
- func (model *PCAModel) Load(filename string) (err error)
- func (model *PCAModel) Project(numComponents int) *PCAProjection
- func (model *PCAModel) ProjectHeader(variance float64, header *bitflow.Header) (*PCAProjection, *bitflow.Header, error)
- func (model *PCAModel) Report(reportVariance float64) string
- func (model *PCAModel) String() string
- func (model *PCAModel) WriteModel(writer io.Writer) error
- type PCAProjection
- type Point
- type SpherePoints
- type StandardizationScaling
- type SumAggregator
Constants ¶
View Source
const DefaultContainedVariance = 0.99
View Source
const (
FftFreqMetricName = "freq"
)
Variables ¶
This section is empty.
Functions ¶
func BatchConvexHull ¶
func BatchConvexHull(sortOnly bool) bitflow.BatchProcessingStep
func ComputeAndProjectPCA ¶
func ComputeAndProjectPCA(containedVariance float64) bitflow.BatchProcessingStep
func FeatureWindowAverage ¶
func FeatureWindowAverage(stats *FeatureWindowStats) bitflow.Value
func FeatureWindowSlope ¶
func FeatureWindowSlope(stats *FeatureWindowStats) bitflow.Value
func LoadBatchPCAModel ¶
func LoadBatchPCAModel(filename string, containedVariance float64) (bitflow.BatchProcessingStep, error)
func LoadStreamingPCAModel ¶
func LoadStreamingPCAModel(filename string, containedVariance float64) (bitflow.SampleProcessor, error)
func RegisterAggregateAvg ¶
func RegisterAggregateAvg(b reg.ProcessorRegistry)
func RegisterAggregateSlope ¶
func RegisterAggregateSlope(b reg.ProcessorRegistry)
func RegisterBatchAggregator ¶ added in v0.0.43
func RegisterBatchAggregator(b reg.ProcessorRegistry)
func RegisterConvexHull ¶
func RegisterConvexHull(b reg.ProcessorRegistry)
func RegisterConvexHullSort ¶
func RegisterConvexHullSort(b reg.ProcessorRegistry)
func RegisterFFT ¶
func RegisterFFT(b reg.ProcessorRegistry)
func RegisterMinMaxScaling ¶
func RegisterMinMaxScaling(b reg.ProcessorRegistry)
func RegisterPCA ¶
func RegisterPCA(b reg.ProcessorRegistry)
func RegisterPCALoad ¶
func RegisterPCALoad(b reg.ProcessorRegistry)
func RegisterPCALoadStream ¶
func RegisterPCALoadStream(b reg.ProcessorRegistry)
func RegisterPCAStore ¶
func RegisterPCAStore(b reg.ProcessorRegistry)
func RegisterRMS ¶
func RegisterRMS(b reg.ProcessorRegistry)
func RegisterSphere ¶
func RegisterSphere(b reg.ProcessorRegistry)
func RegisterStandardizationScaling ¶
func RegisterStandardizationScaling(b reg.ProcessorRegistry)
func StorePCAModel ¶
func StorePCAModel(filename string) bitflow.BatchProcessingStep
Types ¶
type Aggregator ¶ added in v0.0.43
type AngleBasedSort ¶
func (AngleBasedSort) Len ¶
func (s AngleBasedSort) Len() int
func (AngleBasedSort) Less ¶
func (s AngleBasedSort) Less(i, j int) bool
func (AngleBasedSort) Swap ¶
func (s AngleBasedSort) Swap(i, j int)
type AverageAggregator ¶ added in v0.0.43
type AverageAggregator struct{}
func (*AverageAggregator) String ¶ added in v0.0.43
func (a *AverageAggregator) String() string
type BatchAggregator ¶ added in v0.0.43
type BatchAggregator struct {
// contains filtered or unexported fields
}
func (*BatchAggregator) ProcessBatch ¶ added in v0.0.43
func (*BatchAggregator) String ¶ added in v0.0.43
func (ba *BatchAggregator) String() string
type BatchFft ¶
type BatchFft struct { // By default, the upper half of the FFT results is cut off, because the FFT results are symmetric. // Set LeaveSymmetricPart to true to include preserve all result values. LeaveSymmetricPart bool // By default, the FFT results are normalized. Set SkipNormalization to true to avoid this. // Normalization helps comparing the results of FFTs with different numbers of input values. // Normalization is done by dividing every FFT result value by the total number of input values to the FFT. // If FillZeros=true, this is the closest power of two above the number of actual input samples. If FillZeros=false, this is the closest power of two beneath that. SkipNormalization bool // If the number of input samples is not exactly a power of two, the input batch must either be cut short or filled up with zeros. // The default is to cut the input to a power of two. set FillZeros to true, to instead fill the input with zeros to reach the next higher power of two. FillZeros bool // If FrequencyMetricIndex >= 0, the frequency for every FFT result value will be added as a new metric at the given index. // If the index is higher than the total number of input metrics, it will be appended as the last metric. // The name of that new metric will be FftFreqMetricName ("freq"). FrequencyMetricIndex int // If SamplingFrequency > 0, it will be used as the total sampling frequency when computing the frequency metric. // If this is <= 0, the sampling frequency will be computed automatically from the timestamps of the first and last input sample, and the total number of samples. SamplingFrequency float64 // FatalErrors can be set to true to return errors that occur when processing a batch. // Otherwise, the error will be printed as a warning and an empty result batch will be produced. FatalErrors bool }
func (*BatchFft) OutputSampleSize ¶
func (*BatchFft) ProcessBatch ¶
type ConvexHull ¶
type ConvexHull []Point
func ComputeConvexHull ¶
func ComputeConvexHull(points []Point) ConvexHull
func (ConvexHull) ComputeLowestPoint ¶
func (p ConvexHull) ComputeLowestPoint() (low Point)
type FeatureAggregator ¶
type FeatureAggregator struct { bitflow.NoopProcessor WindowSize int // Applied if >0 WindowDuration time.Duration // Applied if >0 UseCurrentTime bool // If true, use time.Now() as reference for WindowTime. Otherwise, use the timestamp of the latest Sample. // contains filtered or unexported fields }
func (*FeatureAggregator) Add ¶
func (agg *FeatureAggregator) Add(suffix string, operation FeatureAggregatorOperation) *FeatureAggregator
func (*FeatureAggregator) AddAvg ¶
func (agg *FeatureAggregator) AddAvg(suffix string) *FeatureAggregator
func (*FeatureAggregator) AddSlope ¶
func (agg *FeatureAggregator) AddSlope(suffix string) *FeatureAggregator
func (*FeatureAggregator) MergeProcessor ¶
func (agg *FeatureAggregator) MergeProcessor(other bitflow.SampleProcessor) bool
func (*FeatureAggregator) OutputSampleSize ¶
func (agg *FeatureAggregator) OutputSampleSize(sampleSize int) int
func (*FeatureAggregator) String ¶
func (agg *FeatureAggregator) String() string
type FeatureAggregatorOperation ¶
type FeatureAggregatorOperation func(stats *FeatureWindowStats) bitflow.Value
type FeatureWindowStats ¶
type FeatureWindowStats struct {
// contains filtered or unexported fields
}
func (*FeatureWindowStats) Flush ¶
func (stats *FeatureWindowStats) Flush(num int)
type MinMaxScaling ¶
func (*MinMaxScaling) ProcessBatch ¶
func (*MinMaxScaling) String ¶
func (s *MinMaxScaling) String() string
type MultiplyAggregator ¶ added in v0.0.43
type MultiplyAggregator struct{}
func (*MultiplyAggregator) String ¶ added in v0.0.43
func (a *MultiplyAggregator) String() string
type PCAModel ¶
func (*PCAModel) ComponentsContainingVariance ¶
func (*PCAModel) ComputeAndReport ¶
func (*PCAModel) ComputeModel ¶
func (*PCAModel) Project ¶
func (model *PCAModel) Project(numComponents int) *PCAProjection
func (*PCAModel) ProjectHeader ¶
type PCAProjection ¶
func (*PCAProjection) Sample ¶
func (model *PCAProjection) Sample(sample *bitflow.Sample) (result *bitflow.Sample)
func (*PCAProjection) Vector ¶
func (model *PCAProjection) Vector(vec []float64) []float64
type SpherePoints ¶
type SpherePoints struct { bitflow.NoopProcessor RandomSeed int64 NumPoints int RadiusMetric int // If >= 0, use to get radius. Otherwise, use Radius field. Radius float64 // contains filtered or unexported fields }
type StandardizationScaling ¶
type StandardizationScaling struct { }
func (*StandardizationScaling) ProcessBatch ¶
func (*StandardizationScaling) String ¶
func (s *StandardizationScaling) String() string
type SumAggregator ¶ added in v0.0.43
type SumAggregator struct{}
func (*SumAggregator) String ¶ added in v0.0.43
func (a *SumAggregator) String() string
Click to show internal directories.
Click to hide internal directories.