Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Neural Networks and Crossvalind

Subject: Neural Networks and Crossvalind

From: Greg Heath

Date: 16 Jan, 2013 22:32:08

Message: 1 of 1

From: xristos lymbe <xristos.geom@hotmail.com>
Sent: Jan 14, 2013 06:39:06 AM
>your answer was helpful thank you a lot! ... anyway some key words in your
>answer lead me to find about "cross validation" and "leave one out",
>so i made some progress
>
>indices=crossvalind('Kfold',y,5);
>for i = 1:10
> testData = (indices == i);
> trainData = ~testData;
 >
>now i wanna implement that the perceptron

Nomenclature: feedforward network (preferred) or MLP (multi-layer-perceptron)

>will use trainData to learn and testData to validate ,

Validation and testing are two very separate concepts. See my comments in
the post

http://www.mathworks.com/matlabcentral/answers/58761-a-complex-neural-network-data-partition-validation-subnetworks

>smth like ...[net,tr] = train(net,trainData,targets); (any ideas?)

Validation and testing are defaults. see the documentation, run the documentation
examples. Then modify to fit yor purposes.

Unfortunately, I don't think that the NNTBX works well with crossvalind.
It is sufficient to use network functions net.divideFcn, net.divideParam

and

>> lookfor divide

-----SNIP

divideind - Partition indices into three sets using specified indices.
divideint - Partition indices into three sets using interleaved indices.
dividerand - Partition indices into three sets using random indices.
dividetrain - Partition indices into training set only.
dividevec - Divide problem vectors into training, validation and test vectors.

>i am new to these things and i need them for my research in neuroscience,
>the fact that i am not good in matlab keeps me really behind but i guess i
>will improove since i started using it last month.

>** after i finish the code i will make a post to mathworks.com becouse
>many people have problems with these kind of stuff

Inefficient. Post whenever you have a question or elucidating comment

Greg

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us