python版本及ML庫

一:關於Python版本的選擇問題

          關於Python的選擇問題:要看學術界能不能把科學庫遷移到Python3.
前端

1:多個版本共用node

最近發現SciPy的最高版本是3.2,只能是退而求其次,不使用最新版本了!!!python

把註冊表修改一下,就能夠多個版本共用了!
linux

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Python]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\Help]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\Help\Main Python Documentation]
@="D:\\PCL_X64\\Python32\\Doc\\python324.chm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\InstallPath]
@="D:\\PCL_X64\\Python32\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\InstallPath\InstallGroup]
@="Python 3.2"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\Modules]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\PythonPath]
@="D:\\PCL_X64\\Python32\\Lib;D:\\PCL_X64\\Python32\\DLLs"


[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\Help]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\Help\Main Python Documentation]
@="C:\\Python27\\Doc\\python275.chm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\InstallPath]
@="C:\\Python27\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\InstallPath\InstallGroup]
@="Python 2.7"
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\Modules]
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.2\PythonPath]
@="C:\\Python27\\Lib;C:\\Python27\\DLLs"git


關於找不到路徑問題,上述方法能夠解決了!直接修改註冊表github


2:在使用SciPy時缺乏包的問題,對於WIndows系統,能夠參考一下頁面:web

python包:http://www.lfd.uci.edu/~gohlke/pythonlibs/算法

看來windows下仍是很給力了!編程

3:Scikit學習庫的下載地址:https://pypi.python.org/pypi/scikit-learn/windows

4:python症取代R語言成爲數據科學的編程語言

http://readwrite.com/2013/11/25/python-displacing-r-as-the-programming-language-for-data-science#awesm=~op7vaD2VWwJVdM

5:Tips:再Python3沒有徹底廣泛開始以前,最好使用Python2.7.


二:Python的機器學習庫

原文連接:http://qxde01.blog.163.com/blog/static/67335744201368101922991/

首選 Scikit-Learn.....

1.       scikit-learn

scikit-learn 是一個基於SciPy和Numpy的開源機器學習模塊,包括分類、迴歸、聚類系列算法,主要算法有SVM、邏輯迴歸、樸素貝葉斯、Kmeans、DBSCAN等,目前由INRI 資助,偶爾Google也資助一點。

項目主頁:

https://pypi.python.org/pypi/scikit-learn/

http://scikit-learn.org/

https://github.com/scikit-learn/scikit-learn

2.      NLTK

NLTK(NaturalLanguage Toolkit)是Python的天然語言處理模塊,包括一系列的字符處理和語言統計模型。NLTK經常使用於學術研究和教學,應用的領域有語言學、認知科學、人工智能、信息檢索、機器學習等。NLTK提供超過50個語料庫和詞典資源,文本處理庫包括分類、分詞、詞幹提取、解析、語義推理。可穩定運行在Windows, Mac OS X和Linux平臺上. 

項目主頁:

http://sourceforge.net/projects/nltk/

https://pypi.python.org/pypi/nltk/

http://nltk.org/

3.      Mlpy

Mlpy是基於NumPy/SciPy的Python機器學習模塊,它是Cython的擴展應用。包含的機器學習算法有:

l 迴歸

leastsquaresridgeregression, leastangle regression, elastic net, kernel ridge regression, supportvector machines (SVM), partialleast squares (PLS)

l  分類

linear discriminant analysis (LDA), Basic perceptron, Elastic Net, logistic regression, (Kernel) Support VectorMachines (SVM), Diagonal Linear Discriminant Analysis (DLDA), Golub Classifier,Parzen-based, (kernel) Fisher Discriminant Classifier, k-nearest neighbor,Iterative RELIEF, Classification Tree, Maximum Likelihood Classifier

l  聚類

hierarchical clustering, Memory-saving HierarchicalClustering, k-means

l  維度約減

(Kernel) Fisher discriminant analysis (FDA), Spectral Regression Discriminant Analysis(SRDA), (kernel) Principal component analysis (PCA)

項目主頁:

http://sourceforge.net/projects/mlpy

https://mlpy.fbk.eu/

4.  Shogun  

