Documentation ¶
Index ¶
- func PassiveAggressiveEstimate(ctx *core.Context, stateName string, featureVector data.Map) (float32, error)
- type FeatureVector
- type PassiveAggressive
- func (pa *PassiveAggressive) Clear()
- func (pa *PassiveAggressive) Estimate(v FeatureVector) (float32, error)
- func (pa *PassiveAggressive) RegWeight() float32
- func (pa *PassiveAggressive) Save(w io.Writer) error
- func (pa *PassiveAggressive) Sensitivity() float32
- func (pa *PassiveAggressive) Train(v FeatureVector, value float32) error
- type PassiveAggressiveState
- type PassiveAggressiveStateCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PassiveAggressive ¶
type PassiveAggressive struct {
// contains filtered or unexported fields
}
PassiveAggressive holds a model for regression.
func LoadPassiveAggressive ¶
func LoadPassiveAggressive(r io.Reader) (*PassiveAggressive, error)
LoadPassiveAggressive loads PassiveAggressive from the saved data.
func NewPassiveAggressive ¶
func NewPassiveAggressive(regWeight float32, sensitivity float32) (*PassiveAggressive, error)
NewPassiveAggressive creates a PassiveAggressive model. regWeight must be greater than zero. sensitivity must not be less than zero.
func (*PassiveAggressive) Estimate ¶
func (pa *PassiveAggressive) Estimate(v FeatureVector) (float32, error)
Estimate estimates a value from a model and a feature vector.
func (*PassiveAggressive) RegWeight ¶
func (pa *PassiveAggressive) RegWeight() float32
RegWeight returns regularization weight.
func (*PassiveAggressive) Save ¶
func (pa *PassiveAggressive) Save(w io.Writer) error
Save saves the current state of PassiveAggressive.
func (*PassiveAggressive) Sensitivity ¶
func (pa *PassiveAggressive) Sensitivity() float32
Sensitivity returns sensitivity.
func (*PassiveAggressive) Train ¶
func (pa *PassiveAggressive) Train(v FeatureVector, value float32) error
Train trains a model with a feature vector and a value.
type PassiveAggressiveState ¶
type PassiveAggressiveState struct {
// contains filtered or unexported fields
}
type PassiveAggressiveStateCreator ¶
type PassiveAggressiveStateCreator struct { }
PassiveAggressiveStateCreator is used by BQL to create PassiveAggressiveState as a UDS.
func (*PassiveAggressiveStateCreator) CreateState ¶
func (c *PassiveAggressiveStateCreator) CreateState(ctx *core.Context, params data.Map) (core.SharedState, error)
Click to show internal directories.
Click to hide internal directories.