Created
February 29, 2020 06:36
-
-
Save amkurian/1b981f203757e5519964b74e05d51f76 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Encoding categorical data | |
dataset$Country = factor(dataset$Country, | |
levels = c('France', 'Spain', 'Germany'), | |
labels = c(1, 2, 3)) | |
dataset$Purchased = factor(dataset$Purchased, | |
levels = c('No', 'Yes'), | |
labels = c(0, 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment