/** * Get a probability estimate for a value * * @param data the value to estimate the probability of * @return the estimated probability of the supplied value */ public double getProbability(double data) { double delta = data - m_ValueMean; if (m_CovarianceInverse == null) { return 0; } return normalKernel(delta); }
MahalanobisEstimator newEst = new MahalanobisEstimator(covariance, delta, xmean); if (argv.length > 6) { System.out.println(current + " " + newEst.getProbability(current)); } else { System.out.println("Covariance Matrix\n" + covariance);
/** * Get a probability estimator for a value * * @param given the new value that data is conditional upon * @return the estimator for the supplied value given the condition */ @Override public Estimator getEstimator(double given) { if (m_Covariance == null) { calculateCovariance(); } Estimator result = new MahalanobisEstimator(m_Covariance, given - m_CondMean, m_ValueMean); return result; }
MahalanobisEstimator newEst = new MahalanobisEstimator(covariance, delta, xmean); if (argv.length > 6) { System.out.println(current + " " + newEst.getProbability(current)); } else { System.out.println("Covariance Matrix\n" + covariance);
/** * Get a probability estimator for a value * * @param given the new value that data is conditional upon * @return the estimator for the supplied value given the condition */ @Override public Estimator getEstimator(double given) { if (m_Covariance == null) { calculateCovariance(); } Estimator result = new MahalanobisEstimator(m_Covariance, given - m_CondMean, m_ValueMean); return result; }
/** * Get a probability estimate for a value * * @param data the value to estimate the probability of * @return the estimated probability of the supplied value */ public double getProbability(double data) { double delta = data - m_ValueMean; if (m_CovarianceInverse == null) { return 0; } return normalKernel(delta); }