src/core/metrics/ClassificationMetric.java
public double classificationSpecificity() {
        if (averageType == AverageType.MACRO) {
            double average = 0;
            int averageCount = 0;
            for (Integer feature : getFeatures()) {
                double FP = getFP(feature);
                double TN = getTN(feature);
                if (TN + FP > 0) {
                    average += TN / (TN + FP);
                    averageCount++;
                }
            }
            return averageCount == 0 ? 0 : average / (double)averageCount;
        }
        else {
            return (double)(getTNTotal()) / (double)(getTNTotal() + getFPTotal());
        }
    }
/**
     * Returns classification specificity (selectivity, true negative rate).<br>
     * Specificity is calculated as TN / (TN + FP).<br>
     * Measures share of correctly classified negative samples out of all samples actually negative.<br>
     * Takes into consideration if statistics is defined as macro or micro average.<br>
     *
     * @return classification specificity.
     */
Returns classification specificity (selectivity, true negative rate).
Specificity is calculated as TN / (TN + FP).
Measures share of correctly classified negative samples out of all samples actually negative.
Takes into consideration if statistics is defined as macro or micro average.

@return classification specificity.
Returns classification specificity ( selectivity true negative rate ) . Specificity is calculated as TN / ( TN + FP ) . Measures share of correctly classified negative samples out of all samples actually negative . Takes into consideration if statistics is defined as macro or micro average . @return classification specificity .
public double classificationSpecificity() {
        if (averageType == AverageType.MACRO) {
            double average = 0;
            int averageCount = 0;
            for (Integer feature : getFeatures()) {
                double FP = getFP(feature);
                double TN = getTN(feature);
                if (TN + FP > 0) {
                    average += TN / (TN + FP);
                    averageCount++;
                }
            }
            return averageCount == 0 ? 0 : average / (double)averageCount;
        }
        else {
            return (double)(getTNTotal()) / (double)(getTNTotal() + getFPTotal());
        }
    }
public double classificationSpecificity ( ) { if ( averageType == AverageType . MACRO ) { double average = 0 ; int averageCount = 0 ; for ( Integer feature : getFeatures ( ) ) { double FP = getFP ( feature ) ; double TN = getTN ( feature ) ; if ( TN + FP > 0 ) { average += TN / ( TN + FP ) ; averageCount ++ ; } } return averageCount == 0 ? 0 : average / ( double ) averageCount ; } else { return ( double ) ( getTNTotal ( ) ) / ( double ) ( getTNTotal ( ) + getFPTotal ( ) ) ; } }
Returns classification specificity (selectivity, true negative rate).<br>
 Specificity is calculated as TN / (TN + FP).<br>
 Measures share of correctly classified negative samples out of all samples actually negative.<br>
 Takes into consideration if statistics is defined as macro or micro average.<br>
Returns classification specificity ( selectivity true negative rate ) . <br > Specificity is calculated as TN / ( TN + FP ) . <br > Measures share of correctly classified negative samples out of all samples actually negative . <br > Takes into consideration if statistics is defined as macro or micro average . <br >