@Override
	public void evaluate() {
		int[][] confusionMatrix = getConfusionMatrix().getMatrix();
		int length = confusionMatrix.length;

		specificity = new double[length];
		accuracy = new double[length];
		fpr = new double[length];
		tpr = new double[length];
		ppv = new double[length];
		npv = new double[length];
		fdr = new double[length];
		mcc = new double[length];
		f1s = new double[length];

		for( int clazz = 0; clazz < length; clazz++ ) {
			double tp = confusionMatrix[clazz][clazz];
			double fp = 0d;
			double fn = 0d;
			double tn = 0d;
			for( int i = 0; i < length; i++ ) {
				if( i != clazz ) {
					for( int j = 0; j < length; j++ ) {
						if( j == clazz ) {
							fp += confusionMatrix[i][j];
						} else {
							tn += confusionMatrix[i][j];
						}
					}
				} else {
					for( int j = 0; j < length; j++ ) {
						if( j != clazz ) {
							fn += confusionMatrix[i][j];
						}
					}
				}
			}

			specificity[clazz] = tn / ( fp + tn );
			accuracy[clazz] = ( tp + tn ) / ( tp + fp + fn + tn );
			tpr[clazz] = tp / ( tp + fn );
			fpr[clazz] = fp / ( fp + tn );
			ppv[clazz] = tp / ( tp + fp );
			npv[clazz] = tn / ( tn + fn );
			fdr[clazz] = 1 - ppv[clazz];
			mcc[clazz] = ( tp * tn - fp * fn ) / Math.sqrt( ( tp + fp ) * ( tp + fn ) * ( tn + fp ) * ( tn + fn ) );
			f1s[clazz] = 2 * tp / ( 2 * tp + fp + fn );
			performance += tp / ( tp + fp + fn + tn );
		}
	}