/** * 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 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; }
/** Display a representation of this estimator */ @Override public String toString() { if (m_Covariance == null) { calculateCovariance(); } String result = "NN Conditional Estimator. " + m_CondValues.size() + " data points. Mean = " + Utils.doubleToString(m_ValueMean, 4, 2) + " Conditional mean = " + Utils.doubleToString(m_CondMean, 4, 2); result += " Covariance Matrix: \n" + m_Covariance; return result; }
/** Display a representation of this estimator */ @Override public String toString() { if (m_Covariance == null) { calculateCovariance(); } String result = "NN Conditional Estimator. " + m_CondValues.size() + " data points. Mean = " + Utils.doubleToString(m_ValueMean, 4, 2) + " Conditional mean = " + Utils.doubleToString(m_CondMean, 4, 2); result += " Covariance Matrix: \n" + m_Covariance; return result; }