Documentation
¶
Index ¶
- type Pair
- type S
- func (s *S) Clear()
- func (s *S) ConfusionMatrix(c int) [][]int
- func (s *S) Evaluate(T spn.Dataset, L []int, N spn.SPN, classVar *learn.Variable)
- func (s *S) EvaluatePosterior(T spn.Dataset, L []int, N spn.SPN, classVar *learn.Variable)
- func (s *S) EvaluatePosteriorConc(D spn.Dataset, L []int, N spn.SPN, classVar *learn.Variable, k int)
- func (s *S) Hits() int
- func (s *S) Merge(t *S)
- func (s *S) Misses() int
- func (s *S) Register(predicted int, expected int)
- func (s *S) Save(filename string)
- func (s *S) String() string
- func (s *S) Total() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S ¶
type S struct {
// contains filtered or unexported fields
}
S stores classification scores.
func Add ¶
Add returns the result of adding the two scores. This function leaves the original scores untouched, returning a new score structure.
func (*S) ConfusionMatrix ¶
ConfusionMatrix computes the confusion matrix of the predictions. Argument c is the number of classes.
func (*S) Evaluate ¶
Evaluate takes a dataset, an array of expected labels ordered according to the dataset, an SPN and the label variable, and registers each predicted and expected values of the label variable in the dataset.
func (*S) EvaluatePosterior ¶
EvaluatePosterior evaluates the SPN classification score by computing the exact probabilities, instead of the approximate MAP.
func (*S) EvaluatePosteriorConc ¶
func (s *S) EvaluatePosteriorConc(D spn.Dataset, L []int, N spn.SPN, classVar *learn.Variable, k int)
EvaluatePosteriorConc runs EvaluatePosterior concurrently. Additional argument k is the number of concurrent jobs to run at a time. If k <= 0, k is set to the number of CPUs available.