Skip to content

Instantly share code, notes, and snippets.

@JasonThomasData
Created August 4, 2020 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JasonThomasData/3c605ff0b6a4dfb92e205bca17de59fb to your computer and use it in GitHub Desktop.
Save JasonThomasData/3c605ff0b6a4dfb92e205bca17de59fb to your computer and use it in GitHub Desktop.
Functions I will need in R
standardNegationInRange = function(selection) {
#x_{n}=x_{max}-x_{n}+x_{min}
return (max(selection) - selection + min(selection))
}
featureScale = function(selection) {
#x_{n}=\frac{x_{n}\text{−}x_{min}}{x_{max}\text{−}x_{min}}
return ((selection - min(selection))/(max(selection) - min(selection)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment