protected Attribute samoaAttribute ( int index , weka . core . Attribute attribute ) { Attribute samoaAttribute ; if ( attribute . isNominal ( ) ) { Enumeration enu = attribute . enumerateValues ( ) ; List < String > attributeValues = new ArrayList < String > ( ) ; while ( enu . hasMoreElements ( ) ) { attributeValues . add ( ( String ) enu . nextElement ( ) ) ; } samoaAttribute = new Attribute ( attribute . name ( ) , attributeValues ) ; } else { samoaAttribute = new Attribute ( attribute . name ( ) ) ; } return samoaAttribute ; }
Get Samoa attribute from a weka attribute .