Documentation ¶
Overview ¶
Package prediction provides a framework for using models to make predictions based on historical evaluations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelPredict ¶
type ModelPredict struct {
Predicters []Predicter
}
ModelPredict is used to route a prediction to the appropriate predicter based on the model provided Should be initialised with available predicters for it to use
func (*ModelPredict) GetPrediction ¶
func (m *ModelPredict) GetPrediction(model *jamiethompsonmev1alpha1.Model, replicaHistory []jamiethompsonmev1alpha1.TimestampedReplicas) (int32, error)
GetPrediction generates a prediction for any model that the ModelPredict has been set up to use
func (*ModelPredict) GetType ¶
func (m *ModelPredict) GetType() string
GetType returns the type of the ModelPredict, "Model"
func (*ModelPredict) PruneHistory ¶ added in v0.11.0
func (m *ModelPredict) PruneHistory(model *jamiethompsonmev1alpha1.Model, replicaHistory []jamiethompsonmev1alpha1.TimestampedReplicas) ([]jamiethompsonmev1alpha1.TimestampedReplicas, error)
GetIDsToRemove finds the appropriate logic for the model and gets a list of stored IDs to remove
type Predicter ¶
type Predicter interface { GetPrediction(model *jamiethompsonmev1alpha1.Model, replicaHistory []jamiethompsonmev1alpha1.TimestampedReplicas) (int32, error) PruneHistory(model *jamiethompsonmev1alpha1.Model, replicaHistory []jamiethompsonmev1alpha1.TimestampedReplicas) ([]jamiethompsonmev1alpha1.TimestampedReplicas, error) GetType() string }
Predicter is an interface providing methods for making a prediction based on a model, a time to predict and values