How can I run ten times with randomized data by using imageDatastore ? And how to do cross-validation by imageDatastore?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, to test my project I split my data into data of train and data test... this is the code
[ImagesTrain,ImagesTest] = SplitData(ratio_App)
this is the code of function SplitData:
function [dataTrain,dataTest] = SplitData(ratio_App)
unzip(fullfile(matlabroot,'bin','ALLData.zip'));
data = imageDatastore('ALLData',... 'IncludeSubfolders',true,... 'LabelSource','foldernames');
[dataTrain,dataTest] = splitEachLabel(data,ratio_App); dataTrain = shuffle(dataTrain); end
I obtained the accuracy of my project 94% but when I want to validate it, I try to run my project 10 times by randomized data so I changed the function splitData like that:
function [dataTrain,dataTest] = SplitData(ratio_App)
unzip(fullfile(matlabroot,'bin','ALLData.zip'));
data = imageDatastore('ALLData',... 'IncludeSubfolders',true,... 'LabelSource','foldernames');
[dataTrain,dataTest] = splitEachLabel(data,ratio_App,,'randomized'); dataTrain = shuffle(dataTrain); end
But by this function, I obtained accuracy in each run around 99% and 98% I don't understand why the results are not interpretable Could someone help me or show me where is the problem exactly??
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!