Decision level fusion from parallel classifier

조회 수: 10 (최근 30일)
VINOTHINI S
VINOTHINI S 2022년 4월 11일
편집: Hari 2023년 10월 11일
I have three sets of features for predicting the same outputs (normal or abnormal). However, rather than training everything at once by concatenating the features, I'd like to train them independently and then fuse the results (level fusion).
How can I perform it in random forest/kNN/any other classification?
Please assist me by providing a brief example or description.
  댓글 수: 3
VINOTHINI S
VINOTHINI S 2022년 12월 7일
Yes. majority voting based decision we can use
MAHMOUD EID
MAHMOUD EID 2022년 12월 12일
please share an example how to fuse the decisions ?

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

채택된 답변

Hari
Hari 2023년 10월 11일
편집: Hari 2023년 10월 11일
Hi Vinothini,
I understand that you have three sets of features for predicting the same outputs and you want to train them independently and then fuse the results using level fusion in a classification algorithm such as random forest or "kNN".
To achieve this, you can use fitcknn” function for “kNN” or “TreeBagger” function for random forest from the Statistics and Machine Learning Toolbox. Depending on your fusion method you can use appropriate MATLAB functions such as “mode” or perform element-wise operations for averaging.
Here's an example using random forest classifiers:
  1. Split your dataset into three subsets, each corresponding to one set of features.
% Split the dataset into subsets based on feature sets
subset1 = yourData(:, featuresSet1);
subset2 = yourData(:, featuresSet2);
subset3 = yourData(:, featuresSet3);
2. Train a separate classifier (e.g., random forest or “kNN”) on each subset of features.
% Train separate random forest classifiers on each subset
rf1 = TreeBagger(numTrees, subset1, labels);
rf2 = TreeBagger(numTrees, subset2, labels);
rf3 = TreeBagger(numTrees, subset3, labels);
3. Obtain predictions from each classifier for new data points.
% Obtain predictions from each classifier
predictions1 = rf1.predict(newData);
predictions2 = rf2.predict(newData);
predictions3 = rf3.predict(newData);
4. Combine the predictions using a fusion method, such as majority voting or weighted averaging, to obtain the final prediction.
% Perform fusion (e.g., majority voting)
finalPrediction = mode([predictions1, predictions2, predictions3], 2);
By following the above steps, you can train separate classifiers on each subset of features and fuse the results using level fusion. Remember to choose an appropriate fusion method based on the nature of your data and the specific classification task.
Refer to the documentation of “TreeBagger” and “classificationkNN” algorithms for more details on training and prediction methods.
Hope this helps!

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by