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

Posted 全球人工智能

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了推荐|TensorFlow/PyTorch/Sklearn实现的五十种机器学习模型相关的知识,希望对你有一定的参考价值。

一、机器学习

线性模型

  • 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

热门文章推荐


以上是关于推荐|TensorFlow/PyTorch/Sklearn实现的五十种机器学习模型的主要内容,如果未能解决你的问题,请参考以下文章

个性化推荐系统推荐算法

个性化推荐系统推荐算法

混合推荐系统就是多个推荐系统“大杂烩”吗?

推荐系统架构(摘自《推荐系统实践》)

推荐系统基础-纪要

推荐系统