pyEDM, rEDM
  • Home

Getting Started

  • EDM Framework
  • Installation

Documentation

  • API Reference
  • Parameters
  • Simplex
  • SMap
  • CCM
  • Multiview
  • EmbedDimension
  • PredictInterval
  • PredictNonlinear
  • Embed
  • MakeBlock
  • ComputeError

Embedding Parameters

  • Embedding

Examples

  • Basic EDM Examples

EDM Algorithms

  • EDM Algorithms in Depth
  • S-map First Principles
  • S-map Custom Solvers
  • Conditional Embedding
    • No Conditions
    • First 30 points of library used
    • Condition of y < x and time > 50
pyEDM, rEDM
  • EDM Algorithms
  • Conditional Embedding

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.

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

No Conditions¶

In [3]:
Copied!
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 )
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 )
No description has been provided for this image

First 30 points of library used¶

In [5]:
Copied!
validLib = [False] * df.shape[0]      # 0:199 False&gt;
validLib[ 0:30 ] = [True] * 30        # 0:29  True; 30:199 FalseSkip to main panel

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 )
validLib = [False] * df.shape[0] # 0:199 False&gt; validLib[ 0:30 ] = [True] * 30 # 0:29 True; 30:199 FalseSkip to main panel 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 )
No description has been provided for this image

Condition of y < x and time > 50¶

In [6]:
Copied!
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 )
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 )
No description has been provided for this image
In [ ]:
Copied!

In [ ]:
Copied!

Previous

Built with MkDocs using a theme provided by Read the Docs.
« Previous