예제 #1
0
        /// <summary>
        /// Convert a CSV file to a binary training file.
        /// </summary>
        /// <param name="csvFile">The CSV file.</param>
        /// <param name="binFile">The binary file.</param>
        /// <param name="inputCount">The number of input values.</param>
        /// <param name="outputCount">The number of output values.</param>
        /// <param name="headers">True, if there are headers on the3 CSV.</param>
        public static void ConvertCSV2Binary(String csvFile,
                 String binFile, int inputCount, int outputCount,
                 bool headers)
        {

            File.Delete(binFile);
            CSVNeuralDataSet csv = new CSVNeuralDataSet(csvFile.ToString(),
                   inputCount, outputCount, false);
            BufferedNeuralDataSet buffer = new BufferedNeuralDataSet(binFile);
            buffer.BeginLoad(50, 6);
            foreach (INeuralDataPair pair in csv)
            {
                buffer.Add(pair);
            }
            buffer.EndLoad();
        }
예제 #2
0
        /// <summary>
        /// Convert a CSV file to a binary training file.
        /// </summary>
        /// <param name="csvFile">The CSV file.</param>
        /// <param name="binFile">The binary file.</param>
        /// <param name="inputCount">The number of input values.</param>
        /// <param name="outputCount">The number of output values.</param>
        /// <param name="headers">True, if there are headers on the3 CSV.</param>
        public static void ConvertCSV2Binary(String csvFile,
                                             String binFile, int inputCount, int outputCount,
                                             bool headers)
        {
            File.Delete(binFile);
            CSVNeuralDataSet csv = new CSVNeuralDataSet(csvFile.ToString(),
                                                        inputCount, outputCount, false);
            BufferedNeuralDataSet buffer = new BufferedNeuralDataSet(binFile);

            buffer.BeginLoad(50, 6);
            foreach (INeuralDataPair pair in csv)
            {
                buffer.Add(pair);
            }
            buffer.EndLoad();
        }