# mLearn **Repository Path**: TomCoCo/mLearn ## Basic Information - **Project Name**: mLearn - **Description**: 西瓜书的学习代码仓库 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-08-25 - **Last Updated**: 2023-08-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1.Data模块为数据模块,按需引入 2.DecisionTreeAbstract类为抽象决策树算法,决策树的抽象类,只需要重写方法def getBestIndex(self,data,attributesAndIndex): 即可指定决策树使用的算法 其中attributesAndIndex,即列属性和下标的关系[{'色泽':0},{'根蒂':1}] 目前实现类有 DecisionTreeCart,DecisionTreeID3,DecisionTreeC45 程序入口 DecisionTreeAbstract = DecisionTreeAbstract(D,A) DecisionTreeAbstract.draw() 3.如需单文件的代码示例,DecisionTreeCartSingle可以展示 4.其中 DecisionTreeCart,DecisionTreeID3,DecisionTreeC45 3个模块可以直接运行