In Titanic dataset, i have a dataset containing Categorical features (such as Cabin , Embark and Sex ).
(在Titanic数据集中,我有一个包含分类特征(例如Cabin , Embark和Sex )的数据集。)
I need to build a linear or polynomial model with multiple variables to predict Survive
.
(我需要建立具有多个变量的线性或多项式模型来预测Survive
。)
I wish to consider Categorical features as well. (我也希望考虑分类功能。)
Let's say, i can replace all categorical values with a respected numerical value. (假设我可以用受尊重的数值替换所有分类值。)
For example about Sex
column, I can replace: 1
with male
and 2
with female
(例如,关于“ Sex
列,我可以替换为: 1
male
, 2
female
)
My question is:
(我的问题是:)
Is it useful to consider a categorical features into a polynomial
or linear model
?
(将分类特征考虑到polynomial
或linear model
是否有用?)
ask by Jeff translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…