// Fit Gaussian process regression model
Fit Gaussian process regression model
// Fit Gaussian process regression model
func (m *Regressor) Fit(X, Y mat.Matrix) base.Fiter {
	_, ry := Y.Dims()
	m.Xtrain = mat.DenseCopyOf(X)
	m.Ytrain = mat.DenseCopyOf(Y)
	if len(m.Alpha) != 1 && len(m.Alpha) != ry {
		panic(fmt.Errorf("alpha must be a scalar or an array with same number of entries as y.(%d != %d)", len(m.Alpha), ry))
	}
	return m
}
func ( m * Regressor ) Fit ( X , Y mat . Matrix ) base . Fiter { _ , ry := Y . Dims ( ) m . Xtrain = mat . DenseCopyOf ( X ) m . Ytrain = mat . DenseCopyOf ( Y ) if len ( m . Alpha ) != 1 && len ( m . Alpha ) != ry { panic ( fmt . Errorf ( " " , len ( m . Alpha ) , ry ) ) } return m }
Fit Gaussian process regression model
Fit Gaussian process regression model