prediction

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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