how do i divide my data into testing and training set??whats the easiest way to check whether a sample belongs to a particular class or set??? i have my data saved in excel....

 채택된 답변

Junaid
Junaid 2012년 4월 23일

1 개 추천

it totally depends on type of dataset. One of the famous technique is Cross validation. Look at this picture for quick idea.
or simply divide 60% dataset for training and 40% for testing. or make it iterative as it is done in cross validation.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2012년 4월 23일

0 개 추천

You should divide randomly.
If there was some feature that could be checked that divided the test and training classes, then you would not have done a good job of selecting the training class. The training class should be representative of all of the data.

댓글 수: 1

chinnurocks
chinnurocks 2016년 8월 22일
Hey... I have 100 subject database out of which 50 are male and 50 are female. Each subject has 6 images. I just took 1 image per subject i.e 100 images. I just extracted 100 feature vectors and able to cross validate the data. But, I want to utilise all the images of a subject.
So, if I take 6 images of a subject. I would get 600 images and I can cross validate. But, it would not give a correct result as it would divide images from the same subject into testing and training at a time.
So, what I was thinking is that 6 feature vectors which i obtain from a subject should go to either testing or training data. But, I am unable to implement it. How to fix it ? Need your help.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2012년 4월 23일

댓글:

2016년 8월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by