File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -447,17 +447,18 @@ class CausalEntropy(JIDTBase, Directed):
447447 def __init__ (self , n = 5 , ** kwargs ):
448448 super ().__init__ (** kwargs )
449449 self ._n = n
450- self .m_utils = jp .JPackage ("infodynamics.utils" ).MatrixUtils
451450
452451 def _compute_causal_entropy (self , src , targ ):
453452
454453 src = np .squeeze (src )
455454 targ = np .squeeze (targ )
456455
456+ m_utils = jp .JPackage ("infodynamics.utils" ).MatrixUtils
457+
457458 causal_entropy = 0
458459 for i in range (1 , self ._n + 1 ):
459- Yp = self . m_utils .makeDelayEmbeddingVector (jp .JArray (jp .JDouble , 1 )(targ ), i - 1 )[:- 1 ]
460- Xp = self . m_utils .makeDelayEmbeddingVector (jp .JArray (jp .JDouble , 1 )(src ), i )
460+ Yp = m_utils .makeDelayEmbeddingVector (jp .JArray (jp .JDouble , 1 )(targ ), i - 1 )[:- 1 ]
461+ Xp = m_utils .makeDelayEmbeddingVector (jp .JArray (jp .JDouble , 1 )(src ), i )
461462 XYp = np .concatenate ([Yp , Xp ], axis = 1 )
462463
463464 Yf = np .expand_dims (targ [i - 1 :], 1 )
You can’t perform that action at this time.
0 commit comments