Conditional Embedding (CE)

In Simplex() and SMap() the validLib parameter can be used to create a conditional embedding, specifying conditions on dataFrame variables to select valid state space points in library construction. Conditional embedding can test hypotheses about which relationships and regions of the constructed library state-space are useful for predicting specific states.

The jpyEDM Jupyter notebook GUI front end for pyEDM provides an interactive interface for such explorations.

In the following example different subsets of the constructed library are used for predicting different subsets of a target variable.

from pyEDM import *
df = sampleData["circle"]
df.head(3)
Time x y
0 1 0.0000 1.000
1 2 0.0631 0.998
2 3 0.1260 0.992

No Conditions

pred = Simplex( dataFrame = df, lib = "1 100", pred = "101 195", E = 2, Tp = 0, 
                columns = 'x', target = 'y', validLib = [] )
PlotObsPred( pred,  "Normal Lib 1:100", 2, 1 )

First 30 points of library used

validLib = [False] * df.shape[0]      # 0:199 False
validLib[ 0:29 ] = [True] * 30        # 0:29  True; 30:199 False
pred = Simplex( dataFrame = df, lib = "1 100", pred = "101 195", E = 2, Tp = 1, 
                columns = 'x', target = 'y', validLib = validLib )
PlotObsPred( pred, "CE Partial Lib 1:30", 2, 1 )

Condition of y < x and time > 50

validLib = df.eval( "y < x & Time > 50" )
pred = Simplex( dataFrame = df, lib = "1 100", pred = "101 195", E = 2, Tp = 1, 
                columns = 'x', target = 'y', validLib = validLib )
PlotObsPred( pred, "CE Partial Lib y < x and Time > 50", 2, 1 )