transformation

package
v0.0.0-...-25d19a7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transform

type Transform interface {
	Transform(rawPredictions []float64, outputPredictions []float64, startIndex int) error
	NOutputGroups() int
	Type() TransformType
	Name() string
}

type TransformExponential

type TransformExponential struct{}

func (*TransformExponential) NOutputGroups

func (t *TransformExponential) NOutputGroups() int

func (*TransformExponential) Name

func (t *TransformExponential) Name() string

func (*TransformExponential) Transform

func (t *TransformExponential) Transform(rawPredictions []float64, outputPredictions []float64, startIndex int) error

func (*TransformExponential) Type

type TransformLeafIndex

type TransformLeafIndex struct {
	NumOutputGroups int
}

func (*TransformLeafIndex) NOutputGroups

func (t *TransformLeafIndex) NOutputGroups() int

func (*TransformLeafIndex) Name

func (t *TransformLeafIndex) Name() string

func (*TransformLeafIndex) Transform

func (t *TransformLeafIndex) Transform(rawPredictions []float64, outputPredictions []float64, startIndex int) error

func (*TransformLeafIndex) Type

type TransformLogistic

type TransformLogistic struct{}

func (*TransformLogistic) NOutputGroups

func (t *TransformLogistic) NOutputGroups() int

func (*TransformLogistic) Name

func (t *TransformLogistic) Name() string

func (*TransformLogistic) Transform

func (t *TransformLogistic) Transform(rawPredictions []float64, outputPredictions []float64, startIndex int) error

func (*TransformLogistic) Type

func (t *TransformLogistic) Type() TransformType

type TransformRaw

type TransformRaw struct {
	NumOutputGroups int
}

func (*TransformRaw) NOutputGroups

func (t *TransformRaw) NOutputGroups() int

func (*TransformRaw) Name

func (t *TransformRaw) Name() string

func (*TransformRaw) Transform

func (t *TransformRaw) Transform(rawPredictions []float64, outputPredictions []float64, startIndex int) error

func (*TransformRaw) Type

func (t *TransformRaw) Type() TransformType

type TransformSoftmax

type TransformSoftmax struct {
	NClasses int
}

func (*TransformSoftmax) NOutputGroups

func (t *TransformSoftmax) NOutputGroups() int

func (*TransformSoftmax) Name

func (t *TransformSoftmax) Name() string

func (*TransformSoftmax) Transform

func (t *TransformSoftmax) Transform(rawPredictions []float64, outputPredictions []float64, startIndex int) error

func (*TransformSoftmax) Type

func (t *TransformSoftmax) Type() TransformType

type TransformType

type TransformType int

TransformType is enum for various transformation functions that could be applied to the raw model results.

const (
	// Raw is a TransformType that do nothing
	Raw TransformType = 0
	// Logistic is a TransformType that apply logistic function in order to obtain
	// positive class probabilities
	Logistic TransformType = 1
	// Softmax is a TransformType to obtain multiclass probabilities
	Softmax TransformType = 2
	// LeafIndex is a TransformType to return leaf indices from decision trees in ensemble
	LeafIndex TransformType = 3
	// Exponential is a TransformType that apply exponential function in order to obtain
	// positive predictions
	Exponential TransformType = 4

	Last TransformType = 4
)

func (TransformType) Name

func (t TransformType) Name() string

Jump to

Keyboard shortcuts

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