コード例 #1
0
        static void LoadData(string file)
        {
            //string fileRoot = string.Format("{0}\\DataSource", System.IO.Directory.GetCurrentDirectory());


            //string file = @"C:\Users\SD\Documents\Dataset_ANN_SVR\DataSet_Exemple.csv";    //Console.ReadLine();

            if (System.IO.File.Exists(file) == false)
            {
                Console.WriteLine("No file [{0}] found ...", file);
                return;
            }

            CsvFileIO reader1 = new CsvFileIO(file);

            DataSet = reader1.Read_DST(false, false, true, false);

            if (Equals(DataSet, null))
            {
                Console.WriteLine("No data set .."); return;
            }
            if (Equals(DataSet.Data, null))
            {
                Console.WriteLine("No data .."); return;
            }

            Console.WriteLine("There is {0} records in : {1}", DataSet.GetRowsCount(), DataSet.Name);

            //Console.WriteLine(DataSet.ToString());
        }
コード例 #2
0
        static void LoadDataDST()
        {
            string fileRoot = string.Format("{0}\\DataSource", System.IO.Directory.GetCurrentDirectory());

            string file1 = string.Format("{0}\\{1}", fileRoot, fileName_DST);

            if (System.IO.File.Exists(file1) == false)
            {
                Console.WriteLine("No file [{0}] found ...", file1);
                return;
            }

            CsvFileIO reader1 = new CsvFileIO(file1);

            DataSet = reader1.Read_DST();

            if (Equals(DataSet, null))
            {
                Console.WriteLine("No data set .."); return;
            }
            if (Equals(DataSet.Data, null))
            {
                Console.WriteLine("No data .."); return;
            }

            Console.WriteLine(DataSet.ToString());

            var x = DataSet.GetColumn(2);

            foreach (double itm in x)
            {
                Console.WriteLine(itm);
            }


            Console.WriteLine("There is {0} records in : {1}", DataSet.GetRowsCount(), DataSet.Name);
        }