{"id":20295114,"url":"https://github.com/agnjason/decision-tree","last_synced_at":"2026-05-09T11:44:27.380Z","repository":{"id":211544985,"uuid":"236892803","full_name":"agnJason/Decision-tree","owner":"agnJason","description":"实现ID3算法、随机森林算法和XGBoost算法","archived":false,"fork":false,"pushed_at":"2020-01-29T03:08:46.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T09:41:49.035Z","etag":null,"topics":["decision-trees","python","xgboost"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agnJason.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-29T03:07:44.000Z","updated_at":"2024-01-02T06:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"d23bb13b-c4e3-45a2-97b5-4c77a28dc122","html_url":"https://github.com/agnJason/Decision-tree","commit_stats":null,"previous_names":["agnjason/decision-tree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnJason%2FDecision-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnJason%2FDecision-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnJason%2FDecision-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnJason%2FDecision-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agnJason","download_url":"https://codeload.github.com/agnJason/Decision-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241790155,"owners_count":20020615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decision-trees","python","xgboost"],"created_at":"2024-11-14T15:33:13.343Z","updated_at":"2026-05-09T11:44:27.331Z","avatar_url":"https://github.com/agnJason.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Decision-tree\n实现ID3算法、随机森林算法和XGBoost算法\n一、简介\n决策树（decision tree）是一个树结构（可以是二叉树或非二叉树）。其每个非叶节点表示一个特征属性上的测试，每个分支代表这个特征属性在某个值域上的输出，而每个叶节点存放一个类别。使用决策树进行决策的过程就是从根节点开始，测试待分类项中相应的特征属性，并按照其值选择输出分支，直到到达叶子节点，将叶子节点存放的类别作为决策结果。\n构造决策树的关键步骤是分裂属性。所谓分裂属性就是在某个节点处按照某一特征属性的不同划分构造不同的分支，其目标是让各个分裂子集尽可能地“纯”。尽可能“纯”就是尽量让一个分裂子集中待分类项属于同一类别。分裂属性分为三种不同的情况：\n      1、属性是离散值且不要求生成二叉决策树。此时用属性的每一个划分作为一个分支。\n      2、属性是离散值且要求生成二叉决策树。此时使用属性划分的一个子集进行测试，按照“属于此子集”和“不属于此子集”分成两个分支。\n      3、属性是连续值。此时确定一个值作为分裂点split_point，按照\u003esplit_point和\u003c=split_point生成两个分支。\n构造决策树的关键性内容是进行属性选择度量，属性选择度量是一种选择分裂准则，是将给定的类标记的训练集合的数据划分D“最好”地分成个体类的启发式方法，它决定了拓扑结构及分裂点split_point的选择。\n      属性选择度量算法有很多，一般使用自顶向下递归分治法，并采用不回溯的贪心策略。\n二、数据与问题\n利用给定数据或者在网上下载的数据，实现ID3算法、随机森林算法和XGBoost算法，比较三种种算法的性能和分类精度。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagnjason%2Fdecision-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagnjason%2Fdecision-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagnjason%2Fdecision-tree/lists"}