Shogun是一個開源的大規模機器學習工具箱。目前Shogun的機器學習功能分爲幾個部分:feature表示,feature預處理, 核函數表示,核函數標準化,距離表示,分類器表示,聚類方法,分佈, 性能評價方法,迴歸方法,結構化輸出學習器。

SHOGUN 的核心由C++實現,提供 Matlab、 R、 Octave、 Python接口。主要應用在linux平臺上。

項目主頁:

http://www.shogun-toolbox.org/

5.   MDP

TheModular toolkit for Data Processing (MDP) ,用於數據處理的模塊化工具包,一個Python數據處理框架。

從用戶的觀點,MDP是可以被整合到數據處理序列和更復雜的前饋網絡結構的一批監督學習和非監督學習算法和其餘數據處理單元。計算依照速度和內存需求而高效的執行。從科學開發者的觀點,MDP是一個模塊框架,它可以被容易地擴展。新算法的實現是容易且直觀的。新實現的單元而後被自動地與程序庫的其他部件進行整合。MDP在神經科學的理論研究背景下被編寫,可是它已經被設計爲在使用可訓練數據處理算法的任何狀況中都是有用的。其站在用戶一邊的簡單性,各類不一樣的隨時可用的算法,及應用單元的可重用性,使得它也是一個有用的教學工具。

項目主頁:

http://mdp-toolkit.sourceforge.net/

https://pypi.python.org/pypi/MDP/

6.      PyBrain

PyBrain(Python-BasedReinforcement Learning, Artificial Intelligence and Neural Network)是Python的一個機器學習模塊,它的目標是爲機器學習任務提供靈活、易應、強大的機器學習算法。(這名字很霸氣)

PyBrain正如其名,包括神經網絡、強化學習(及兩者結合)、無監督學習、進化算法。由於目前的許多問題須要處理連續態和行爲空間,必須使用函數逼近(如神經網絡)以應對高維數據。PyBrain以神經網絡爲核心,全部的訓練方法都以神經網絡爲一個實例。

項目主頁:

http://www.pybrain.org/

https://github.com/pybrain/pybrain/

7.      BigML

BigML 使得機器學習爲數據驅動決策和預測變得容易,BigML使用容易理解的交互式操做建立優雅的預測模型。BigML使用BigML.io,捆綁Python。

項目主頁:

https://bigml.com/

https://pypi.python.org/pypi/bigml

http://bigml.readthedocs.org/

8.      PyML

PyML是一個Python機器學習工具包, 爲各分類和迴歸方法提供靈活的架構。它主要提供特徵選擇、模型選擇、組合分類器、分類評估等功能。

項目主頁:

http://cmgm.stanford.edu/~asab/pyml/tutorial/

http://pyml.sourceforge.net/

9.      Milk

Milk是Python的一個機器學習工具箱,其重點是提供監督分類法與幾種有效的分類分析:SVMs(基於libsvm),K-NN,隨機森林經濟和決策樹。它還能夠進行特徵選擇。這些分類能夠在許多方面相結合,造成不一樣的分類系統。

對於無監督學習,它提供K-means和affinitypropagation聚類算法。

項目主頁:

https://pypi.python.org/pypi/milk/

http://luispedro.org/software/milk

10.  PyMVPA

PyMVPA(MultivariatePattern Analysis in Python)是爲大數據集提供統計學習分析的Python工具包,它提供了一個靈活可擴展的框架。它提供的功能有分類、迴歸、特徵選擇、數據導入導出、可視化等

項目主頁:

http://www.pymvpa.org/

https://github.com/PyMVPA/PyMVPA

11.  Pattern 

Pattern是Python的web挖掘模塊,它綁定了  Google、Twitter 、WikipediaAPI,提供網絡爬蟲、HTML解析功能,文本分析包括淺層規則解析、WordNet接口、句法與語義分析、TF-IDF、LSA等,還提供聚類、分類和圖網絡可視化的功能。

項目主頁:

http://www.clips.ua.ac.be/pages/pattern

https://pypi.python.org/pypi/Pattern

12.  pyrallel

Pyrallel(ParallelData Analytics in Python)基於分佈式計算模式的機器學習和半交互式的試驗項目,可在小型集羣上運行,適用範圍:

l  focus on small to medium dataset that fits in memory on a small (10+nodes) to medium cluster (100+ nodes).

