Beispiel #1
0
        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()));
        }
Beispiel #2
0
 public void TransposedDuplicate(Connection cloneConnection)
 {
     cloneConnection.WeightMatrix = WeightMatrix.Transpose();
 }
Beispiel #3
0
 public void TransposedDuplicate(Bundle cloneBundle)
 {
     cloneBundle.WeightMatrix = WeightMatrix.Transpose();
 }