From 62e8b3dee4c7e6719c91beb196c02046a9f9709b Mon Sep 17 00:00:00 2001 From: jiangzhonglian Date: Thu, 18 May 2017 11:57:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/python/1.MLFoundation/NumPy.py | 7 ++++++- src/python/10.kmeans/kMeans.py | 8 +++++++- src/python/11.Apriori/apriori.py | 3 ++- src/python/12.FrequentPattemTree/fpGrowth.py | 2 ++ src/python/13.PCA/pca.py | 3 ++- src/python/14.SVD/svdRec.py | 10 +++++++--- src/python/2.KNN/kNN.py | 6 +++++- src/python/3.DecisionTree/DTSklearn.py | 1 + src/python/3.DecisionTree/DecisionTree.py | 4 ++-- src/python/4.NaiveBayes/bayes.py | 6 ++++++ src/python/5.Logistic/logistic.py | 4 +++- src/python/6.SVM/svm-complete.py | 3 ++- src/python/6.SVM/svm-complete_Non-Kernel.py | 3 ++- src/python/6.SVM/svm-simple.py | 3 ++- src/python/7.AdaBoost/adaboost.py | 4 +++- src/python/7.RandomForest/randomForest.py | 2 ++ .../regression.py | 6 ++++-- src/python/9.RegTrees/regTrees.py | 4 ++-- src/python/9.RegTrees/treeExplore.py | 3 ++- 19 files changed, 62 insertions(+), 20 deletions(-) diff --git a/src/python/1.MLFoundation/NumPy.py b/src/python/1.MLFoundation/NumPy.py index 05432bad..b4d0d85b 100644 --- a/src/python/1.MLFoundation/NumPy.py +++ b/src/python/1.MLFoundation/NumPy.py @@ -1,6 +1,11 @@ #!/usr/bin/python # coding:utf8 - +''' +Created on 2017-05-18 +Update on 2017-05-18 +@author: Peter Harrington/山上有课树 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning +''' from numpy import random, mat, eye ''' diff --git a/src/python/10.kmeans/kMeans.py b/src/python/10.kmeans/kMeans.py index af2eed9b..2ff47b62 100644 --- a/src/python/10.kmeans/kMeans.py +++ b/src/python/10.kmeans/kMeans.py @@ -1,6 +1,12 @@ #!/usr/bin/python # coding:utf8 - +''' +Created on Feb 16, 2011 +Update on 2017-05-18 +k Means Clustering for Ch10 of Machine Learning in Action +@author: Peter Harrington/那伊抹微笑 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning +''' from numpy import * diff --git a/src/python/11.Apriori/apriori.py b/src/python/11.Apriori/apriori.py index 1f8e648d..7374c2b8 100644 --- a/src/python/11.Apriori/apriori.py +++ b/src/python/11.Apriori/apriori.py @@ -3,9 +3,10 @@ ''' Created on Mar 24, 2011 -Update on 2017-03-16 +Update on 2017-05-18 Ch 11 code @author: Peter/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' print(__doc__) from numpy import * diff --git a/src/python/12.FrequentPattemTree/fpGrowth.py b/src/python/12.FrequentPattemTree/fpGrowth.py index 4a299d74..9999b1dd 100644 --- a/src/python/12.FrequentPattemTree/fpGrowth.py +++ b/src/python/12.FrequentPattemTree/fpGrowth.py @@ -3,12 +3,14 @@ ''' Created on Jun 14, 2011 +Update on 2017-05-18 FP-Growth FP means frequent pattern the FP-Growth algorithm needs: 1. FP-tree (class treeNode) 2. header table (use dict) This finds frequent itemsets similar to apriori but does not find association rules. @author: Peter/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' print(__doc__) diff --git a/src/python/13.PCA/pca.py b/src/python/13.PCA/pca.py index 6be185a0..52c1197e 100644 --- a/src/python/13.PCA/pca.py +++ b/src/python/13.PCA/pca.py @@ -3,8 +3,9 @@ ''' Created on Jun 1, 2011 -Update on 2017-04-06 +Update on 2017-05-18 @author: Peter Harrington/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' print(__doc__) from numpy import * diff --git a/src/python/14.SVD/svdRec.py b/src/python/14.SVD/svdRec.py index e540a575..bbecf9ea 100644 --- a/src/python/14.SVD/svdRec.py +++ b/src/python/14.SVD/svdRec.py @@ -1,7 +1,11 @@ #!/usr/bin/python -# -*- coding: utf-8 -*- -# encoding: utf-8 - +# coding: utf-8 +''' +Created on Mar 8, 2011 +Update on 2017-05-18 +@author: Peter Harrington/山上有课树 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning +''' from numpy import linalg as la from numpy import * diff --git a/src/python/2.KNN/kNN.py b/src/python/2.KNN/kNN.py index 9de7cd89..d9abbea7 100644 --- a/src/python/2.KNN/kNN.py +++ b/src/python/2.KNN/kNN.py @@ -1,9 +1,13 @@ #!/usr/bin/env python # encoding: utf-8 ''' -导入科学计算包numpy和运算符模块operator +Created on Sep 16, 2010 +Update on 2017-05-18 +@author: Peter Harrington/羊山 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' from numpy import * +# 导入科学计算包numpy和运算符模块operator import operator from os import listdir diff --git a/src/python/3.DecisionTree/DTSklearn.py b/src/python/3.DecisionTree/DTSklearn.py index dd7e506f..021369f7 100644 --- a/src/python/3.DecisionTree/DTSklearn.py +++ b/src/python/3.DecisionTree/DTSklearn.py @@ -1,6 +1,7 @@ #!/usr/bin/python # coding: utf8 # 原始链接: http://blog.csdn.net/lsldd/article/details/41223147 +# 《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning import numpy as np from sklearn import tree from sklearn.metrics import precision_recall_curve diff --git a/src/python/3.DecisionTree/DecisionTree.py b/src/python/3.DecisionTree/DecisionTree.py index f6f4bf1f..092d9d0b 100755 --- a/src/python/3.DecisionTree/DecisionTree.py +++ b/src/python/3.DecisionTree/DecisionTree.py @@ -1,11 +1,11 @@ #!/usr/bin/python # coding:utf8 - ''' Created on Oct 12, 2010 -Update on 2017-02-27 +Update on 2017-05-18 Decision Tree Source Code for Machine Learning in Action Ch. 3 @author: Peter Harrington/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' print(__doc__) import operator diff --git a/src/python/4.NaiveBayes/bayes.py b/src/python/4.NaiveBayes/bayes.py index 096f7b43..eb4f47f3 100755 --- a/src/python/4.NaiveBayes/bayes.py +++ b/src/python/4.NaiveBayes/bayes.py @@ -1,5 +1,11 @@ #!/usr/bin/env python # -*- coding:utf-8 -*- +''' +Created on Oct 19, 2010 +Update on 2017-05-18 +@author: Peter Harrington/羊山 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning +''' from numpy import * """ p(xy)=p(x|y)p(y)=p(y|x)p(x) diff --git a/src/python/5.Logistic/logistic.py b/src/python/5.Logistic/logistic.py index 94501394..c312f890 100644 --- a/src/python/5.Logistic/logistic.py +++ b/src/python/5.Logistic/logistic.py @@ -3,8 +3,10 @@ ''' Created on Oct 27, 2010 +Update on 2017-05-18 Logistic Regression Working Module -@author: Peter +@author: Peter Harrington/羊山 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' from numpy import * import matplotlib.pyplot as plt diff --git a/src/python/6.SVM/svm-complete.py b/src/python/6.SVM/svm-complete.py index a6f5aa41..44286375 100644 --- a/src/python/6.SVM/svm-complete.py +++ b/src/python/6.SVM/svm-complete.py @@ -3,9 +3,10 @@ """ Created on Nov 4, 2010 -Update on 2017-03-21 +Update on 2017-05-18 Chapter 5 source file for Machine Learing in Action @author: Peter/geekidentity/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning """ from numpy import * import matplotlib.pyplot as plt diff --git a/src/python/6.SVM/svm-complete_Non-Kernel.py b/src/python/6.SVM/svm-complete_Non-Kernel.py index 51199e53..d40a25f0 100644 --- a/src/python/6.SVM/svm-complete_Non-Kernel.py +++ b/src/python/6.SVM/svm-complete_Non-Kernel.py @@ -3,9 +3,10 @@ """ Created on Nov 4, 2010 -Update on 2017-03-21 +Update on 2017-05-18 Chapter 5 source file for Machine Learing in Action @author: Peter/geekidentity/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning """ from numpy import * import matplotlib.pyplot as plt diff --git a/src/python/6.SVM/svm-simple.py b/src/python/6.SVM/svm-simple.py index 3d188659..815942ef 100644 --- a/src/python/6.SVM/svm-simple.py +++ b/src/python/6.SVM/svm-simple.py @@ -3,9 +3,10 @@ """ Created on Nov 4, 2010 -Update on 2017-03-21 +Update on 2017-05-18 Chapter 5 source file for Machine Learing in Action @author: Peter/geekidentity/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning """ from numpy import * import matplotlib.pyplot as plt diff --git a/src/python/7.AdaBoost/adaboost.py b/src/python/7.AdaBoost/adaboost.py index 115eee4b..9bd19538 100644 --- a/src/python/7.AdaBoost/adaboost.py +++ b/src/python/7.AdaBoost/adaboost.py @@ -3,8 +3,10 @@ ''' Created on Nov 28, 2010 +Update on 2017-05-18 Adaboost is short for Adaptive Boosting -@author: Peter/jiangzhonglian +@author: Peter/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' from numpy import * diff --git a/src/python/7.RandomForest/randomForest.py b/src/python/7.RandomForest/randomForest.py index ec77cce7..aed5b7f2 100644 --- a/src/python/7.RandomForest/randomForest.py +++ b/src/python/7.RandomForest/randomForest.py @@ -3,8 +3,10 @@ ''' Created 2017-04-25 +Update on 2017-05-18 Random Forest Algorithm on Sonar Dataset @author: Flying_sfeng/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning --- 源代码网址:http://www.tuicool.com/articles/iiUfeim Flying_sfeng博客地址:http://blog.csdn.net/flying_sfeng/article/details/64133822 diff --git a/src/python/8.Predictive numerical data regression/regression.py b/src/python/8.Predictive numerical data regression/regression.py index 41139a7c..a1e72f42 100644 --- a/src/python/8.Predictive numerical data regression/regression.py +++ b/src/python/8.Predictive numerical data regression/regression.py @@ -2,8 +2,10 @@ # coding:utf8 ''' -Create by ApacheCN-小瑶 -Date from 2017-02-27 +Created on Jan 8, 2011 +Update on 2017-05-18 +@author: Peter Harrington/ApacheCN-小瑶 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' diff --git a/src/python/9.RegTrees/regTrees.py b/src/python/9.RegTrees/regTrees.py index 7f210dfd..41cd60dc 100644 --- a/src/python/9.RegTrees/regTrees.py +++ b/src/python/9.RegTrees/regTrees.py @@ -1,11 +1,11 @@ #!/usr/bin/python # coding:utf8 - ''' Created on Feb 4, 2011 -Update on 2017-03-02 +Update on 2017-05-18 Tree-Based Regression Methods Source Code for Machine Learning in Action Ch. 9 @author: Peter Harrington/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' print(__doc__) from numpy import * diff --git a/src/python/9.RegTrees/treeExplore.py b/src/python/9.RegTrees/treeExplore.py index 33665a6a..bd43fe73 100644 --- a/src/python/9.RegTrees/treeExplore.py +++ b/src/python/9.RegTrees/treeExplore.py @@ -3,9 +3,10 @@ ''' Created on 2017-03-08 -Update on 2017-03-08 +Update on 2017-05-18 Tree-Based Regression Methods Source Code for Machine Learning in Action Ch. 9 @author: Peter/片刻 +《机器学习实战》更新地址:https://github.com/apachecn/MachineLearning ''' import regTrees from Tkinter import *