Encog.ML.Data.Basic.BasicMLDataPair.CreatePair C# (CSharp) Method

CreatePair() public static method

Create a new neural data pair object of the correct size for the neural network that is being trained. This object will be passed to the getPair method to allow the neural data pair objects to be copied to it.
public static CreatePair ( int inputSize, int idealSize ) : IMLDataPair
inputSize int The size of the input data.
idealSize int The size of the ideal data.
return IMLDataPair
        public static IMLDataPair CreatePair(int inputSize, int idealSize)
        {
            IMLDataPair result;

            if (idealSize > 0)
            {
                result = new BasicMLDataPair(new BasicMLData(inputSize),
                                             new BasicMLData(idealSize));
            }
            else
            {
                result = new BasicMLDataPair(new BasicMLData(inputSize));
            }

            return result;
        }