Skip to content

Instantly share code, notes, and snippets.

@happyrobots
Created February 13, 2011 22:00
Show Gist options
  • Save happyrobots/825195 to your computer and use it in GitHub Desktop.
Save happyrobots/825195 to your computer and use it in GitHub Desktop.
FastVector attributes = new FastVector();
attributes.addElement(numericAttribute);
attributes.addElement(nominalAttribute);
attributes.addElement(stringAttribute);
attributes.addElement(anyOtherAttribute);
attributes.addElement(anotherAttribute);
Instances dataSet = new Instances("dataSetName", attributes, 50);
dataSet.setClassIndex(dataSet.numAttributes() - 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment