import os
import numpy as np
from sklearn.decomposition import TruncatedSVD
from utils.helper_03 import *
# set random-seed
np.random.seed(1)
# Generate data
x = np.arange(-0.5, 0.5, 0.01)
y = x + (np.random.rand(len(x))-0.5)*0.2
plt.figure(figsize=(5, 5))
plt.plot(x, y, 'o'); plt.grid();