function [ matrix,attributes,activeAttributes ] = id3_preprocess( )
%% ID3算法数据预处理,把字符串转换为0,1编码
% 输出参数:
% matrix: 转换后的0,1矩阵;
% attributes: 属性和Label;
% activeAttributes : 属性向量,全1;
%% 读取数据
txt = { '序号' '天气' '是否周末' '是否有促销' '销量'
'' '坏' '是' '是' '高'
'' '坏' '是' '是' '高'
'' '坏' '是' '是' '高'
'' '坏' '否' '是' '高'
'' '坏' '是' '是' '高'
'' '坏' '否' '是' '高'
''
函数:id3_process
最新推荐文章于 2021-04-04 20:11:05 发布