@Override public void run(Object toRun, String[] options) throws IllegalArgumentException { if (!(toRun instanceof MLRClassifier)) { throw new IllegalArgumentException("Object to run is not an MLRClassifier!"); } try { ((MLRClassifier) toRun).setLaunchedFromCommandLine(true); runClassifier((Classifier) toRun, options); ((MLRClassifier) toRun).closeREngine(); } catch (Exception ex) { ex.printStackTrace(); } }
/** * Main method for testing this class. * * @param argv the options */ public static void main(String[] args) { MLRClassifier c = new MLRClassifier(); c.run(c, args); }