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

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.

主站蜘蛛池模板: 克什克腾旗| 射阳县| 华宁县| 和平区| 葵青区| 林州市| 教育| 四子王旗| 钟山县| 宁津县| 全南县| 灵武市| 岱山县| 泾源县| 敦化市| 独山县| 万荣县| 衡东县| 澄迈县| 乌什县| 丰原市| 赤壁市| 腾冲县| 明光市| 丘北县| 祥云县| 塔城市| 甘德县| 全南县| 启东市| 南陵县| 关岭| 海城市| 扶余县| 龙游县| 斗六市| 宜宾市| 仁布县| 青海省| 桂平市| 浦城县|