Skip to main content

An easy-to-use ML framework

Project description

classicML: 简单易用的经典机器学习框架

build win-build PyPI win-PyPI Documentation Status PyPI PyPI - Python Version

classicML 是一个用 Python 和 C++ 混编的机器学习项目,您既可以使用纯 Python 版本进行学习,也可以使用CC标准版进行实验和探索自定义功能。它既实现了Python的简单易用快速上手,又实现了C++的高效性能。classicML的设计目标是简单易用,快速入门,高扩展性和编程风格简洁。更多信息请访问文档网站

多后端支持

classicML 本身是一个Python项目,但是机器学习中涉及到的复杂的矩阵运算对于Python有点儿捉襟见肘,因此我们提供了使用C++后端的加速版本。为了保证兼容性,classicML默认使用Python后端,现在全部算法支持了使用C++作为后端进行加速,如果您需要使用标准版的classicML,只需在开头使用这条语句切换后端。

import os
os.environ['CLASSICML_ENGINE'] = 'CC'

精度控制

目前,classicML 正在对全部算法支持32位和64位切换精度,使用32位的精度可以获得更快的运行速度和更小固化模型。

import os
os.environ['CLASSICML_PRECISION'] = '32-bit'

第一个机器学习程序

使用线性判别分析进行二分类

  • 下载示例数据集
wget https://github.com/sun1638650145/classicML/blob/master/datasets/西瓜数据集alpha.csv
  • 运行下面的代码
import classicML as cml

DATASET_PATH = '/path/to/西瓜数据集alpha.csv'

# 读取数据
ds = cml.data.Dataset()
ds.from_csv(DATASET_PATH)
# 生成模型
model = cml.models.LDA()
# 训练模型
model.fit(ds.x, ds.y)
# 可视化模型
cml.plots.plot_lda(model, ds.x, ds.y, '密度', '含糖率')

感谢Jetbrains Open Source对项目的支持

v0.9 预览

  • 这个版本将增加cml.models.cluster模块, 并添加几种聚类算法
  • 将在v1.0之前添加100%的类型注释

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

classicML-python-0.9.tar.gz (62.6 kB view details)

Uploaded Source

Built Distribution

classicML_python-0.9-py3-none-any.whl (93.0 kB view details)

Uploaded Python 3

File details

Details for the file classicML-python-0.9.tar.gz.

File metadata

  • Download URL: classicML-python-0.9.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for classicML-python-0.9.tar.gz
Algorithm Hash digest
SHA256 9aa38239bfaa393f21f65fb064c91545546037354dc06b03f37b0a073daf588d
MD5 9939fcac67f41bc71fd876961acfaf4f
BLAKE2b-256 64832ba31e91e6c8035946420783c0025d8dd0aa58b6c2529c8dfef411e58a11

See more details on using hashes here.

File details

Details for the file classicML_python-0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for classicML_python-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 81fcd243fe2faeeba31a3066eff9964b0828387e6038df24cb49b90b75c03f83
MD5 adba0c042cb7f574e916b2d76e3e78bb
BLAKE2b-256 f7dd3c3a46760369397b1474913fab907011f12021ca73a08011430319b326ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page