推荐|TensorFlow/PyTorch/Sklearn实现的五十种机器学习模型

2017 年 7 月 14 日 全球人工智能

欢迎加入全球最大AI社群>>

一、机器学习

线性模型

  • TensorFlow   |   线性回归 

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/linear_model/linear_regr.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/linear_model/linear_regr_test.py

  • TensorFlow   |   逻辑回归     

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/linear_model/logistic.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/linear_model/logistic_test.py

  • Java   |   逻辑回归     

    模型:https://github.com/zhedongzheng/finch/blob/master/java-models/LogisticRegression.java

    测试:https://github.com/zhedongzheng/finch/blob/master/java-models/LogisticRegressionTest.java

支持向量机

  • TensorFlow   |   线性 支持向量机 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/svm/svm_linear_clf.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/svm/svm_linear_clf_test.py

  • Java   |   线性 支持向量机 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/java-models/LinearSVM.java

    测试:https://github.com/zhedongzheng/finch/blob/master/java-models/LinearSVMTest.java

  • Libsvm   |   非线性 支持向量机 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/classic-models/libsvm_clf.py

    测试:https://github.com/zhedongzheng/finch/blob/master/classic-models/libsvm_clf_test.py

集成

  • NumPy   |   Bagging 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/classic-models/bagging_clf.py

    测试:https://github.com/zhedongzheng/finch/blob/master/classic-models/bagging_clf_test.py

  • NumPy   |   Adaboost 分类器

    伪代码:https://github.com/zhedongzheng/finch/blob/master/classic-models/adaboost_clf.md

    模型:https://github.com/zhedongzheng/finch/blob/master/classic-models/adaboost_clf.py

    测试:https://github.com/zhedongzheng/finch/blob/master/classic-models/adaboost_clf_test.py

  • NumPy   |   随机森林 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/classic-models/random_forest_clf.py

    测试:https://github.com/zhedongzheng/finch/blob/master/classic-models/random_forest_clf_test.py

分解

  • TensorFlow   |   非负矩阵分解

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/decomposition/nmf.py

    MovieLens数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/decomposition/nmf_movielens_test.py

二、深度学习

多层感知

  • TensorFlow   |   多层感知 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/mlp/mlp_clf.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/mlp/mlp_clf_mnist_test.py

    CIFAR10数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/mlp/mlp_clf_cifar10_test.py

  • PyTorch   |   多层感知 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/mlp/mlp_clf.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/mlp/mlp_clf_mnist_test.py

    CIFAR10数据集测试:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/mlp/mlp_clf_cifar10_test.py

卷积网络

  • TensorFlow   |   二维卷积 分类器

    模型 :https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/cnn/conv_2d_clf.py

    MNIST数据集测试 :https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/cnn/conv_2d_clf_mnist_test.py

    CIFAR10数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/cnn/conv_2d_clf_cifar10_keras_idg_test.py

  • PyTorch   |   二维卷积 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/cnn/cnn_clf.py

    MNIST数据集测试 :https://github.com/zhedongzheng/finch/blob/master/pytorch-models/cnn/cnn_clf_mnist_test.py

    CIFAR10数据集测试 :https://github.com/zhedongzheng/finch/blob/master/pytorch-models/cnn/cnn_clf_cifar10_test.py

循环网络

  • TensorFlow   |   LSTM 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/rnn/rnn_clf.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/rnn/rnn_clf_mnist_test.py

    CIFAR10数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/rnn/rnn_clf_mnist_test.py

  • TensorFlow   |   LSTM 回归器

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/rnn/rnn_regr.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/rnn/rnn_regr_plot.py

    预览:https://github.com/zhedongzheng/finch/blob/master/assets/rnn_regr_plot.gif

  • PyTorch   |   LSTM 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/rnn/rnn_clf.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/rnn/rnn_clf_mnist_test.py

    CIFAR10数据集测试:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/rnn/rnn_clf_cifar10_test.py

  • PyTorch   |   GRU 回归器

    模型:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/rnn/rnn_regr.py

    测试:https://github.com/zhedongzheng/finch/blob/master/pytorch-models/rnn/rnn_regr_plot.py

自动解码

  • TensorFlow   |   多层感知 自动解码

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/autoencoder/mlp_ae.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/autoencoder/mlp_ae_mnist_test.py

  • TensorFlow   |   二维卷积 自动解码

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/autoencoder/conv_ae.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/autoencoder/conv_ae_mnist_test.py

    CIFAR10数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/autoencoder/conv_ae_cifar10_test.py

高速公路网络

  • TensorFlow   |   基于高速公路的 多层感知 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/highway/mlp_hn_clf.py

    MNIST数据集测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/highway/mlp_hn_clf_mnist_test.py

  • TensorFlow   |   基于高速公路的 一维卷积 分类器

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/conv_1d_hn_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/conv_1d_hn_text_clf_imdb_test.py

对抗生成网络

  • TensorFlow   |   基于多层感知的 对抗生成网络

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/gan/mlp_gan.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/gan/mlp_gan_test.py

  • 有条件限制的 对抗生成网络

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/gan/mlp_cond_gan.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/gan/mlp_cond_gan_test.py

  • TensorFlow   |   基于卷积网络的 对抗生成网络     MNIST数据集

    模型:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/gan/dcgan.py

    测试:https://github.com/zhedongzheng/finch/blob/master/tensorflow-models/gan/dcgan_mnist_test.py

三、自然语言处理

预处理

  • Python   |   文本格式化

    https://github.com/zhedongzheng/finch/blob/master/nlp-models/text-cleaning.ipynb

  • Python   |   词语索引

    https://github.com/zhedongzheng/finch/blob/master/nlp-models/word-indexing.ipynb

语言模型

  • Sklearn   |   隐含语义分析     

    书名测试 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/python/lsa_test.py

  • Python   |   三元模型     

    Amazon客户评价测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/python/trigram_test.py

  • Sklearn   |   TF-IDF     

    Brown文集测试 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/python/tfidf_brown_test.py

  • TensorFlow   |   词语向量化 Skip-Gram     

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/word2vec_skipgram.py

    Text8文集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/word2vec_skipgram_text8_test.py

文本分类

  • Sklearn   |   TF-IDF + 逻辑回归     
    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/python/tfidf_imdb_test.py

  • TensorFlow   |   一维卷积

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/conv_1d_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/conv_1d_text_clf_imdb_test.py

  • 多通道 一维卷积

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/concat_conv_1d_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/concat_conv_1d_text_clf_imdb_test.py

  • TensorFlow   |   循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/rnn_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/rnn_text_clf_imdb_test.py

  • TensorFlow   |   双层循环网络 + 注意力机制

    Model :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/birnn_attn_text_clf.py

    IMDB Test:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/birnn_attn_text_clf_imdb_test.py

  • TensorFlow   |   一维卷积+循环网络  

    模型 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/conv_rnn_text_clf.py

    IMDB数据集测试 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/conv_rnn_text_clf_imdb_test.py

  • PyTorch   |   一维卷积

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/cnn_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/cnn_text_clf_imdb_test.py

  • PyTorch   |   循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/rnn_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/rnn_text_clf_imdb_test.py

  • PyTorch   |   一维卷积+循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/cnn_rnn_text_clf.py

    IMDB数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/cnn_rnn_text_clf_imdb_test.py

文本生成

  • Python   |   二阶马尔可夫模型

  • Robert Frost 文集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/python/markov_text_gen.py

  • TensorFlow   |   Char-LSTM

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/rnn_text_gen.py

    测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/rnn_text_gen_test.py

  • TensorFlow   |   CNN-RNN

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/cnn_rnn_text_gen.py

    测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/cnn_rnn_text_gen_test.py

词性标记

  • TensorFlow   |   循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/rnn_seq2seq_clf.py

    CoNLL-2000数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/pos_rnn_test.py

  • 双向循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/birnn_seq2seq_clf.py

    CoNLL-2000数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/pos_birnn_test.py

  • TensorFlow   |   双向循环网络 + 条件随机场

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/birnn_crf_clf.py

    CoNLL-2000数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/pos_birnn_crf_test.py

  • PyTorch   |   循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/rnn_seq_clf.py

    CoNLL-2000数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/rnn_tagging_test.py

  • 双向循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/birnn_seq_clf.py

    CoNLL-2000数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/birnn_tagging_test.py

分词

  • TensorFlow   |   循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/rnn_seq2seq_clf.py

    ICWB2数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/chseg_rnn_test.py

  • 双向循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/birnn_seq2seq_clf.py

    ICWB2数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/chseg_birnn_test.py

  • TensorFlow   |   双向循环网络 + 条件随机场

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/birnn_crf_clf.py

    ICWB2数据集测试 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/chseg_birnn_crf_test.py

  • PyTorch   |   循环网络

    模型 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/rnn_seq_clf.py

    ICWB2数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/rnn_chseg_test.py

  • 双向循环网络

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/birnn_seq_clf.py

    ICWB2数据集测试:https://github.com/zhedongzheng/finch/blob/master/nlp-models/pytorch/birnn_chseg_test.py

