/** * Get a probability estimate for a value * * @param data the value to estimate the probability of * @param given the new value that data is conditional upon * @return the estimated probability of the supplied value */ public double getProbability(double data, double given) { return getEstimator(given).getProbability(data); }
DNConditionalEstimator newEst = new DNConditionalEstimator(maxA + 1, 1); for(int i = 0; i < argv.length - 1; i += 2) { System.out.println("Prediction for " + currentA + '|' + currentB + " = " + newEst.getProbability(currentA, currentB)); newEst.addValue(currentA, currentB, 1);
DNConditionalEstimator newEst = new DNConditionalEstimator(maxA + 1, 1); for(int i = 0; i < argv.length - 1; i += 2) { System.out.println("Prediction for " + currentA + '|' + currentB + " = " + newEst.getProbability(currentA, currentB)); newEst.addValue(currentA, currentB, 1);
/** * Get a probability estimate for a value * * @param data the value to estimate the probability of * @param given the new value that data is conditional upon * @return the estimated probability of the supplied value */ public double getProbability(double data, double given) { return getEstimator(given).getProbability(data); }