Files
rushter--mlalgorithms/README.md
T
2026-07-13 10:49:35 +00:00

56 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/rushter/MLAlgorithms) · [上游 README](https://github.com/rushter/MLAlgorithms/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
# 机器学习算法
一组简洁、清晰的机器学习算法实现。
### 为什么?
本项目面向希望学习机器学习(ML)算法内部原理或从零实现这些算法的人。
相比优化过的库,这里的代码更易读懂,也更便于动手试验。
所有算法均使用 Python 实现,依赖 numpy、scipy 和 autograd。
### 已实现:
* [深度学习(MLP、CNN、RNN、LSTM](mla/neuralnet)
* [线性回归、逻辑回归](mla/linear_models.py)
* [随机森林(Random Forests](mla/ensemble/random_forest.py)
* [支持向量机(SVM)及核函数(Linear、Poly、RBF](mla/svm)
* [K-Means](mla/kmeans.py)
* [高斯混合模型(Gaussian Mixture Model](mla/gaussian_mixture.py)
* [K 近邻(K-nearest neighbors](mla/knn.py)
* [朴素贝叶斯(Naive Bayes](mla/naive_bayes.py)
* [主成分分析(PCA](mla/pca.py)
* [因子分解机(Factorization machines](mla/fm.py)
* [受限玻尔兹曼机(RBM](mla/rbm.py)
* [t 分布随机邻域嵌入(t-SNE](mla/tsne.py)
* [梯度提升树(亦称 GBDT、GBRT、GBM、XGBoost](mla/ensemble/gbm.py)
* [强化学习(Deep Q learning](mla/rl)
### 安装
```sh
git clone https://github.com/rushter/MLAlgorithms
cd MLAlgorithms
pip install scipy numpy
python setup.py develop
```
### 如何在不安装的情况下运行示例
```sh
cd MLAlgorithms
python -m examples.linear_models
```
### 如何在 Docker 中运行示例
```sh
cd MLAlgorithms
docker build -t mlalgorithms .
docker run --rm -it mlalgorithms bash
python -m examples.linear_models
```
### 贡献
欢迎贡献!
欢迎改进现有代码与文档,或实现新算法。
若改动较大,请先开 issue 说明你的方案。