简体   繁体   English

神经网络的学习曲线

[英]Learning curves for neural networks

I am trying to find optimal parameters of my neural network model implemented on octave, this model is used for binary classification and 122 features (inputs) and 25 hidden units (1 hidden layer). 我试图找到在八度上实现的神经网络模型的最佳参数,该模型用于二进制分类和122个特征(输入)和25个隐藏单位(1个隐藏层)。 For this I have 4 matrices/ Vectors: 为此,我有4个矩阵/向量:

size(X_Train): 125973 x 122
size(Y_Train): 125973 x 1
size(X_Test): 22543 x 122
size(Y_test): 22543 x 1

I have used 20% of the training set to generate a validation set ( XVal and YVal ) 我已经使用了20%的训练集来生成验证集( XValYVal

size(X): 100778 x 122
size(Y): 100778 x 1
size(XVal): 25195 x 122
size(YVal): 25195 x 1
size(X_Test): 22543 x 122
size(Y_test): 22543 x 1

The goal is to generate the Learning curves of the NN. 目的是生成NN的学习曲线。 I have learned (the hard way xD) that this is very time consuming because I used the full size of Xval and X for this. 我已经知道(很难用xD方法)这非常耗时,因为我为此使用了XvalX的完整大小。

I don't know if there is an alternative solution for this. 我不知道是否有替代解决方案。 I am thinking to reduce the size of the training vector X (like 5000 samples for example), but I don't know if I can do that, or if the results will be biased since I'll only use a portion of the training set? 我正在考虑减小训练向量X的大小(例如,例如5000个样本),但我不知道我是否可以这样做,否则结果是否会有偏差,因为我只会使用训练的一部分组?

Bests, 最好成绩,

The total number of parameters above is around 3k (122*25 + 25*1), which is not huge for one example. 上面的参数总数约为3k(122 * 25 + 25 * 1),对于一个示例来说,这并不庞大。 Since the number of examples is large, you might want to use stochastic gradient descent or mini-batches instead of gradient descent. 由于示例数量很多,因此您可能希望使用随机梯度下降或小批量而不是梯度下降。

Note that Matlab and Octave are slow in general, specially with loops. 请注意,Matlab和Octave通常较慢,特别是对于循环。 You need to write the code which uses matrix operations rather than loops for the speed to be manageable in Matlab/Octave. 您需要编写使用矩阵运算而不是循环的代码,以便在Matlab / Octave中管理速度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM