NormalizeSignificance() public static method

public static NormalizeSignificance ( double sig ) : double
sig double
return 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));
            }
        }
Esempio n. 2
0
        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;
        }