好文档 - 专业文书写作范文服务资料分享网站

机器学习总结之四 神经网络neural network

天下 分享 时间: 加入收藏 我要投稿 点赞

机器学习总结之四 神经网络neural network sklearn 1.17. Neural network models (supervised) 神经网络模型(监督学习) Warning :This implementation is not intended for large-scale applications. In particular, scikit-learn offers no GPU support. For much faster, GPU-based implementations, as well as frameworks offering much more flexibility to build deep learning architectures, see Related Projects. 警告:此实现不适用于大规模应用。特别是scikit-learn不提供图形处理器支持。有关更快、基于GPU的实现,以及为构建深度学习架构提供更大灵活性的框架,请参见相关项目。 Deep neural networks etc. 深度神经网络 pylearn2: A deep learning and neural network library build on theano with scikit-learn like interface. pylearn2:一个深度学习和神经网络库建立在具有scikit-learn类接口的theano之上。 sklearn_theano: scikit-learn compatible estimators, transformers, and datasets which use Theano internally sklearn_theano:sklearn在内部使用theano的兼容估计器、转换器和数据集. nolearn: A number of wrappers and abstractions around existing neural network libraries nolearn:围绕现有神经网络库的许多包装器和抽象 keras :Deep Learning library capable of running on top of either TensorFlow or Theano. keras :能够在tensorflow或thetano上运行的深度学习库。 lasagne :A lightweight library to build and train neural networks in Theano. lasagna:一个用于构建和训练神经网络的轻量级库。 skorch :A scikit-learn compatible neural network library that wraps PyTorch. skorch :包装pytorch的scikit-learn兼容神经网络库。 1.17.1. Multi-layer Perceptron 多层感知器 Multi-layer Perceptron (MLP) is a supervised learning algorithm that learns a function by training on a dataset, where m is the number of dimensions for input and o is the number of dimensions for output. Given a set of features X and a target y , it can learn a non-linear function approximator for either classification or regression. It is different from logistic regression, in that between the input and the output layer, there can be one or more non-linear layers, called hidden layers. Figure 1 shows a one hidden layer MLP with scalar output. 多层感知器(MLP)是一种监督学习算法,它通过在数据集上训练来学习函数,其中输入的维数和输出的维数。给定一组特征和一个目标,它可以学习用于分类或回归的非线性函数逼近器。它不同于逻辑回归,因为在输入和输出层之间,可以有一个或多个非线性层,称为隐藏层。 The advantages of Multi-layer Perceptron are: 多层感知器的优点有: ? Capability to learn non-linear models. 能够学习非线性模型; ? Capability to learn models in real-time (on-line learning) using partial_fit. 能够用partial_fit实时或者通过在线学习学习模型; The disadvantages of Multi-layer Perceptron (MLP) include: 缺点有: ? MLP with hidden layers have a non-convex loss function where there exists more than one local minimum. Therefore different random weight initializations can lead to different validation accuracy. 具有隐藏层的多层线性规划具有非凸损失函数,其中存在一个以上的局部最小值。因此,不同的随机权重初始化会导致不同的验证精度。 ? MLP requires tuning a number of hyperparameters such as the number of hidden neurons, layers, and iterations. 多层线性规划需要调整多个超参数,例如隐藏神经元、层和迭代的数量。 ? MLP is sensitive to feature scaling. 对特征缩放敏感。 1.17.2. Classification 分类 Class MLPClassifier implements a multi-layer perceptron (MLP) algorithm that trains using Backpropagation. MLPClassifier分类器实现了一个多层感知器(MLP)算法,该算法使用反向传播进行训练。 MLP trains on two arrays: array X of size (n_samples, n_features), which holds the training samples represented as floating point feature vectors; and array y of size (n_samples,), which holds the target values (class labels) for the training samples: After fitting (training), the model can predict labels for new samples: MLP can fit a non-linear model to the training data. clf.coefs_ contains the weight matrices that constitute the model parameters: Currently, MLPClassifier supports only the Cross-Entropy loss function, which allows probability estimates by running the predict_proba method. MLP在两个阵列上训练:大小为(n_samples,n_features)的阵列X,它保存表示为浮点特征向量的训练样本;和大小为(n_samples)的数组y,它保存训练样本的目标值(类别标签): 拟合(训练)后,模型可以预测新样本的标签: MLP可以将非线性模型拟合到训练数据中。clf.coefs_包含构成模型参数的权重矩阵: 目前,MLPClassifier只支持交叉熵损失函数,它允许通过运行predict_proba方法进行概率估计。 MLP trains using Backpropagation. More precisely, it trains using some form of gradient descent and the gradients are calculated

机器学习总结之四 神经网络neural network

机器学习总结之四神经网络neuralnetworksklearn1.17.Neuralnetworkmodels(supervised)神经网络模型(监督学习)Warning:Thisimplementationisnotintendedforlarge-scaleapplications.Inparticular,scikit-le
推荐度:
点击下载文档文档为doc格式
38hsl929ar8jj329nz0t2wkqq4mj6h00lyo
领取福利

微信扫码领取福利

微信扫码分享