How to train the classifier (using features extracted from images)?

조회 수: 4 (최근 30일)
revathi t
revathi t 2015년 10월 12일
댓글: Image Analyst 2015년 10월 14일
I would like to train the Random forest classifier( which has 2 classes- pathology class(Tp) and non pathology class(Tn)). I have separate images to train & test the classifier. For feature extraction I should use HOG, GLCM, GLRLM. How do I train & test the classifier Using these extracted features?? I don't have any .mat file to train the classifier, I see most of the code uses mat file to train the classifier. So I don't have any idea to proceed this. Please help me with this.

채택된 답변

Image Analyst
Image Analyst 2015년 10월 12일
Use the fitctree fucntion to create a classification tree based on the training data:
tModel = fitctree(xTrain, yTrain);
See what you can do with tModel by looking at its methods:
methods(tModel)
The resulting tree can be visualized with the view() function:
view(tModel, 'mode', 'graph');
New observations can be classified using the predict() function:
yPredicted = predict(tModel, newX);
The TreeBagger() function uses bootstrap aggregation ("bagging") to create an ensemble of classification trees.
tModel = TreeBagger(50, xTrain, yTrain); % Create new model based on 50 trees.
This is a more robust model.
  댓글 수: 2
revathi t
revathi t 2015년 10월 14일
Sir Could you explain me, what is xTrain & yTrain? (I have written the extracted features in train.xls)
Image Analyst
Image Analyst 2015년 10월 14일
Those would be the values of HOG, GLCM, and GLRLM that you measured.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Classification Ensembles에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by