So I have two matrix, W and X.
print(W)
array([ 5.76951515, 19. ])
print(X)
array([[ 1., 5.],
[ 1., 6.],
[ 1., 7.],
[ 1., 8.],
[ 1., 9.],
[ 1., 10.],
[ 1., 11.],
[ 1., 12.],
[ 1., 13.],
[ 1., 14.]])
and I'd like multiply both matrix W and X, varying the value of W[1] for each i iterations, like this.
for i in range(10):
W[1] = i
yP_ = W @ X.T
ecm = np.mean((Y - yP_ ) ** 2)
plt.plot(W[1], ecm, 'o')
plt.show()
is there any way to avoid that for?
for? Performance?