- 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.
推薦閱讀
- Oracle Exadata性能優化
- C++面向對象程序設計(微課版)
- C語言程序設計實訓教程
- Bulma必知必會
- Julia機器學習核心編程:人人可用的高性能科學計算
- Learn Programming in Python with Cody Jackson
- Internet of Things with the Arduino Yún
- Microsoft Dynamics GP 2013 Reporting, Second Edition
- Learning SciPy for Numerical and Scientific Computing(Second Edition)
- C語言程序設計實驗指導 (第2版)
- Machine Learning in Java
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- App Inventor 2 Essentials
- Java程序設計教程
- LabVIEW數據采集