question: protected Attribute determineClassAttribute ( ) { Attribute result ; boolean binary ; int i ; ArrayList < String > values ; double [ ] dbls ; double cls ; binary = true ; for ( i = 0 ; i < m_Buffer . size ( ) ; i ++ ) { dbls = ( double [ ] ) m_Buffer . get ( i ) ; cls = dbls [ dbls . length - 1 ] ; if ( ( cls != - 1.0 ) && ( cls != + 1.0 ) ) { binary = false ; break ; } } if ( binary ) { values = new ArrayList < String > ( ) ; values . add ( "+1" ) ; values . add ( "-1" ) ; result = new Attribute ( "class" , values ) ; } else { result = new Attribute ( "class" ) ; } return result ; }
target:  Determines the class attribute, either a binary +1/-1 or numeric attribute.