File Exchange

image thumbnail

Entropy triangle

version (94.4 KB) by Francisco José Valverde-Albacete
A set of visual entropy-based tools to assess the performance of multiclass classifiers.


Updated 20 Jan 2014

View Version History

View License

Entropy_triangle is a function that implements two tools to analyze the behavior of multiple-class, or multi-class, classifiers by means of entropic measures on their confusion matrix or contingency table. First we obtain a balance equation on the entropies that captures interesting properties of the classifier. Second, by normalizing this balance equation we first obtain a 2-simplex in a three-dimensional entropy space and then the de Finetti entropy diagram or entropy triangle.

A full description can be found in:

Valverde-Albacete, F. and Peláez-Moreno, C. Two information-theoretic tools to assess the performance of multi-class classifiers. Pattern Recognition Letters (2010) vol. 31 (12) pp. 1665-1671

In version 2.0 the entropy triangle is added a color bar to plot another variable, e.g. accuracy, against mutual information, variation of information of entropy decrement. We have also added a script (compareETs) to visualize your own ETs and to print the NIT and EMA vs. other measures in latex-ready format.

The Normalized Information Transfer (NIT) rate, and the Entropy-Modified Accuracy (EMA) are improvements to accuracy to measure how good your multiclass classifiers are whose rationale and definition can be found in:

F. J. Valverde-Albacete and C. Peláez-Moreno. 100% classification accuracy considered harmful: the normalized information transfer factor explains the accuracy paradox. PLOS ONE, 9(1):e84217, January,
10 2013.

Cite As

Francisco José Valverde-Albacete (2021). Entropy triangle (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)


Agree with Piyush. Same error on R2018a

Carmen Peláez-Moreno

Hi Piyush,

Have you checked that all the files are accessible through your path?

Hi Piyush

I cannot reproduce your error. I am using R2012b now and it still works for me.

I will try to access a R2015a in case I can fix the problem and re-publish.

Piyush Singh

I get the following error straight away:

Undefined function 'entropy_triangle' for input arguments of type 'matlab.ui.Figure'.

Error in examplePrincipe (line 60)
[h,H_Pxy, H_Px,H_Py,

I'm running with Matlab (R2015a)

Seyed Mostafa Kia

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: alchemyst/ternplot

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!