linear

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmRunner added in v0.11.0

type AlgorithmRunner interface {
	RunAlgorithmWithValue(algorithmPath string, value string, timeout int) (string, error)
}

Runner defines an algorithm runner, allowing algorithms to be run

type Config

type Config struct {
	StoredValues int `yaml:"storedValues"`
	LookAhead    int `yaml:"lookAhead"`
}

Config represents a linear regression prediction model configuration

type Predict

type Predict struct {
	Runner AlgorithmRunner
}

Predict provides logic for using Linear Regression to make a prediction

func (*Predict) GetPrediction

func (p *Predict) GetPrediction(model *jamiethompsonmev1alpha1.Model, replicaHistory []jamiethompsonmev1alpha1.TimestampedReplicas) (int32, error)

GetPrediction uses a linear regression to predict what the replica count should be based on historical evaluations

func (*Predict) GetType

func (p *Predict) GetType() string

GetType returns the type of the Prediction model

func (*Predict) PruneHistory added in v0.11.0

Jump to

Keyboard shortcuts

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