- 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.
推薦閱讀
- Designing Machine Learning Systems with Python
- 國際大學生程序設計競賽中山大學內部選拔真題解(二)
- Python快樂編程:人工智能深度學習基礎
- SQL Server 2016從入門到精通(視頻教學超值版)
- Unity Virtual Reality Projects
- MySQL數據庫管理與開發實踐教程 (清華電腦學堂)
- Mastering Concurrency Programming with Java 9(Second Edition)
- 超簡單:Photoshop+JavaScript+Python智能修圖與圖像自動化處理
- Python程序設計教程
- Raspberry Pi Blueprints
- Google Adsense優化實戰
- Getting Started with JUCE
- Flutter從0基礎到App上線
- Kotlin程序員面試算法寶典
- Learning Zimbra Server Essentials