필터 지우기
필터 지우기

Cross validation is very slow! How can I improve the performance?

조회 수: 8 (최근 30일)
ben dp
ben dp 2017년 5월 9일
댓글: John D'Errico 2017년 5월 10일
Hello guys,
I'm performing a per pixel supervised multiclass SVM machine learning classification. I would like to do a cross-validation of my model to see its accuracy. This the code I'm using right now. I have four classes and the size of my training data is a matrix of 170000x111.
SVMModel = fitcecoc(trainingData,classes);
cp = cvpartition(classes, 'k', 10);
CVM = crossval(SVMModel, 'CVPartition, cp);
The problem of this is the crossval function. It's taking a loooot of time and I don't know why. Maybe it's because of the size of the training data, or maybe I'm not using it well? I don't know.
Could someone tell if this is normal? If not, how could I improve the performance?
In addition, I would like to generate a confusion matrix of the result, but I didn't found any easy way in the web. Someone knows how to generate a confusion matrix from my crossval results?
Thank in advance for your help and your time!
  댓글 수: 1
John D'Errico
John D'Errico 2017년 5월 10일
CV with a huge dataset is of course going to take a long time. Get a bigger, much faster computer.

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by