2 years ago

#44026

test-img

DavidK

What is the categorical feature in the lightgbm?

Recently, I am studying the LightGBM, and found that we should determine which features are the categorical features?

I know that for character class, they should belong to the categorical features, but if the feature is 'integer', does it belong to 'categorical feature'?

library(data.table)
dt <- data.table(a = c(1L, 5L, 2L, 7L, 9L), 
                 b = c("A", "B", "D", "A", "C"),
                 c = c(2.1, 1.3, 1.5, 2.5, 6.7))
dt

sapply(dt, class)

          a           b           c 
  "integer" "character"   "numeric" 

We can see that b should be 'categorical feature', how about a?

Also if the the feature belongs to factor class, is it a categorical features?

In general, given the large dataset, what is the best way to identify all the categorical features used for LightGBM?

Thanks!

r

lightgbm

0 Answers

Your Answer

Accepted video resources