-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess_eval_data.m
More file actions
35 lines (28 loc) · 1.07 KB
/
process_eval_data.m
File metadata and controls
35 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% ???????? ???????
data = readtable('evaluation_diabetes.csv');
% ????? ????? ??? ??? ?? ??????? ???? ?????
disp('Original Data:');
disp(head(data));
% ??? ???????? ????????
data.id = [];
data.name = [];
% ????? ? ????? ???????? ???? (????) ?? ??? ? ??
% ????? ???? 'history_of_diabetes' ?? true/false ?? 0/1
if iscell(data.history_of_diabetes)
data.history_of_diabetes = double(strcmp(data.history_of_diabetes, 'True')); % 'true' ?? 1 ? 'false' ?? 0 ????? ??????
else
data.history_of_diabetes = double(strcmp(string(data.history_of_diabetes), 'True')); % ?? ???? ??? ???? ????
end
% ????? ???? 'has_diabetes' ?? ???? ?????
if iscell(data.has_diabetes)
data.has_diabetes = double(strcmp(data.has_diabetes, 'True'));
else
data.has_diabetes = double(strcmp(string(data.has_diabetes), 'True'));
end
% ????? ???? ????? ???
data.status_weight = grp2idx(data.status_weight);
% ????? ???????? ?????????? ???
disp('Preprocessed Data:');
disp(head(data));
% ????? ???????? ?????????? ??? ?? ???? ????
writetable(data, 'processed_eval_data.csv');