scikit 神经网络_使用scikit学习的深层神经多层感知器mlp

本文介绍了如何利用scikit-learn库构建深度神经网络的多层感知器(MLP)。通过实例展示了设置神经网络参数和训练过程,为初学者提供了深入理解神经网络的途径。
摘要由CSDN通过智能技术生成

scikit 神经网络

In the world of deep learning, TensorFlow, Keras, Microsoft Cognitive Toolkit (CNTK), and PyTorch are very popular. Most of us may not realise that the very popular machine learning library Scikit-learn is also capable of a basic deep learning modelling. In this article, I will discuss the realms of deep learning modelling feasibility in Scikit-learn and limitations. Further, I will discuss hands-on implementation with two examples.

在深度学习领域,TensorFlow,Keras,Microsoft Cognitive Toolkit(CNTK)和PyTorch非常受欢迎。 我们大多数人可能没有意识到,非常受欢迎的机器学习库Scikit-learn也能够进行基本的深度学习建模。 在本文中,我将讨论Scikit学习中的深度学习建模可行性和局限性领域。 此外,我将通过两个示例讨论动手实施。

Salient points of Multilayer Perceptron (MLP) in Scikit-learn

Scikit学习中多层感知器(MLP)的显着点

  • There is no activation function in the output layer.

    输出层中没有激活功能。
  • For regression scenarios, the square error is the loss function, and cross-entropy is the loss function for the classification

    对于回归方案,平方误差是损失函数,交叉熵是分类的损失函数
  • It can work with single as well as multiple target values regression.

    它可以与单个以及多个目标值回归一起使用。
  • Unlike other popular packages, likes Keras the implementation of MLP in Scikit doesn’t support GPU.

    与其他流行的软件包不同,像Keras一样,Scikit中的MLP实现不支持GPU。
  • We cannot fine-tune the parameters like different activation functions, weight initializers etc. for each layer.

    我们无法为每层微调参数,例如不同的激活函数,权重初始化器等。

Regression Example

回归示例

Step 1: In the Scikit-Learn package, MLPRegressor is implemented in neural_network module. We will import the other modules like “train_test_split” to split the dataset into training and train set to test the model, “fetch_california_housing” to get the data, and “StandardScaler” to scale the data as different features( independent variables) have wide value range scale. It is very important to scale the data used for training the model.

步骤1:Scikit-Learn软件包中,MLPRegressor在Neuro_network模块中实现。 我们将导入其他模块,例如“ train_test_split”以将数据集分为训练和训练集以测试模型,“ fetch_california_housing”以获取数据,以及“ StandardScaler”以缩放数据,因为不同的特征(自变量)具有广泛的价值范围刻度。 缩放用于训练模型的数据非常重要。

You can learn more about different scalers in the article

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值