예제 #1
0
 /// <summary>
 /// Adds the specified x.
 /// </summary>
 /// <param name="X">The x.</param>
 /// <param name="Y">The y.</param>
 public void Add(List <float> X, float Y)
 {
     XFrame.Add(X);
     YFrame.Add(new List <float> {
         Y
     });
 }
예제 #2
0
        /// <summary>
        /// Build the dataset by adding features and label
        /// </summary>
        /// <param name="features">The features.</param>
        /// <param name="label">The label.</param>
        public void Add(List <float> features, float label)
        {
            if (padSequence)
            {
                features = PadData(features);
            }

            XFrame.Add(features);
            List <float> ydatalist = new List <float>();

            for (int i = 0; i < labels; i++)
            {
                if (i == label)
                {
                    ydatalist.Add(1);
                    continue;
                }

                ydatalist.Add(0);
            }

            YFrame.Add(ydatalist);
        }