Feature Selection using Correlation-based method

Hi,
I want to use the Correlation-based Feature Selection to perform feature selection.
index = corrSel(X,Y)
[s,idx]= sort(mdl.FeatureWeights,'descend');
Do you know of any other functions in Matlab that do this?
Thanks!

 채택된 답변

yanqi liu
yanqi liu 2021년 12월 30일
yes,sir,may be use the index to select feature,and then retrain model,such as
index=corrSel(feature,class)
selected_features=feature(:,index)
mdl=train(selected_features,labels(index))

댓글 수: 2

Thank you for the feedback!
Can you please help me with an example on "how to plot the top 5 features" using the corrSel method?
yes,sir,use top 5 features,may be set
index=corrSel(feature,class)
index=index(1:5)
selected_features=feature(:,index)
mdl=train(selected_features,labels(index))

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

추가 답변 (0개)

카테고리

제품

릴리스

R2021a

질문:

2021년 12월 9일

편집:

2022년 3월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by