KDD data set normalization
显示 更早的评论
pls i need you guys help on how to normalize the KDD cup data set, or is some thing wrong with the code i have below.
% read excel file file from computer directory.
INPUT_P= xlsread('C:\Users\5GPROGRAMER\Desktop\WORKING DIRECTORY\PROJECT WORKING DIRECTORY\TRAINING DATA\TRAIN DATA1.xlsx');
TARGET_T= xlsread('C:\Users\5GPROGRAMER\Desktop\WORKING DIRECTORY\PROJECT WORKING DIRECTORY\TRAINING DATA\OUTPUT BINARY CODE2.xlsx');
TEST_DATA= xlsread('C:\Users\5GPROGRAMER\Desktop\WORKING DIRECTORY\PROJECT WORKING DIRECTORY\TRAINING DATA\sample test.xlsx');
% convert excel file to matrix ivp and ivt
ivp=INPUT_P';
ivt=TARGET_T';
testinputs=TEST_DATA';
% start data set normalization
[pn,minp,maxp,tn,mint,maxt]=premnmx(ivp,ivt);
% creat neural network
net=newff(minmax(pn),[5 5],{'tansig','purelin'},'trainrp')
采纳的回答
更多回答(1 个)
Greg Heath
2013-7-8
0 个投票
Read the documentation on premnmx. Not only is it obsolete, it has a bug. Use mapminmax instead
help premnmx
doc premnmx
help mapminmax
doc mapminmax
Hope this helps.
Greg
PS. Always read the documentation if you have traced a problem to a particular function. If push comes to shove, you can always read the source code using the command type.
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!