Create a function removeInsignificant(), which takes a dataset X and labels Y, p-value significance level (for example, p=0.1, p=0.05) and uses ANOVA or t-test to detect statistically insignificant features (regarding difference between records belon

2 views (last 30 days)
function [X_take] = removeInsignificant(X, Y, p)
for i = 1:16
disp(i)
p2 = anova1(X(:,i),Y(:,1),'off');
disp(p2)
end
r = p2 >= p;
disp(r)
X_take = ones(size(X,2),1);
end

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!