func (cm *Matrix) Init(n int) {
	cm.Prob.SetShape([]int{n, n}, nil, []string{"N", "N"})
	cm.Prob.SetZeros()
	cm.Sum.SetShape([]int{n, n}, nil, []string{"N", "N"})
	cm.Sum.SetZeros()
	cm.N.SetShape([]int{n}, nil, []string{"N"})
	cm.N.SetZeros()
	cm.Vis.Mat = &cm.Prob
}
Init initializes the Matrix for given number of classes,
and resets the data to zero.
package confusion
import (
	"github.com/emer/etable/etensor"
	"github.com/emer/etable/simat"
	"github.com/goki/gi/gi"
	"github.com/goki/ki/ki"
	"github.com/goki/ki/kit"
)
type Matrix struct {
	Prob etensor.Float64 `view:"no-inline" desc:"normalized probability of confusion: Row = ground truth class, Col = actual response for that class."`
	Sum  etensor.Float64 `view:"no-inline" desc:"incremental sums"`
	N    etensor.Float64 `view:"no-inline" desc:"counts per ground truth (rows)"`
	Vis  simat.SimMat    `view:"no-inline" desc:"visualization using SimMat"`
}
var KiT_Matrix = kit.Types.AddType(&Matrix{}, MatrixProps)