The persistent entropy has been defined in . A precursor of this definition was given in  to measure how different bars of the barcode are in length.
 M. Rucco, F. Castiglione, E. Merelli, M. Pettini, Characterisation of the idiotypic immune network through persistent entropy, in: Proc. Complex, 2015.  H. Chintakunta, T. Gentimis, R. Gonzalez-Diaz, M.-J. Jimenez, H. Krim, An entropy-based persistence barcode, Pattern Recognition 48 (2) (2015) 391–401.
Implementation of persistent entropy
Author: Eduardo Paluzo Hidalgo (cimagroup, University of Seville) contact: email@example.com
Perform the persistent entropy values of a family of persistence barcodes (or persistence diagrams).
persistent_entropy(dgms, keep_inf=False, val_inf=None, normalize=False)¶
Perform the persistent entropy values of a family of persistence barcodes (or persistence diagrams). Assumes that the input diagrams are from a determined dimension. If the infinity bars have any meaning in your experiment and you want to keep them, remember to give the value you desire to val_Inf.
dgms (ndarray (n_pairs, 2) or list of diagrams) – array or list of arrays of birth/death pairs of a persistence barcode of a determined dimension.
keep_inf (bool, default False) – if False, the infinity bars are removed. if True, the infinity bars remain.
val_inf (float, default None) – substitution value to infinity.
normalize (bool, default False) – if False, the persistent entropy values are not normalized. if True, the persistent entropy values are normalized.
ps (ndarray (n_pairs,)) – array of persistent entropy values corresponding to each persistence barcode.