@@ -539,7 +539,7 @@ def setdiff(a, b):
539539 return symbols , probabilities
540540
541541
542- def permutation_entropy (data , dx = 3 , dy = 1 , taux = 1 , tauy = 1 , base = 2 , normalized = True , probs = False , tie_precision = None ):
542+ def permutation_entropy (data , dx = 3 , dy = 1 , taux = 1 , tauy = 1 , base = 'e' , normalized = True , probs = False , tie_precision = None ):
543543 """
544544 Calculates the Shannon entropy using an ordinal distribution obtained from
545545 data\\ [#bandt_pompe]_\\ :sup:`,`\\ [#ribeiro_2012]_.
@@ -1490,7 +1490,7 @@ def global_node_entropy(data, dx=3, dy=1, taux=1, tauy=1, overlapping=True, conn
14901490 args_in = np .argwhere (links_target == node ).flatten ()
14911491 p_in = np .sum (weights [args_in ])
14921492
1493- h_i = - np .sum (renorm_weights * np .log2 (renorm_weights ))
1493+ h_i = - np .sum (renorm_weights * np .log (renorm_weights ))
14941494 h_gn += p_in * h_i
14951495
14961496 return h_gn
@@ -2052,7 +2052,7 @@ def maximum_complexity_entropy(dx=3, dy=1, m=1):
20522052 return np .asarray ((hlist_ [args ], clist_ [args ])).T
20532053
20542054
2055- def weighted_permutation_entropy (data , dx = 3 , dy = 1 , taux = 1 , tauy = 1 , base = 2 , normalized = True , tie_precision = None ):
2055+ def weighted_permutation_entropy (data , dx = 3 , dy = 1 , taux = 1 , tauy = 1 , base = 'e' , normalized = True , tie_precision = None ):
20562056 """
20572057 Calculates Shannon entropy using a weighted ordinal distribution
20582058 obtained from data\\ [#fadlallah]_.
@@ -2680,4 +2680,4 @@ def rank_sort(data):
26802680 for pattern in patterns :
26812681 dict_probs_group [group ] += dict_probs [pattern ]
26822682
2683- return dict_probs_group
2683+ return dict_probs_group
0 commit comments