Reputation: 11
I generated my dataset based on the following equation. y = 3*(x1) + 5*(x2)**3
I took the training code from the following website. http://neupy.com/modules/generated/neupy.algorithms.QuasiNewton.html#neupy.algorithms.QuasiNewton
I applied linear scaling to the inputs, log scaling to the output. After training, the prediction and test values are completely different.
Can someone explain to me what's going on here? Thank you!
quasi_opt = algorithms.QuasiNewton(Input(2) >> Sigmoid(3) >> Sigmoid(1),update_function='bfgs')
quasi_opt.train(X_train, y_train, epochs=10)
clf_quasi_train= quasi_opt.fit(X_train, y_train)
clf_quasi_val = quasi_opt.fit(X_val, y_val)
y_pred=quasi_opt.predict(X_val)
plt.scatter(X_val['x1'],y_pred,color='red')
plt.scatter(X_val['x1'],y_val,color='blue')
x1 vs predicted (red) and test (blue) values of y
plt.scatter(X_val['x2'],y_pred,color='red')
plt.scatter(X_val['x2'],y_val,color='blue')
x2 vs predicted (red) and test (blue) values of y
Upvotes: 1
Views: 174