Examples of Prediction


Examples of com.google.api.services.prediction.Prediction

  }

  private static void run() throws Exception {
    // authorization
    Credential credential = authorize();
    Prediction prediction = new Prediction.Builder(HTTP_TRANSPORT,
        JSON_FACTORY, credential).setApplicationName(
        "Google-PredictionSample/1.0").build();
    train(prediction);
    predict(prediction, "Is this sentence in English?");
    predict(prediction, "�Es esta frase en Espa�ol?");
View Full Code Here

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

Examples of org.data2semantics.proppred.learners.Prediction

    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

Examples of org.data2semantics.proppred.learners.Prediction

    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

Examples of org.data2semantics.proppred.learners.Prediction

    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
Copyright © 2018 www.massapi.com. 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.