Min-Max Normalization


/ Published in: C#
Save to your folder(s)

simple code for doing min-max normalization for decimal values


Copy this code and paste it in your HTML
  1. public double minmax(double x, double max, double min, double new_max, double new_min)
  2. {
  3.  
  4. x = (x - min) * (new_max - new_min) / (max - min) + new_min;
  5. return x;
  6.  
  7.  
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.