Categorical features with Linear Regression

조회 수: 3 (최근 30일)
Gorkem Akgul
Gorkem Akgul 2021년 4월 25일
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개)

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by