机器翻译

  • TensorFlow   |   动态 Seq2Seq

    模型:https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/seq2seq.py

    测试 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/seq2seq_test.py

  • 动态 Seq2Seq (双向编码)

    模型 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/seq2seq_birnn.py

    测试 :https://github.com/zhedongzheng/finch/blob/master/nlp-models/tensorflow/seq2seq_birnn_test.py

四、计算机视觉

OpenCV

  • 基本操作   |   调整大小

    https://github.com/zhedongzheng/finch/blob/master/cv-models/resize.ipynb


  • 基本操作   |   旋转

    https://github.com/zhedongzheng/finch/blob/master/cv-models/rotations.ipynb

  • 分割   |   轮廓

    https://github.com/zhedongzheng/finch/blob/master/cv-models/contours.ipynb

  • 分割   |   轮廓排序

    https://github.com/zhedongzheng/finch/blob/master/cv-models/sorting-contours.ipynb

  • 探测   |   Face & Eye Detection Using Cascade Classifier

    https://github.com/zhedongzheng/finch/blob/master/cv-models/face-eye-detection.ipynb

  • 探测   |   Walker & Car Detection Using Cascade Classifier

    https://github.com/zhedongzheng/finch/blob/master/cv-models/car-walker-detection.ipynb

热门文章推荐

资料|麻省理工课程:深度学习数据基础(ppt)

推荐|40张动态图详解全部传感器关注原理!

警惕!中国人工智能有一只推荐算法叫:莆田系算法!

百度Apollo:无人驾驶技术发展成熟仅需3年左右!

阿里出了个Take Go无人便利店,比亚马逊还厉害!

大数据:99%的数据是无用的僵尸数据!

突发!长征五号遥二卫星发射任务失败

重磅!微软宣布业务重点调整将专注ai云!

最新,吴恩达正式加入Drive.ai董事会!

老司机:用gan去除(爱情)动画片中的马赛克和衣服!

登录查看更多
24

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
专知会员服务
137+阅读 · 2020年5月19日
Sklearn 与 TensorFlow 机器学习实用指南,385页pdf
专知会员服务
126+阅读 · 2020年3月15日
《深度学习》圣经花书的数学推导、原理与Python代码实现
【新书】Pro 机器学习算法Python实现,379页pdf
专知会员服务
195+阅读 · 2020年2月11日
一网打尽!100+深度学习模型TensorFlow与Pytorch代码实现集合
《机器学习实战》代码(基于Python3)
专知
32+阅读 · 2019年10月14日
盘一盘 Python 系列 8 - Sklearn
平均机器
5+阅读 · 2019年5月30日
sklearn 与分类算法
人工智能头条
7+阅读 · 2019年3月12日
【源码分享】机器学习之Python支持向量机
机器学习算法与Python学习
3+阅读 · 2018年3月13日
Github 项目推荐 | 用 TensorFlow 实现的模型集合
AI研习社
5+阅读 · 2018年2月14日
免费|机器学习算法Python实现
全球人工智能
5+阅读 · 2018年1月2日
推荐|深度学习PyTorch的教程代码
全球人工智能
10+阅读 · 2017年10月8日
Bivariate Beta LSTM
Arxiv
5+阅读 · 2019年10月7日
Arxiv
9+阅读 · 2019年4月19日
Arxiv
8+阅读 · 2019年3月21日
Embedding Logical Queries on Knowledge Graphs
Arxiv
3+阅读 · 2019年2月19日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Arxiv
6+阅读 · 2018年6月21日
VIP会员
相关资讯
《机器学习实战》代码(基于Python3)
专知
32+阅读 · 2019年10月14日
盘一盘 Python 系列 8 - Sklearn
平均机器
5+阅读 · 2019年5月30日
sklearn 与分类算法
人工智能头条
7+阅读 · 2019年3月12日
【源码分享】机器学习之Python支持向量机
机器学习算法与Python学习
3+阅读 · 2018年3月13日
Github 项目推荐 | 用 TensorFlow 实现的模型集合
AI研习社
5+阅读 · 2018年2月14日
免费|机器学习算法Python实现
全球人工智能
5+阅读 · 2018年1月2日
推荐|深度学习PyTorch的教程代码
全球人工智能
10+阅读 · 2017年10月8日
相关论文
Bivariate Beta LSTM
Arxiv
5+阅读 · 2019年10月7日
Arxiv
9+阅读 · 2019年4月19日
Arxiv
8+阅读 · 2019年3月21日
Embedding Logical Queries on Knowledge Graphs
Arxiv
3+阅读 · 2019年2月19日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Arxiv
6+阅读 · 2018年6月21日
Top
微信扫码咨询专知VIP会员