Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
c++ code for binning in data mining.
Posted
Updated 3-Aug-11 4:25am
v2
Comments
[no name] 3-Aug-11 10:25am    
Is that a question?
Herman<T>.Instance 3-Aug-11 10:29am    
what have you tried?
Sergey Alexandrovich Kryukov 3-Aug-11 14:25pm    
So, C or C++? Use "Improve question", make a title sensible.
--SA

C++
Bin= (NumBins * (X - Xmin)) / (Xmax - Xmin);
if (Bin < 0) Bin= 0; else if (Bin >= NumBins) Bin= NumBins - 1;
 
Share this answer
 
v3
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900