import d2l_dx
from mxnet import autograd, np, npx, gluon, init
from mxnet.gluon import nn
import matplotlib.pyplot as plt
npx.set_np()

T = 1000
time = np.arange(0, T)
x = np.sin(0.01 * time) + 0.2 * np.random.normal(size=T)

# plt.plot(x)
# plt.show()

tau = 4
features = np.zeros((T - tau, tau))

for i in range(tau):
    features[:, i] = x[i: T - tau + i]
labels = x[tau:]


834c14e61b01e9b4f022a5b981040405d9a57ae1
<mask token>

<mask token>
npx.set_np()
<mask token>
for i in range(tau):
    features[:, i] = x[i:T - tau + i]
<mask token>

<mask token>
npx.set_np()
T = 1000
time = np.arange(0, T)
x = np.sin(0.01 * time) + 0.2 * np.random.normal(size=T)
tau = 4
features = np.zeros((T - tau, tau))
for i in range(tau):
    features[:, i] = x[i:T - tau + i]
labels = x[tau:]

import d2l_dx
from mxnet import autograd, np, npx, gluon, init
from mxnet.gluon import nn
import matplotlib.pyplot as plt
npx.set_np()
T = 1000
time = np.arange(0, T)
x = np.sin(0.01 * time) + 0.2 * np.random.normal(size=T)
tau = 4
features = np.zeros((T - tau, tau))
for i in range(tau):
    features[:, i] = x[i:T - tau + i]
labels = x[tau:]

import d2l_dx
from mxnet import autograd, np, npx, gluon, init
from mxnet.gluon import nn
import matplotlib.pyplot as plt
npx.set_np()

T = 1000
time = np.arange(0, T)
x = np.sin(0.01 * time) + 0.2 * np.random.normal(size=T)

# plt.plot(x)
# plt.show()

tau = 4
features = np.zeros((T - tau, tau))

for i in range(tau):
    features[:, i] = x[i: T - tau + i]
labels = x[tau:]

