{"id":15573041,"url":"https://github.com/sun1638650145/classicml","last_synced_at":"2025-04-24T02:21:14.944Z","repository":{"id":45721374,"uuid":"262776803","full_name":"sun1638650145/classicML","owner":"sun1638650145","description":"简单易用的经典机器学习框架","archived":false,"fork":false,"pushed_at":"2023-07-18T07:05:19.000Z","size":755,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T09:34:33.911Z","etag":null,"topics":["adaboost","bagging","cluster","cpp17","decision-tree","eigen","ensemble-learning","framework","linear-discriminant-analysis","logistic-regression","machine-learning","naive-bayes-classifier","neural-network","pybind11","python","support-vector-machine"],"latest_commit_sha":null,"homepage":"https://classicml.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sun1638650145.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2020-05-10T11:57:10.000Z","updated_at":"2022-07-21T02:55:44.000Z","dependencies_parsed_at":"2025-04-17T21:07:03.476Z","dependency_job_id":"d7644dc1-90d7-4c14-ab84-2ffe084be8ff","html_url":"https://github.com/sun1638650145/classicML","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1638650145%2FclassicML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1638650145%2FclassicML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1638650145%2FclassicML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1638650145%2FclassicML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sun1638650145","download_url":"https://codeload.github.com/sun1638650145/classicML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546363,"owners_count":21448313,"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":["adaboost","bagging","cluster","cpp17","decision-tree","eigen","ensemble-learning","framework","linear-discriminant-analysis","logistic-regression","machine-learning","naive-bayes-classifier","neural-network","pybind11","python","support-vector-machine"],"created_at":"2024-10-02T18:10:15.318Z","updated_at":"2025-04-24T02:21:14.925Z","avatar_url":"https://github.com/sun1638650145.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# classicML: 简单易用的经典机器学习框架\n\n![build](https://github.com/sun1638650145/classicML/actions/workflows/build.yml/badge.svg) ![win-build](https://github.com/sun1638650145/classicML/actions/workflows/win-build.yml/badge.svg) ![PyPI](https://github.com/sun1638650145/classicML/actions/workflows/pypi.yml/badge.svg) ![win-PyPI](https://github.com/sun1638650145/classicML/actions/workflows/win-pypi.yml/badge.svg) [![Documentation Status](https://readthedocs.org/projects/classicml/badge/?version=latest)](https://classicml.readthedocs.io/zh_CN/latest/?badge=latest) [![PyPI](https://img.shields.io/pypi/v/classicML?color=blue)](https://pypi.org/project/classicML/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/classicML)](https://pypi.org/project/classicML/)\n\nclassicML 是一个用 Python 和 C++ 混编的机器学习项目，您既可以使用纯 Python 版本进行学习，也可以使用CC标准版进行实验和探索自定义功能。它既实现了Python的简单易用快速上手，又实现了C++的高效性能。classicML的设计目标是简单易用，快速入门，高扩展性和编程风格简洁。更多信息请访问[文档网站](https://classicml.readthedocs.io/)。\n\n## 多后端支持\n\nclassicML 本身是一个Python项目，但是机器学习中涉及到的复杂的矩阵运算对于Python有点儿捉襟见肘，因此我们提供了使用C++后端的加速版本。为了保证兼容性，classicML默认使用Python后端，现在全部算法支持了使用C++作为后端进行加速，如果您需要使用标准版的classicML，只需在开头使用这条语句切换后端。\n\n```python\nimport os\nos.environ['CLASSICML_ENGINE'] = 'CC'\n```\n\n## 精度控制\n\n目前，classicML 正在对全部算法支持32位和64位切换精度，使用32位的精度可以获得更快的运行速度和更小固化模型。\n\n```python\nimport os\nos.environ['CLASSICML_PRECISION'] = '32-bit'\n```\n\n## 第一个机器学习程序\n\n使用线性判别分析进行二分类\n\n* 下载示例数据集\n\n```shell\nwget https://github.com/sun1638650145/classicML/blob/master/datasets/西瓜数据集alpha.csv\n```\n\n* 运行下面的代码\n\n```python\nimport classicML as cml\n\nDATASET_PATH = '/path/to/西瓜数据集alpha.csv'\n\n# 读取数据\nds = cml.data.Dataset()\nds.from_csv(DATASET_PATH)\n# 生成模型\nmodel = cml.models.LDA()\n# 训练模型\nmodel.fit(ds.x, ds.y)\n# 可视化模型\ncml.plots.plot_lda(model, ds.x, ds.y, '密度', '含糖率')\n```\n\n* [更多示例代码点击](https://github.com/sun1638650145/classicML/tree/master/examples)\n\n## 感谢[Jetbrains Open Source](https://www.jetbrains.com/community/opensource/#support)对项目的支持\n\n\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/CLion.svg\" width=\"150\"/\u003e\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/CLion_icon.svg\" width=\"80\"/\u003e \u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/PyCharm.svg\" width=\"210\"/\u003e\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/PyCharm_icon.svg\" width=\"80\"/\u003e\n\n## v0.9.x 预览\n\n* `v0.9` 正式版已经发布!\n* 这个版本将增加`cml.models.cluster`模块, 并添加几种聚类算法\n* 将在`v1.0`之前添加100%的类型注释\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun1638650145%2Fclassicml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsun1638650145%2Fclassicml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun1638650145%2Fclassicml/lists"}