예제 #1
0
파일: polynomial.go 프로젝트: reggo/reggo
// 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)
}