public void run(String argv[]) throws Exception { parse_command_line(argv); read_problem(); error_msg = svm.svm_check_parameter(prob, param); if (error_msg != null) { throw new Exception(error_msg); } model = svm.svm_train(prob, param); svm.svm_save_model(model_file_name, model); }
public void run(String argv[]) throws Exception { parse_command_line(argv); read_problem(); error_msg = svm.svm_check_parameter(prob, param); if (error_msg != null) { throw new Exception(error_msg); } model = svm.svm_train(prob, param); svm.svm_save_model(model_file_name, model); }
public void run(File input_file, File model_file, double c, int mem, double[] weight) throws IOException { input_file_name = input_file.getAbsolutePath(); model_file_name = model_file.getAbsolutePath(); //System.out.println("input_file_name: " + input_file_name); //System.out.println("model_file_name: " + model_file_name); //System.out.println("mem: " + mem); set_param(c, mem, weight); read_problem(); error_msg = svm.svm_check_parameter(prob,param); if(error_msg != null) { System.err.print("Error: "+error_msg+"\n"); System.exit(1); } if(cross_validation != 0) { //do_cross_validation(); } else { model = svm.svm_train(prob,param); svm.svm_save_model(model_file_name, model); } }
public void internal_learn() throws Exception { // dumps a file with the vectors for the documents File learningFile = new File(this.vector_location); // make space parse_command_line(); if (cross_validation && nfold < 2) throw new Exception("n-fold cross validation: n must >= 2\n"); read_problem(learningFile); error_msg = svm.svm_check_parameter(prob, param); if (error_msg != null) { System.err.print("Error: " + error_msg + "\n"); throw new Exception(error_msg); } if (cross_validation) { do_cross_validation(); } else { model = svm.svm_train(prob, param); svm.svm_save_model(model_file_name, model); } }
private void run(String argv[]) throws IOException { parse_command_line(argv); read_problem(); error_msg = svm.svm_check_parameter(prob, param); if (error_msg != null) { System.err.print("ERROR: " + error_msg + "\n"); System.exit(1); } if (cross_validation != 0) { do_cross_validation(); } else { model = svm.svm_train(prob, param); svm.svm_save_model(model_file_name, model); } }
private void run(String argv[]) throws IOException { parse_command_line(argv); read_problem(); error_msg = svm.svm_check_parameter(prob, param); if (error_msg != null) { System.err.print("ERROR: " + error_msg + "\n"); System.exit(1); } if (cross_validation != 0) { do_cross_validation(); } else { model = svm.svm_train(prob, param); svm.svm_save_model(model_file_name, model); } }
final svm_problem prob = readProblem(getInstanceInputStreamReader(".ins")); final svm_parameter param = getLibSvmParameters(); if(svm.svm_check_parameter(prob, param) != null) { throw new LibException(svm.svm_check_parameter(prob, param));
final svm_problem prob = readProblem(getInstanceInputStreamReader(".ins"), libOptions); final svm_parameter param = getLibSvmParameters(libOptions); if(svm.svm_check_parameter(prob, param) != null) { throw new LibException(svm.svm_check_parameter(prob, param));
String error_msg = svm.svm_check_parameter(prob, param);
String error_msg = svm.svm_check_parameter(p, pars);
LOG.verbose("Training one-class SVM..."); String err = svm.svm_check_parameter(prob, param); if(err != null) { LOG.warning("svm_check_parameter: " + err);