Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeSimpleNameMap ¶
Builds a basic dictionary where each label is simply given its numerical value as a name. Can be used if you don't have string names for your labels.
func ReadNameMap ¶
Reads a map for the names of each label. The names file must have one entry per line. In that entry, there must be 2 fields separated by separator (a space by default) the first one is the number of the label, the second one, its name.
Types ¶
type Confusions ¶
type Confusions struct { Actual []int Predicted []int Labels []int // contains filtered or unexported fields }
func MCConfusions ¶
func MCConfusions(M *boo.MultiClass, D *utils.DataBunch) *Confusions
func (*Confusions) Matrix ¶
func (C *Confusions) Matrix() [][]int
func (*Confusions) TopNForLabelM ¶
func (C *Confusions) TopNForLabelM(N, M int, docopy ...bool) ([]int, []int)
Returns the a []int with the M labels most commonly predicted by the model when the actual label is M. If M is not a valid label in the dataset, returns nil. It also returns the fraction of instances where label M is predicted to be each of the labels.
func (*Confusions) TopNPerLabel ¶
func (C *Confusions) TopNPerLabel(N int) ([][]int, [][]int)
For each label, returns the