private void setModelContext ( InstancesHeader ih ) { //TODO possibly refactored if ( ( ih != null ) && ( ih . classIndex ( ) < 0 ) ) { throw new IllegalArgumentException ( "Context for a classifier must include a class to learn" ) ; } //TODO: check flag for checking whether training has started or not //model context is used to describe the model logger . trace ( "Model context: {}" , ih . toString ( ) ) ; }
Helper method to set the model context i . e . how many attributes they are and what is the class index