Created
May 16, 2018 15:25
-
-
Save kaysush/b52d33752b2bfc19bb01e3bac9fde95b to your computer and use it in GitHub Desktop.
Vector Assembler and Feature Scaling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val features = Array("GenderOHE", "Age", "EstimatedSalary") | |
val dependetVariable = "Purchased" | |
val vectorAssembler = new VectorAssembler().setInputCols(features).setOutputCol("features") | |
val scaler = new StandardScaler().setInputCol("features").setOutputCol("scaledFeatures") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment