public override Vector GenFeatures(Vector x) { if (x.Count != InputDim()) { throw new ArgumentException("Input vector does not have a compatible dimension."); } // standardize. Divide by sqrt(gauss width^2) Vector s = x * (1.0 / Math.Sqrt(this.GaussWidthSq)); Vector cosArg = WeightMatrix.Transpose() * s + BiasVector; double scale = Math.Sqrt(2.0 / NumFeatures()); var temp = from ca in cosArg select Math.Cos(ca) * scale; return(Vector.FromArray(temp.ToArray())); }
public void TransposedDuplicate(Connection cloneConnection) { cloneConnection.WeightMatrix = WeightMatrix.Transpose(); }
public void TransposedDuplicate(Bundle cloneBundle) { cloneBundle.WeightMatrix = WeightMatrix.Transpose(); }