Feature Selection using Correlation-based method

30 次查看(过去 30 天)
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 个评论
Nina Perf
Nina Perf 2022-1-3
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?
yanqi liu
yanqi liu 2022-1-4
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 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by