官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 平顺县| 长乐市| 扶余县| 会昌县| 阿克陶县| 洪泽县| 浮梁县| 视频| 云梦县| 阳城县| 马公市| 象山县| 泾阳县| 高州市| 平阴县| 潜江市| 海淀区| 晋州市| 盐亭县| 西乌| 开封县| 太仆寺旗| 垦利县| 收藏| 若尔盖县| 凤山县| 日喀则市| 壶关县| 海林市| 登封市| 肇庆市| 永顺县| 安达市| 富宁县| 慈溪市| 和田县| 乐安县| 沿河| 宁阳县| 柳江县| 邢台市|