Categorical features with Linear Regression
4 次查看(过去 30 天)
显示 更早的评论
Hi,
While training a dataset from kaggle i realized that i can also use categorical features for my linear regression model. Then i tried fitrlinear() function to use regularization but it didn't work because of the categorical features. This made me think that i can add categorical features with normal linear regression but the algorithm doesn't use them, just goes with numerical ones, and it sorta makes sense because there isn't any leastsquare equation for categorical values yet when i omit categorical values for my linear regression model i saw that it makes a lot of difference.
How does linear regression uses categorical variables and can i use regularization with a table that has categorical features ?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!