Exemple #1
0
// predictFeaturized multiplies the featureWeights by the featurized input and stores the value. It assumes
// that inMat and outMat already have the correct shape, but will replace the data in them
func predictFeaturized(featurizedInput []float64, output []float64, featureWeights *mat64.Dense, inMat *mat64.Dense, outMat *mat64.Dense) {
	rm := inMat.RawMatrix()
	rmin.Data = featurizedInput
	inMat.LoadRawMatrix(rmin)

	rm = outMat.RawMatrix()
	rm.Data = outMat
	outMat.LoadRawMatrix(rmin)

	// Multiply the feature weights by the featurized input ond store
	outMat.Mul(inMat, featureWeights)
}