l-magnificence / Mime

Machine learning-based integration model with elegant performance
Other
72 stars 14 forks source link

Is categorical variables available? #28

Closed doclihan closed 2 months ago

doclihan commented 2 months ago

Thanks for you contribution! I have trouble with the type of input data. I specially changed the data type from ”double“ to '”factor“, and Mime could work normally. However, when I further ranked the importance of variables, all continuous variables were more important than categorical variables, which was obviously wrong with clinical practice and previous logistic analysis. Then we carefully analyze your code and find that when building the model, the Mime package automatically converts the factorl variable into a numerical form. Hence, how should I correctly use both categorical variables and continuous variables to build the model ?

l-magnificence commented 2 months ago

Currently, Mime only support numerical matrices data. Thank you.

doclihan commented 2 months ago

What happens after I code a categorical variable?

l-magnificence commented 2 months ago

I haven't tried. If your categorical variables are grade factors, maybe you can change them to numerical variables, such as 0,1,2,3 to run.

doclihan commented 2 months ago

Thank you, I'll try it.