spkit.create_multidim_space_signal

spkit.create_multidim_space_signal(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,
Returns:
X: 2d-array of shape (N - (emb_dim - 1) * delay, emb_dim)

See also

signal_embeddings

Extract Signal Embeddings

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.create_multidim_space_signal(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-create_multidim_space_signal-1.png