简体   繁体   中英

How to determine activation, loss, optimizer in keras while making artificial neural network

This is my dataframe

https://drive.google.com/file/d/1qAnyOkp_YayqzZ4i0CwqCTDiYTIOmv6I/view?usp=sharing

I need to find the value of ra, last column of that dataset via the ANN

I have used keras library to make that, here is my code

https://gist.github.com/anonymous/9955247ad7341e5bc119556dead9fc71

But the y_pred variable has set of 0s in output. Am I doing anything wrong with activation function?

I need to predict the ra values with training dataset

PS: I am a newbie to datascience and just I have started learning it via udemy

You can remove the second hidden layer as simple Ann is enough for this and also we don't have to use activator at the output layer as it is regression problem.

Please see the sample code https://github.com/naveenkambham/MachineLearningModels/blob/master/NeuralNetwork.py . This is similar to your requirement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM