/** * 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); }
seed = Integer.parseInt(argv[0]); KKConditionalEstimator newEst = new KKConditionalEstimator(0.1); int y = Math.abs(r.nextInt()%100); System.out.println("# " + x + " " + y); newEst.addValue(x, y, 1); Estimator result = newEst.getEstimator(cond); for(int i = 0; i <= 100; i+= 5) { System.out.println(" " + i + " " + result.getProbability(i));
data = round(data); given = round(given); int insertIndex = findNearestPair(given, data); if ((m_NumValues <= insertIndex) || (m_CondValues[insertIndex] != given)
seed = Integer.parseInt(argv[0]); KKConditionalEstimator newEst = new KKConditionalEstimator(0.1); int y = Math.abs(r.nextInt()%100); System.out.println("# " + x + " " + y); newEst.addValue(x, y, 1); Estimator result = newEst.getEstimator(cond); for(int i = 0; i <= 100; i+= 5) { System.out.println(" " + i + " " + result.getProbability(i));
data = round(data); given = round(given); int insertIndex = findNearestPair(given, data); if ((m_NumValues <= insertIndex) || (m_CondValues[insertIndex] != given)
/** * 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); }