public static NormalizeSignificance ( double sig ) : double | ||
sig | double | |
Résultat | double |
private void CalculateProbability() { _probability = IClassifierConstants.NEUTRAL_PROBABILITY; if (_matchingCount == 0) { _probability = _nonMatchingCount == 0 ? IClassifierConstants.NEUTRAL_PROBABILITY : IClassifierConstants.LOWER_BOUND; } else { _probability = BayesianClassifier.NormalizeSignificance(_matchingCount / (double)(_matchingCount + _nonMatchingCount)); } }
private void CalculateProbability() { double result = IClassifierConstants.NEUTRAL_PROBABILITY; if (_matchingCount == 0) { if (_nonMatchingCount == 0) { result = IClassifierConstants.NEUTRAL_PROBABILITY; } else { result = IClassifierConstants.LOWER_BOUND; } } else { result = BayesianClassifier.NormalizeSignificance((double)_matchingCount / (double)(_matchingCount + _nonMatchingCount)); } _probability = result; }