Documentation ¶
Index ¶
- type LearningInstance
- type LearningInstances
- type MIRAClassifier
- func (m MIRAClassifier) GetActiveFeatures() []string
- func (m MIRAClassifier) GetWeight(f string) float64
- func (m MIRAClassifier) Predict(features feature.FeatureVector) model.LabelType
- func (m MIRAClassifier) PredictScore(features feature.FeatureVector) float64
- func (m MIRAClassifier) SortByScore(examples model.Examples) model.Examples
- type MIRAClassifierList
- type ModelType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LearningInstance ¶
type LearningInstance interface { GetFeatureVector() feature.FeatureVector GetLabel() model.LabelType }
type LearningInstances ¶
type LearningInstances []LearningInstance
type MIRAClassifier ¶
type MIRAClassifier struct { ModelType ModelType `json:"ModelType"` Weight map[string]float64 `json:"Weight"` C float64 `json:"C"` Accuracy float64 `json:"Accuracy"` Precision float64 `json:"Precision"` Recall float64 `json:"Recall"` Fvalue float64 `json:"Fvalue"` }
func NewMIRAClassifier ¶
func NewMIRAClassifier(modelType ModelType, instances LearningInstances, c float64) *MIRAClassifier
func NewMIRAClassifierByCrossValidation ¶
func NewMIRAClassifierByCrossValidation(modelType ModelType, instances LearningInstances) (*MIRAClassifier, error)
func (MIRAClassifier) GetActiveFeatures ¶
func (m MIRAClassifier) GetActiveFeatures() []string
func (MIRAClassifier) GetWeight ¶
func (m MIRAClassifier) GetWeight(f string) float64
func (MIRAClassifier) Predict ¶
func (m MIRAClassifier) Predict(features feature.FeatureVector) model.LabelType
func (MIRAClassifier) PredictScore ¶
func (m MIRAClassifier) PredictScore(features feature.FeatureVector) float64
func (MIRAClassifier) SortByScore ¶
func (m MIRAClassifier) SortByScore(examples model.Examples) model.Examples
type MIRAClassifierList ¶
type MIRAClassifierList []MIRAClassifier
func (MIRAClassifierList) Len ¶
func (l MIRAClassifierList) Len() int
func (MIRAClassifierList) Less ¶
func (l MIRAClassifierList) Less(i, j int) bool
func (MIRAClassifierList) Swap ¶
func (l MIRAClassifierList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.