From: Adriana on 21 Jul 2010 15:20 Hi there, Two questions: 1. I'm using newff and train to create a neural network (LM algorithm). I need to retrieve the training, validation and testing dataset I'm using after the training (I'm using the default 60,20,20 division of the input dataset). I'could obtain those using dividerand in the input dataset (and get a train, val, test input dataset) and then using the indices with divideind to get the corresponding target datasets. But, then, how to use those datasets when calling "train"? Or when doing: [trainP2,valP2,testP2,trainInd2,valInd2,testInd2] = dividerand(p); [trainT2,valT2,testT2] = divideind(t,trainInd2,valInd2,testInd2); net=train(net,p,t); train automatically uses the train,val and test input and target datasets? 2. If I want to reproduce the network, it's not clear to me how to "set the state of rand and randn" as I read in a previous post? Thanks in advance! Adriana
From: Greg Heath on 21 Jul 2010 23:17 On Jul 21, 3:20 pm, "Adriana " <adri...(a)cires.colorado.edu> wrote: > Hi there, > Two questions: > 1. I'm using newff and train to create a neural network (LM algorithm). > I need to retrieve the training, validation and testing dataset I'm using after the training (I'm using the default 60,20,20 division of the input dataset). > I'could obtain those using dividerand in the input dataset (and get a train, val, test input dataset) and then using the indices with divideind to get the corresponding target datasets. > But, then, how to use those datasets when calling "train"? Or when doing: > > [trainP2,valP2,testP2,trainInd2,valInd2,testInd2] = dividerand(p); > [trainT2,valT2,testT2] = divideind(t,trainInd2,valInd2,testInd2); > net=train(net,p,t); > > train automatically uses the train,val and test input and target datasets? > > 2. If I want to reproduce the network, it's not clear to me how to "set the > state of rand and randn" as I read in a previous post? What post? What version of MATLAB? What statements have you tried? Hope this helps. Greg
From: Adriana on 22 Jul 2010 12:54 Hi, Thanks for your reply. I'm working with Matlab 7.9.0529 (R2009b) I don't think it matters the post i'm refering to (I cannot find it now..). I have to use (in another application) the datasets used in the training, validation and testing of the neural network so I want to know how to retrieve them. I'm using the typical statements for contructing and training a NN: ....... net=newff(data_in,data_out,hidden_neu); net=init(net); net=train(net,data_in,data_out); ....... So I would like to be able to know which data is actually used in the training, validation and testing. Is it valid to add the 2 lines before the "net=.." statement (meaning that, is the training algorithm going to use the trainP2, valP2, testP2,trainT2,valT2,testT2 datasets as input/target training, validation and testing data sets): [trainP2,valP2,testP2,trainInd2,valInd2,testInd2] = dividerand(p); [trainT2,valT2,testT2] = divideind(t,trainInd2,valInd2,testInd2); net=train(net,data_in,data_out); .....or not? If not, please, any tips about how to do it? And I want to be able to reproduce the same neural network (i.e. using over and over again matlab with the same datasets...). Hope it helps, Thanks! Adriana Greg Heath <heath(a)alumni.brown.edu> wrote in message <91015931-610b-49b2-bc0f-077c0b35a3cc(a)r27g2000yqb.googlegroups.com>... > On Jul 21, 3:20 pm, "Adriana " <adri...(a)cires.colorado.edu> wrote: > > Hi there, > > Two questions: > > 1. I'm using newff and train to create a neural network (LM algorithm). > > I need to retrieve the training, validation and testing dataset I'm using after the training (I'm using the default 60,20,20 division of the input dataset). > > I'could obtain those using dividerand in the input dataset (and get a train, val, test input dataset) and then using the indices with divideind to get the corresponding target datasets. > > But, then, how to use those datasets when calling "train"? Or when doing: > > > > [trainP2,valP2,testP2,trainInd2,valInd2,testInd2] = dividerand(p); > > [trainT2,valT2,testT2] = divideind(t,trainInd2,valInd2,testInd2); > > net=train(net,p,t); > > > > train automatically uses the train,val and test input and target datasets? > > > > 2. If I want to reproduce the network, it's not clear to me how to "set the > > state of rand and randn" as I read in a previous post? > > What post? > What version of MATLAB? > What statements have you tried? > > Hope this helps. > > Greg
|
Pages: 1 Prev: relational operator tolerences Next: relational operator tolerences |