{"id":21140737,"url":"https://github.com/zziz/cart","last_synced_at":"2025-07-09T04:31:38.485Z","repository":{"id":128812942,"uuid":"145710537","full_name":"zziz/cart","owner":"zziz","description":"Classification and Regression Trees (CART) in python from scratch.","archived":false,"fork":false,"pushed_at":"2018-08-23T11:36:47.000Z","size":7,"stargazers_count":22,"open_issues_count":1,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T17:21:49.614Z","etag":null,"topics":["artificial-intelligence","classification","machine-learning","python3","regression","tree"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/zziz.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}},"created_at":"2018-08-22T13:08:12.000Z","updated_at":"2025-03-12T09:57:10.000Z","dependencies_parsed_at":"2023-08-25T15:20:09.973Z","dependency_job_id":null,"html_url":"https://github.com/zziz/cart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zziz/cart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zziz%2Fcart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zziz%2Fcart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zziz%2Fcart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zziz%2Fcart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zziz","download_url":"https://codeload.github.com/zziz/cart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zziz%2Fcart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264393524,"owners_count":23601113,"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":["artificial-intelligence","classification","machine-learning","python3","regression","tree"],"created_at":"2024-11-20T07:17:35.687Z","updated_at":"2025-07-09T04:31:38.246Z","avatar_url":"https://github.com/zziz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cart\nClassification and Regression Trees (CART) in python from scratch.   \nYields same result as scikit-learn CART.   \n```\nClassification Tree\n if X[2] \u003c= 2.45\n    then {value: 0, samples: 35}\n    else if X[2] \u003c= 4.75\n        then if X[3] \u003c= 1.65\n            then {value: 1, samples: 34}\n            else {value: 2, samples: 1}\n        else if X[2] \u003c= 5.15\n            then {value: 2, samples: 16}\n            else {value: 2, samples: 26}\nThis Classification Tree Prediction Accuracy:    0.9736842105263158\nSklearn Library Tree Prediction Accuracy:        0.9736842105263158\n\n\nRegression Tree\n if X[0] \u003c= 3.13275045531\n    then if X[0] \u003c= 0.513901088514\n        then {value: 0.0523606779563, samples: 11}\n        else {value: 0.713825681714, samples: 40}\n    else if X[0] \u003c= 3.85022857897\n        then {value: -0.451902639773, samples: 14}\n        else {value: -0.868642556986, samples: 15}\nThis Regression Tree Prediction:            [-0.86864256]\nSklearn Library Regression Tree Prediction: [-0.86864256]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzziz%2Fcart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzziz%2Fcart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzziz%2Fcart/lists"}