List of usage examples for weka.core.converters AbstractFileLoader reset
@Override public void reset() throws IOException
From source file:adams.gui.tools.DatasetCompatibilityPanel.java
License:Open Source License
/** * Opens the specified files with the given loader. * /*from www. j a va 2 s.c o m*/ * @param files the files to open * @param loader the loader to use * @return null if successful, otherwise error message */ protected String open(File[] files, AbstractFileLoader loader) { Instances[] datasets; int i; if (files.length < 2) return "You must supply at least two files!"; if (loader == null) return "No file loader specified!"; datasets = new Instances[files.length]; for (i = 0; i < files.length; i++) { try { loader.setFile(files[i].getAbsoluteFile()); datasets[i] = loader.getStructure(); loader.reset(); } catch (Exception e) { return "Failed to load dataset from " + files[i] + ":\n" + Utils.throwableToString(e); } } compare(files, datasets); return null; }