keras 回归预测_Keras-使用MPL进行回归预测

keras 回归预测

keras 回归预测

Keras-使用MPL进行回归预测 (Keras - Regression Prediction using MPL)

In this chapter, let us write a simple MPL based ANN to do regression prediction. Till now, we have only done the classification based prediction. Now, we will try to predict the next possible value by analyzing the previous (continuous) values and its influencing factors.

在本章中,让我们编写一个基于MPL的简单ANN进行回归预测。 到目前为止,我们仅完成了基于分类的预测。 现在,我们将尝试通过分析先前(连续)的值及其影响因素来预测下一个可能的值。

The Regression MPL can be represented as below −

回归MPL可以表示如下-

MPL

The core features of the model are as follows −

该模型的核心特征如下-

  • Input layer consists of (13,) values.

    输入层由(13,)个值组成。

  • First layer, Dense consists of 64 units and ‘relu’ activation function with ‘normal’ kernel initializer.

    第一层, Dense由64个单元和带有“正常”内核初始化程序的“ relu”激活功能组成。

  • Second layer, Dense consists of 64 units and ‘relu’ activation function.

    第二层, Dense由64个单元和“ relu”激活功能组成。

  • Output layer, Dense consists of 1 unit.

    输出层, Dense由1个单元组成。

  • Use mse as loss function.

    使用mse作为损失函数。

  • Use RMSprop as Optimizer.

    使用RMSprop作为优化程序。

  • Use accuracy as metrics.

    使用准确性作为指标。

  • Use 128 as batch size.

    使用128作为批处理大小。

  • Use 500 as epochs.

    使用500作为时代。

Step 1 − Import the modules

步骤1-导入模块

Let us import the necessary modules.

让我们导入必要的模块。


import keras 

from keras.datasets import boston_housing 
from keras.models import S
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值