Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Label Encoding in R

$
0
0

@hemantsain55 wrote:

Hello,

I have performed label encoding using superml library in R

   library(superml)
   lbl <- LabelEncoder$new()
   train$Country <- lbl$fit_transform(train$Country)

when I applied the same encoder(lbl) to my test data set, it’s not giving the same rank to the country, which has been given to the country in train dataset. Instead its just assigning numbers in an order irrespective of anything

please help me out to fix this.

it would be great be you can share the relevant R code too.

Thanks in Advance

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles