normalization - DeNormalizing Value Based on Data Set VB.NET -


say used following normalize data set [1, -1]:

public function normalizedata(values double()) double()     dim min = values.min     dim max = values.max     return values.select(function(val) 2 * (val - min) / (max - min) - 1).toarray end function 

how go de-normalizing value based on data set:

public function denormalizedata(basedata double(), value double) double         dim min = basedata.min         dim max = basedata.max         return '?? end function 

find inverse of function: dn=denormalized, n=normalized

n= 2*((dn-min)/(max-min)) - 1 adding 1 both sides

n+1=2*((dn-min)/(max-min)) divide 2

(n+1)/2=(dn-min)/(max-min) multiply (max-min)

((max-min)*(n+1))/2 = dn - min add min both

dn =(((max-min)*(n+1))/2)+min

you have function de-normalizing, can see need save max , min values.

public function denormalize(n double, min double, max double) double      return (((max-min)*(n+1))/2)+min end function 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -