public void generateInput() { NormalDistribution d = new NormalDistribution(); v = new double[n]; for (int i = 0; i < n; i++) v[i] = d.Next(); }
public void generateOutput(bool estimation) { NormalDistribution d = new NormalDistribution(); double[] array = new double[n]; double[] a, b; if (estimation) { estimations = array; a = aEstimation; b = bEstimation; } else { y = array; a = this.a; b = this.b; } for (int i = 0; i < n; i++) { double res = 0; for (int j = 0; j <= ard; j++) { res += j == 0 ? a[j] : a[j] * outputValue(i - j, estimation); } for (int j = 0; j <= mad; j++) { res += b[j] * inputValue(i - j); } //if (!estimation) // res += d.Next(); array[i] = res; } }