public DelimitedTextParser setResponseIndex(Attribute response, int index) {
        if (response.getType() != Attribute.Type.NOMINAL && response.getType() != Attribute.Type.NUMERIC) {
            throw new IllegalArgumentException("The response variable is not numeric or nominal.");
        }
        
        this.response = response;
        this.responseIndex = index;
        return this;
    }
public DelimitedTextParser setResponseIndex ( Attribute response , int index ) { if ( response . getType ( ) != Attribute . Type . NOMINAL && response . getType ( ) != Attribute . Type . NUMERIC ) { throw new IllegalArgumentException ( "The response variable is not numeric or nominal." ) ; } this . response = response ; this . responseIndex = index ; return this ; }
Sets the attribute and column index (starting at 0) of dependent/response variable.