NormalizeSignificance() public static method

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