all the instances in the file (ARFF, CSV, XRFF, ...) DataSource source = new DataSource(filename); Instances instances = source.getDataSet(); // Make the last attribute be the class instances.setClassIndex(instances.numAttributes() - 1); // Print header and instances. System.out.println("\nDataset:\n"); System.out.println(instances); ...
All methods that change a set of instances are safe, ie. a change of a set of instances does not affect any other sets of instances. All methods that change a datasets's attribute information clone the dataset before it is changed.
@author Eibe Frank (eibe@cs.waikato.ac.nz)
@author Len Trigg (trigg@cs.waikato.ac.nz)
@author FracPete (fracpete at waikato dot ac dot nz)
@version $Revision: 1.73 $