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 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) PruneHistory ¶ added in v0.11.0
func (p *Predict) PruneHistory(model *jamiethompsonmev1alpha1.Model, replicaHistory []jamiethompsonmev1alpha1.TimestampedReplicas) ([]jamiethompsonmev1alpha1.TimestampedReplicas, error)
Click to show internal directories.
Click to hide internal directories.