Back to

Package prediction

Latest Go to latest

The latest major version is .

Published: Mar 27, 2020 | License: Apache-2.0 | Module:


Package prediction provides a framework for using models to make predictions based on historical evaluations


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) GetIDsToRemove

func (m *ModelPredict) GetIDsToRemove(model *config.Model, evaluations []*stored.Evaluation) ([]int, error)

GetIDsToRemove finds the appropriate logic for the model and gets a list of stored IDs to remove

func (*ModelPredict) GetPrediction

func (m *ModelPredict) GetPrediction(model *config.Model, evaluations []*stored.Evaluation) (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"

type Predicter

type Predicter interface {
	GetPrediction(model *config.Model, evaluations []*stored.Evaluation) (int32, error)
	GetIDsToRemove(model *config.Model, evaluations []*stored.Evaluation) ([]int, error)
	GetType() string

Predicter is an interface providing methods for making a prediction based on a model, a time to predict and values

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier