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

Source Files

Directories

Path Synopsis
linear