Documentation
¶
Overview ¶
Package decisionforest contains the engine inference code for decision forest models.
Index ¶
- func GetBit(bitmap []byte, i uint32) bool
- func SetBit(bitmap []byte, i uint32)
- type ActivationSignature
- type OneDimensionEngine
- func NewBinaryClassificationGBDTGenericEngine(model *gbt.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
- func NewBinaryClassificationRFGenericEngine(model *rf.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
- func NewRankingGBDTGenericEngine(model *gbt.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
- func NewRegressionGBDTGenericEngine(model *gbt.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
- func NewRegressionRFGenericEngine(model *rf.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
- func (e *OneDimensionEngine) AllocateExamples(maxNumExamples int) *example.Batch
- func (e *OneDimensionEngine) AllocatePredictions(maxNumExamples int) []float32
- func (e *OneDimensionEngine) Features() *example.Features
- func (e *OneDimensionEngine) OutputDim() int
- func (e *OneDimensionEngine) Predict(examples *example.Batch, numExamples int, predictions []float32)
- type SetNodeSignature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActivationSignature ¶
ActivationSignature is an activation function. Activation functions are applied on the output of Gradient Boosted Trees models.
type OneDimensionEngine ¶
type OneDimensionEngine struct {
Activation ActivationSignature
// contains filtered or unexported fields
}
OneDimensionEngine is a specialization of the generic engine for models with a single output dimension.
func NewBinaryClassificationGBDTGenericEngine ¶
func NewBinaryClassificationGBDTGenericEngine(model *gbt.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
NewBinaryClassificationGBDTGenericEngine creates an engine for a binary classification GBT model.
func NewBinaryClassificationRFGenericEngine ¶
func NewBinaryClassificationRFGenericEngine(model *rf.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
NewBinaryClassificationRFGenericEngine creates an engine for a binary classification RF model.
func NewRankingGBDTGenericEngine ¶
func NewRankingGBDTGenericEngine(model *gbt.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
NewRankingGBDTGenericEngine creates an engine for a regression GBT model.
func NewRegressionGBDTGenericEngine ¶
func NewRegressionGBDTGenericEngine(model *gbt.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
NewRegressionGBDTGenericEngine creates an engine for a regression GBT model.
func NewRegressionRFGenericEngine ¶
func NewRegressionRFGenericEngine(model *rf.Model, compatibility example.CompatibilityType) (*OneDimensionEngine, error)
NewRegressionRFGenericEngine creates an engine for a regression RF model.
func (*OneDimensionEngine) AllocateExamples ¶
func (e *OneDimensionEngine) AllocateExamples(maxNumExamples int) *example.Batch
AllocateExamples allocates a set of examples.
func (*OneDimensionEngine) AllocatePredictions ¶
func (e *OneDimensionEngine) AllocatePredictions(maxNumExamples int) []float32
AllocatePredictions allocates a set of predictions.
func (*OneDimensionEngine) Features ¶
func (e *OneDimensionEngine) Features() *example.Features
Features of the engine.
func (*OneDimensionEngine) OutputDim ¶
func (e *OneDimensionEngine) OutputDim() int
OutputDim is the output dimension of the engine.
type SetNodeSignature ¶
SetNodeSignature is the signature of a method that set a leaf value during engine compilation.