spkit.signal_delayed_space

spkit.signal_delayed_space(x, emb_dim=2, delay=1)

Create N-dimensional signal space

Create Signal Space of emb_dim-dimensions

Create multi-dimensional signals corresponding delay

Parameters:
x: 1d-array, input
emb_dim: int>1 default=2,
delay: int>=1, delay, lag, between smaples,

See also

signal_embeddings

Extract Signal Embeddings

References

  • wiki

Examples

import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
x, fs = sp.data.optical_sample(sample=3)
x = x[:500]
t = np.arange(len(x))/fs
X = sp.signal_delayed_space(x,emb_dim=5,delay=3)
plt.figure(figsize=(10,4))
plt.subplot(211)
plt.plot(t,x)
plt.xlim([t[0],t[-1]])
plt.ylabel('x')
plt.subplot(212)
plt.plot(t[:X.shape[0]],X)
plt.xlim([t[0],t[-1]])
plt.ylabel('Embeddings')
plt.xlabel('time (s)')
plt.show()
../../_images/spkit-signal_delayed_space-1.png