What is difference between training set and test set database?
조회 수: 4 (최근 30일)
이전 댓글 표시
I have collection of database having images with 25 categories like mountains,rivers,fields,chaparal ,etc .Each category have 40 images.Now I dont know how to divide the dataset into training and test set.In my project a query image from query folder is fired and from the dataset the similar images will be given as output.
Pls suggest how to divide the dataset in good ratio.
댓글 수: 0
답변 (1개)
Walter Roberson
2015년 5월 20일
댓글 수: 2
Walter Roberson
2015년 5월 20일
Suppose that you read the images into I{K} for the K'th image, so I is a cell array of data arrays. And suppose that all of the images are exactly the same size. Then
T = cellfun(@(img) img(:), I); %make columns from each image
T2 = horzcat(T{:}); %splice the columns together
YourData = T2.'; %so each image is now a row vector
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!