inference

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ensemble

type Ensemble struct {
	EnsembleBase
	activation.Activation
}

Ensemble struct contains ensemble model interface that a model needs to implement.

func (*Ensemble) Name

func (e *Ensemble) Name() string

Name returns ensemble model name.

func (*Ensemble) Predict

func (e *Ensemble) Predict(features mat.SparseMatrix) (mat.Matrix, error)

Predict predicts class using ensemble model interface. If model is a binary classification model, the prediction results will be probabilities instead of classes.

func (*Ensemble) PredictProba

func (e *Ensemble) PredictProba(features mat.SparseMatrix) (mat.Matrix, error)

PredictProba predicts probabilities using ensemble model interface.

func (*Ensemble) PredictRegression

func (e *Ensemble) PredictRegression(features mat.SparseMatrix, baseVal float32) (mat.Matrix, error)

PredictRegression predicts float number for regression task using ensemble model interface.

type EnsembleBase

type EnsembleBase interface {
	PredictInner(features mat.SparseVector) (mat.Vector, error)
	Name() string
	NumClasses() int
}

EnsembleBase contains interface of a base model.

Jump to

Keyboard shortcuts

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