如何在MOA中使用csv文件作为流源?在MOA的GUI中,只有一些选项可以使用发电机。我可以使用存储在csv文件中的我自己的数据作为流来源吗?
发布于 2017-11-26 18:03:03
您可以像这样使用SimpleCSVStream类:
SimpleCSVStream stream = new SimpleCSVStream();
stream.csvFileOption.setValue("d:\\your_filename.csv");
stream.classIndexOption.setValue(true); //last column is class lable
stream.prepareForUse();
while (stream.hasMoreInstances()) {
InstanceExample trainInst = stream.nextInstance();
//learning code
}https://stackoverflow.com/questions/35920672
复制相似问题