public static void TestTrainDataLabel(String paPath) { List <String> paths = IOTools.ListPaths(paPath); List <String> labelTotal = new List <string>(); List <String> dataTotal = new List <string>(); List <String> timeTotal = new List <string>(); int i = 0; int testnum = 1 ; foreach (String path in paths) { i++; //if (i == testnum) // continue; RecordAnalyzerPad ra = new RecordAnalyzerPad(); List <String> label, data, recordTIme; ra.DoAna(path, out label, out data, out recordTIme); // IOTools.WriteListToTxt(label, path + @"\label.txt"); // IOTools.WriteListToTxt(data, path + @"\data.txt"); labelTotal.AddRange(label); dataTotal.AddRange(data); timeTotal.AddRange(recordTIme); } IOTools.WriteListToTxt(labelTotal, paPath + @"\trainlabel.txt"); IOTools.WriteListToTxt(dataTotal, paPath + @"\traindata.txt"); IOTools.WriteListToTxt(timeTotal, paPath + @"\recordTime.txt"); }
public static void Test3(String path) { RecordAnalyzerPad ra = new RecordAnalyzerPad(); List <String> label, data, recordTIme; ra.DoAna(path, out label, out data, out recordTIme); IOTools.WriteListToTxt(label, path + @"\label.txt"); IOTools.WriteListToTxt(data, path + @"\data.txt"); }
public static void TestRunningData(String paPath, int epc) { List <String> paths = IOTools.ListPaths(paPath); List <String> dataTotal = new List <string>(); int i = 0; int testnum = 1 ; foreach (String path in paths) { i++; //if (i == testnum) // continue; RecordAnalyzerPad ra = new RecordAnalyzerPad(); List <String> label, data, recordTIme; ra.DoAnaRunning(path, out data, epc); // IOTools.WriteListToTxt(label, path + @"\label.txt"); // IOTools.WriteListToTxt(data, path + @"\data.txt"); dataTotal.AddRange(data); } List <String> labelTotal = new List <string>(); for (int j = 0; j < dataTotal.Count; j++) { labelTotal.Add("1 1"); } if (epc != -1) { IOTools.WriteListToTxt(dataTotal, paPath + @"\traindata" + epc + ".txt"); IOTools.WriteListToTxt(labelTotal, paPath + @"\trainlabel" + epc + ".txt"); } else { IOTools.WriteListToTxt(dataTotal, paPath + @"\traindata.txt"); IOTools.WriteListToTxt(labelTotal, paPath + @"\trainlabel.txt"); } }
public static void Test6() { RecordAnalyzerPad ra = new RecordAnalyzerPad(); ra.UniformLabelDistribution(@"E:\DataTest"); }