You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A small addition: would you be interested in adding a function for a vector normalization in [0;1] range? I haven't found a function for this, and it seems a good fit here; I imagine people reimplement it again and again. It's essentialy:
function uninormalize(v)
min = minimum(v)
max = maximum(v)
if (min == max)
fill!(copy(v), 0)
else
(v - min) / (max - min)
end
end
If it's OK I can provide a PR.
The text was updated successfully, but these errors were encountered:
Hello! This seems like an okay idea to me. What's your reasoning for the name uninormalize? Is it a common convention to normalize to 0 if the input has only one unique value?
You can use extrema and tuple assignment to get the min and max at the same time, and zeros(v) in place of fill!(copy(v), 0).
Hi,
A small addition: would you be interested in adding a function for a vector normalization in [0;1] range? I haven't found a function for this, and it seems a good fit here; I imagine people reimplement it again and again. It's essentialy:
If it's OK I can provide a PR.
The text was updated successfully, but these errors were encountered: