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 RegisterConvexHull(b reg.ProcessorRegistry)
- func RegisterConvexHullSort(b reg.ProcessorRegistry)
- func RegisterFFT(b reg.ProcessorRegistry)
- func RegisterLinearRegression(b reg.ProcessorRegistry)
- func RegisterLinearRegressionBruteForce(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 AngleBasedSort
- type BatchFft
- type BatchRms
- type ConvexHull
- type EvaluatedLinearRegression
- 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 LinearRegression
- func (reg *LinearRegression) Fit(samples []*bitflow.Sample) error
- func (reg *LinearRegression) FormulaString() string
- func (reg *LinearRegression) IsValid() bool
- func (reg *LinearRegression) MeanSquaredError(data base.FixedDataGrid) (float64, error)
- func (reg *LinearRegression) Predict(data base.FixedDataGrid) ([]float64, error)
- type LinearRegressionBatchProcessor
- type LinearRegressionBruteForce
- type MinMaxScaling
- 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 SortedRegressions
- type SpherePoints
- type StandardizationScaling
- type SubHeader
- func (header SubHeader) BuildFilledInstances(samples []*bitflow.Sample, classAttribute int) (*base.DenseInstances, error)
- func (header SubHeader) BuildInstances(classAttribute int) (*base.DenseInstances, error)
- func (header SubHeader) FillInstances(samples []*bitflow.Sample, instances *base.DenseInstances)
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 RegisterConvexHull ¶
func RegisterConvexHull(b reg.ProcessorRegistry)
func RegisterConvexHullSort ¶
func RegisterConvexHullSort(b reg.ProcessorRegistry)
func RegisterFFT ¶
func RegisterFFT(b reg.ProcessorRegistry)
func RegisterLinearRegression ¶
func RegisterLinearRegression(b reg.ProcessorRegistry)
func RegisterLinearRegressionBruteForce ¶
func RegisterLinearRegressionBruteForce(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 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 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 EvaluatedLinearRegression ¶
type EvaluatedLinearRegression struct { LinearRegression MSE float64 }
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 LinearRegression ¶
type LinearRegression struct { SubHeader RegressionClassVar int Model *linear_models.LinearRegression TrainData *base.DenseInstances }
func NewLinearRegression ¶
func NewLinearRegression(header *bitflow.Header, fieldNames []string) (LinearRegression, error)
func (*LinearRegression) FormulaString ¶
func (reg *LinearRegression) FormulaString() string
func (*LinearRegression) IsValid ¶
func (reg *LinearRegression) IsValid() bool
func (*LinearRegression) MeanSquaredError ¶
func (reg *LinearRegression) MeanSquaredError(data base.FixedDataGrid) (float64, error)
func (*LinearRegression) Predict ¶
func (reg *LinearRegression) Predict(data base.FixedDataGrid) ([]float64, error)
type LinearRegressionBatchProcessor ¶
type LinearRegressionBatchProcessor struct { }
func (*LinearRegressionBatchProcessor) ProcessBatch ¶
func (*LinearRegressionBatchProcessor) String ¶
func (reg *LinearRegressionBatchProcessor) String() string
type LinearRegressionBruteForce ¶
type LinearRegressionBruteForce struct {
// contains filtered or unexported fields
}
func (*LinearRegressionBruteForce) ProcessBatch ¶
func (*LinearRegressionBruteForce) String ¶
func (brute *LinearRegressionBruteForce) String() string
type MinMaxScaling ¶
func (*MinMaxScaling) ProcessBatch ¶
func (*MinMaxScaling) String ¶
func (s *MinMaxScaling) 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 SortedRegressions ¶
type SortedRegressions []EvaluatedLinearRegression
func (SortedRegressions) Len ¶
func (slice SortedRegressions) Len() int
func (SortedRegressions) Less ¶
func (slice SortedRegressions) Less(i, j int) bool
func (SortedRegressions) Swap ¶
func (slice SortedRegressions) Swap(i, j int)
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 SubHeader ¶
func (SubHeader) BuildFilledInstances ¶
func (SubHeader) BuildInstances ¶
func (header SubHeader) BuildInstances(classAttribute int) (*base.DenseInstances, error)
func (SubHeader) FillInstances ¶
func (header SubHeader) FillInstances(samples []*bitflow.Sample, instances *base.DenseInstances)
Click to show internal directories.
Click to hide internal directories.