- Neural Networks with Keras Cookbook
- V Kishore Ayyadevara
- 167字
- 2021-07-02 12:46:32
Getting ready
Given that the objective is to minimize error, let's define the error that we shall be minimizing—we should ensure that a positive error and a negative error do not cancel out each other. Hence, we shall minimize the absolute error. An alternative of this is to minimize the squared error.
Now that we have fine-tuned our objective, let's define our strategy of solving this problem:
- Normalize the input dataset so that all variables range between zero to one.
- Split the given data to train and test datasets.
- Initialize the hidden layer that connects the input of 13 variables to the output of one variable.
- Compile the model with the Adam optimizer, and define the loss function to minimize as the mean absolute error value.
- Fit the model.
- Make a prediction on the test dataset.
- Calculate the error in the prediction on the test dataset.
Now that we have defined our approach, let's go ahead and perform it in code in the next section.
推薦閱讀
- Unreal Engine Physics Essentials
- 精通JavaScript+jQuery:100%動態網頁設計密碼
- 數據庫程序員面試筆試真題與解析
- Magento 2 Development Cookbook
- 深入淺出Android Jetpack
- Learning ELK Stack
- Python之光:Python編程入門與實戰
- 持續輕量級Java EE開發:編寫可測試的代碼
- Android開發三劍客:UML、模式與測試
- “笨辦法”學C語言
- 程序員的成長課
- Android應用程序設計
- Instant Pygame for Python Game Development How-to
- 大象:Thinking in UML(第二版)
- Implementing DevOps with Ansible 2