Number of Instances reduces after normalizing data set in csv file ?

1 次查看(过去 30 天)
Hello, I have normalized my data set using
Data = rand(10, 20); % Test data, use your data instead
minData = min(Data(:));
maxData = max(Data(:));
scaled = (Data - minData) / (maxData - minData); % Scaled to [0, 1]
scaled = scaled * 2 - 1; % Scaled to [-1, 1]
to train my machine,now in my data set number of rows(instances) is reduced, before normalizing it was 88 after normalizing it is reduced to 10. I want to know it is normal or there is some fault.Please help.
  1 个评论
Jan
Jan 2017-5-4
编辑:Jan 2017-5-4
I have formatted the code using the "{} Code" button. Please do this by your own in the future. Thanks.
The shown code does not change the size of the array. If the size of your array is changed, you run another code. If we do not see this other code, we cannot guess the reason for its behavior. I would boldly guess, that changing the size is a fault, but you are the one, who should know this exactly. Does Matlab do exactly what you need and expect?
Please post the code you use and which produces the problem, not any other code. Omit details, which do not concern the problem: it does not matter, if the data are coming from a CSV file.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by