Package org.data2semantics.proppred.learners

Examples of org.data2semantics.proppred.learners.Prediction


  private static Prediction[] testLinearModel(LibLINEARModel model, Feature[][] problem) {

    Prediction[] pred = new Prediction[problem.length];   
    for (int i = 0; i < problem.length; i++) {
      double[] decVal = new double[(model.getModel().getNrClass() <= 2) ? 1 : model.getModel().getNrClass()];
      pred[i] = new Prediction(Linear.predictValues(model.getModel(), problem[i], decVal), i);
      pred[i].setDecisionValue(decVal);
    }
    return pred;
  }
View Full Code Here


    double[] prediction = new double[prob.l];
    Linear.crossValidation(prob, linearParams, folds, prediction);
    Prediction[] pred2 = new Prediction[prob.l];

    for (int i = 0; i < pred2.length; i++) {
      pred2[i] = new Prediction(prediction[i], i);
    }
    return pred2;
  }
View Full Code Here

    svm_node[][] testNodes = testNodesMap.get(model.getKernelSetting());
    Prediction[] pred = new Prediction[testNodes.length]
   
    for (int i = 0 ; i < testNodes.length; i++) {
      double[] decVal = new double[model.getModel().nr_class*(model.getModel().nr_class-1)/2];
      pred[i] = new Prediction(svm.svm_predict_values(model.getModel(), testNodes[i], decVal), i);
      pred[i].setDecisionValue(decVal);
    }
    return pred;
  }
View Full Code Here

    double[] prediction = new double[prob.l];
    svm.svm_cross_validation(prob, svmParams, folds, prediction);
    Prediction[] pred2 = new Prediction[prob.l];

    for (int i = 0; i < pred2.length; i++) {
      pred2[i] = new Prediction(prediction[i], i);
    }
    return pred2;
  }
View Full Code Here

TOP

Related Classes of org.data2semantics.proppred.learners.Prediction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.