powered by
Helper function to reverse minmax scaling applied in the pre-processing step.
undo_minmax(s, s_min, s_max)
Vector re-scaled using original parameters s_min and s_max
s_min
s_max
A numeric vector or column, scaled between 0 and 1.
A numeric value, the minimum of the unscaled vector
A numeric value, the maximum of the unscaled vector
ex_num <- runif(100,1,10) scaled <- col_minmax(ex_num) undo_scale <- undo_minmax(scaled, s_min = min(ex_num), s_max = max(ex_num)) # Prove two are identical all.equal(ex_num, undo_scale)
Run the code above in your browser using DataLab