public CovarianceMatrix(IGMN owner, int inputLength, int outputLength) { Vector scaledMaxMin = new Vector(owner.MaxMin.Elements.Length); double prod = 1; double prod2 = 1; Vector invMaxMin = new Vector(owner.MaxMin.Elements.Length); for (int i = 0; i < owner.MaxMin.Elements.Length; ++i) { double temp = Math.Pow(DELTA * owner.MaxMin.Elements[i], 1); scaledMaxMin.Elements[i] = temp; prod *= temp; if (i < inputLength) prod2 *= temp; invMaxMin.Elements[i] = 1 / temp; } determinant = prod; covariance = DenseMatrix.Diag(scaledMaxMin); inverseCovariance = DenseMatrix.Diag(invMaxMin); inputDeterminant = prod2; inputInverseCovariance = inverseCovariance.Part(0, 0, inputLength, inputLength); }
public InvertedPendulumESIGMNQStore() { igmn = new IGMN(3, 1, new Vector(new double[] {12, 6, 0.4, 100} )); }
public IGMNGaussian(IGMN owner, Vector mean, int inputLength, int outputLength) { this.owner = owner; this.inputLength = inputLength; this.outputLength = outputLength; Age = 1; Accumlator = 1; Mean = new Vector(mean); Covariance = new CovarianceMatrix(owner, inputLength, outputLength); }