can reliefF() function deal with NaNs in my matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I have an (n*m double) matrix, where n (rows) is the number of my samples and m (columns) is the number of my features, which are all discrete (i.e. categorical). The mth column in the data represents my binary outcome. I have tried using relieff() function to return the importance of my predictor features based on my outcome feature.
This is what my data looks like (let's say for simplicity's sake: I have 4 predictor and 1 outcome feature for 3 samples):
matrixdata = [1, 2, 3, NaN, 2; 5, 1, NaN, 2, 1; NaN, 3, NaN, 2, 1];
This is how I call the relieff() on my data:
X = matrixdata(:,1:(end-1));
Ylogical = matrixdata(:,end)== 1;
[ranked,weights] = relieff(X,Ylogical,10, 'categoricalx', 'on');
In this case, does relieff() disregard the NaNs in the data or does it treat NaNs as a separate category of that predictor feature column? Obviously, the former is what I would prefer.
Many thanks, Berkan
0 件のコメント
採用された回答
Wayne King
2012 年 3 月 4 日
Hi Berkan, relieff() removes NaNs in both your predictor and response variables. So your preference is the way it is implemented.
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!