Open MalavikaAR opened 2 years ago
Hi @MalavikaAR 👋. ! Judging by the error I think that you are trying to pass pandas.DataFrame
instead of numpy.array
through the neural network.
Ohh, okay, I will try to change that in my dataset. But what was the issue in trying with make_moons??
Heyy @SkalskiP , I changed it to numpyarray, and that error was gone, thankyou, but now I got the following error:
KeyError Traceback (most recent call last)
@MalavikaAR could you please show me how did you use make_moons
function?
@SkalskiP
https://colab.research.google.com/drive/1dkvOMq2AYuHlTYLHodQzmro1kweY5W3O#scrollTo=e9-aFcBbNlsx
Please take a look at this link. I have tried it in colab.
I just wanted to add, the error is gone when I deleted the last indexing [0] of ln: [19] and got an accuracy of 0.98. But I am not sure if it is the right thing to do.
ln : [19]
params_values = train(np.transpose(X_train), np.transpose(y_train.reshape((y_train.shape[0], 1))), NN_ARCHITECTURE, 10000, 0.01)[0]
I got an error while running the NumPy neural network code using my dataset, "'DataFrame' object has no attribute 'reshape'". Also then I ran using your dataset make_moons, and again I got an error "Keyerror: 0".
ln [19]:
Training
params_values = train(np.transpose(X_train), np.transpose(y_train.reshape((y_train.shape[0], 1))), NN_ARCHITECTURE, 10000, 0.01)[0]
KeyError Traceback (most recent call last)