Skip to content

Instantly share code, notes, and snippets.

@happyrobots
Created February 13, 2011 20:14
Show Gist options
  • Save happyrobots/825074 to your computer and use it in GitHub Desktop.
Save happyrobots/825074 to your computer and use it in GitHub Desktop.
Weka examples how to create attribute with different types.
FastVector validNominalValues = new FastVector(2);
validNominalValues.addElement("male");
validNominalValues.addElement("female");
Attribute nominalAttribute = new Attribute("gender", validNominalValues);
FastVector nullFastVector = null;
Attribute stringAttribute = new Attribute("userId", nullFastVector);
Attribute numericAttribute = new Attribute("humidity");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment