本文为您介绍如何对原始数据进行数据预处理,得到模型训练集和模型预测集。
完成数据准备,详情请参见准备数据。
select age,
(case sex when 'male' then 1 else 0 end) as sex,
(case cp when 'angina' then 0 when 'notang' then 1 else 2 end) as cp,
trestbps,
chol,
(case fbs when 'true' then 1 else 0 end) as fbs,
(case restecg when 'norm' then 0 when 'abn' then 1 else 2 end) as restecg,
thalach,
(case exang when 'true' then 1 else 0 end) as exang,
oldpeak,
(case slop when 'up' then 0 when 'flat' then 1 else 2 end) as slop,
ca,
(case thal when 'norm' then 0 when 'fix' then 1 else 2 end) as thal,
(case status when 'sick' then 1 else 0 end) as ifHealth
from ${t1};
拆分组件默认将原始数据按4:1拆分为模型训练集和模型预测集。您也可以单击拆分组件,在右侧参数设置页签,设置切分比例。
完成数据预处理后,需要进行数据可视化,详情请参见数据可视化。
在文档使用中是否遇到以下问题
更多建议
匿名提交