private void Param() { A = new Matrix(n, n); Vector[] vect = new Vector[n]; for (int i = 0; i < n; i++) { vect[i] = ExtensionOfFeatureSpace.Sinc(newX[i], newX); } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { A[i, j] = vect[i][j]; } } Kramer kram = new Kramer(); param = kram.GetAnswer(A, newY); }
/// <summary> /// Прогноз /// </summary> /// <param name="inp">Значение незав. переменной</param> public double Predict(double inp) { Vector X = ExtensionOfFeatureSpace.Sinc(inp, newX); return(GeomFunc.ScalarProduct(X, param)); }