How can I predict label of train images by a classifier which was trained using treebagger?

1 次查看(过去 30 天)
Dear All,
I have ten 3D images as train data and one image as test data. It is a classification problem. After creating feature matrix using 10 train images, I trained classifier as follow:
B = TreeBagger(Num_Tree , Feature_A_Norm , Label_A , ...
'Method' , 'classification' , 'OOBPredictorImportance' , ...
'on' , 'MinLeafSize' , Leaf_Size , 'Prior' , 'Uniform' , ...
'MaxNumSplits' , Tree_Depth);
where 'Feature_A_Norm' and 'Label_A' are feature matrix and label of train images, respectively.
Now I need to predict not only label of test image but also train images.
For Test image I used:
[~ , score_Target] = predict(B , Feature_Target_Norm);
where 'Feature_Target_Norm' is feature matrix of test image.
But I am not sure for train images should I use 'predict' function or 'oobPredict' function?I would be really appreciated if you could help me.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by