l  focus on small to medium data (with data locality when possible).

l  focus on CPU bound tasks (e.g. training Random Forests) while tryingto limit disk / network access to a minimum.

l  do not focus on HA / Fault Tolerance (yet).

l  do not try to invent new set of high level programming abstractions(yet): use a low level programming model (IPython.parallel) to finely controlthe cluster elements and messages transfered and help identify what are thepractical underlying constraints in distributed machine learning setting.

項目主頁:

https://pypi.python.org/pypi/pyrallel

http://github.com/pydata/pyrallel

13.  Monte

Monte (machine learning in pure Python)是一個純Python機器學習庫。它能夠迅速構建神經網絡、條件隨機場、邏輯迴歸等模型,使用inline-C優化,極易使用和擴展。

項目主頁:

https://pypi.python.org/pypi/Monte

http://montepython.sourceforge.net

14.  Orange

Orange 是一個基於組件的數據挖掘和機器學習軟件套裝,它的功能即友好,又很強大,快速而又多功能的可視化編程前端,以便瀏覽數據分析和可視化,基綁定了 Python以進行腳本開發。它包含了完整的一系列的組件以進行數據預處理,並提供了數據賬目,過渡,建模,模式評估和勘探的功能。其由C++ 和 Python開發,它的圖形庫是由跨平臺的Qt框架開發。

項目主頁:

https://pypi.python.org/pypi/Orange/

http://orange.biolab.si/

15.  Theano

Theano 是一個 Python 庫,用來定義、優化和模擬數學表達式計算,用於高效的解決多維數組的計算問題。Theano的特色:

l  緊密集成Numpy

l  高效的數據密集型GPU計算

l  高效的符號微分運算

l  高速和穩定的優化

l  動態生成c代碼

l  普遍的單元測試和自我驗證

自2007年以來,Theano已被普遍應用於科學運算。theano使得構建深度學習模型更加容易,能夠快速實現下列模型:

l LogisticRegression

l Multilayerperceptron

l DeepConvolutional Network

l AutoEncoders, Denoising Autoencoders

l StackedDenoising Auto-Encoders

l RestrictedBoltzmann Machines

l Deep BeliefNetworks

l HMCSampling

l Contractiveauto-encoders

Theano,一位希臘美女,Croton最有權勢的Milo的女兒,後來成爲了畢達哥拉斯的老婆。

項目主頁:

http://deeplearning.net/tutorial/

https://pypi.python.org/pypi/Theano

16.     Pylearn2

Pylearn2創建在theano上,部分依賴scikit-learn上,目前Pylearn2正處於開發中,將能夠處理向量、圖像、視頻等數據,提供MLP、RBM、SDA等深度學習模型。Pylearn2的目標是:

  • Researchers add features as they need them. We avoid getting bogged down by too much top-down planning in advance.
  • A machine learning toolbox for easy scientific experimentation.
  • All models/algorithms published by the LISA lab should have reference implementations in Pylearn2.
  • Pylearn2 may wrap other libraries such as scikits.learn when this is practical
  • Pylearn2 differs from scikits.learn in that Pylearn2 aims to provide great flexibility and make it possible for a researcher to do almost anything, while scikits.learn aims to work as a 「black box」 that can produce good results even if the user does not understand the implementation
  • Dataset interface for vector, images, video, ...
  • Small framework for all what is needed for one normal MLP/RBM/SDA/Convolution experiments.
  • Easy reuse of sub-component of Pylearn2.
  • Using one sub-component of the library does not force you to use / learn to use all of the other sub-components if you choose not to.
  • Support cross-platform serialization of learned models.
  • Remain approachable enough to be used in the classroom (IFT6266 at the University of Montreal).

項目主頁:

http://deeplearning.net/software/pylearn2/

https://github.com/lisa-lab/pylearn2


還有其餘的一些Python的機器學習庫,如:

pmll(https://github.com/pavlov99/pmll)

pymining(https://github.com/bartdag/pymining)

ease (https://github.com/edx/ease)

textmining(http://www.christianpeccei.com/textmining/)

更多的機器學習庫可經過https://pypi.python.org/pypi查找。

相關文章
相關標籤/搜索