Created
May 16, 2018 15:21
-
-
Save kaysush/fed0a1eb20e9e7d857633912b13928b0 to your computer and use it in GitHub Desktop.
One-Hot-Encoding Categorical Variables
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 genderIndexer = new StringIndexer().setInputCol("Gender").setOutputCol("GenderIndex") | |
val genderOneHotEncoder = new OneHotEncoder().setInputCol("GenderIndex").setOutputCol("GenderOHE") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment