顯示具有 machine learning 標籤的文章。 顯示所有文章
顯示具有 machine learning 標籤的文章。 顯示所有文章

2010年12月2日

Python好用的數值計算套件

在別的地方看到的,順便整理一下, Numpy, Scipy, matplotlib是必備套件,三個套件已經有matlab基本的運算功能。

  1. xlrd - Library for developers to extract data from Microsoft Excel spreadsheet files 
  2. RPy2 - A simple Python interface for R
  3. NetworkX -For analyzing network data
  4. SymPy - SymPy contains nearly all of the same functionality (algebraic evaluation, differentiation, expansion, complex numbers, etc.) as SimPy, but is contained in a pure Python distribution.
  5. SimPy - Short for “Simulation in Python”, an object-oriented, process-based discrete-event simulation language, making it a wholesale agent-based modeling environment written entirely in Python.
  6. Boost.Python - This C++ library enables seamless interoperability between C++ and Python
  7. PyMC - PyMC implements the Metropolis-Hastings algorithm as a Python class.
  8. Pycluster - It contains implementations of hierarchical and k-means clustering
  9. NLTK - Natural Language Toolkit is a suite of libraries and programs for symbolic and statistical natural language processing (NLP) 

2010年11月15日

LibSVM 3.0使用G++與Intel compiler加OpenMP效能的比較

由於Intel的compiler在non-commercial的條件下可以免費使用(下載),所以就抓下來安裝和g++比較看看效能上的差異。

首先要照官方網站上FAQ內使用OpenMP前要對svm.cpp修改。

此時g++版本內的Makefile參數應該如下:

CXX ?= g++
CFLAGS = -Wall -Wconversion -O3 -fPIC -fopenmp

而intel compiler(icpc)的Makefile參數如下:

CXX = icpc
CFLAGS = -Wall -Wconversion -O3 -fPIC -openmp

其它部份參數都一樣。

我的執行平台是Ubuntu 10.04, CPU為Intel(R) Core(TM)2 Quad CPU Q8300, g++版本為4.4.3, icpc版本為v12.0.0, OpenMP使用4個核心運算,使用官方網站上的a9a範例做training, 執行時間如下:

g++:
real:  0m50.562s
user: 3m8.672s
sys: 0m0.588s
icpc:
real: 0m47.233s
user: 2m58.003s
sys: 0m2.220s

2010年11月6日

libsvm使用多核心

libsvm要支援多核心,依照官方網站的FAQ說明修改後,即可發揮CPU多核的功能。

但是若要使用python呼叫修改多核心功能的libsvm,除了FAQ內的修改外,還要再修改Makefile,加上-lgomp的選項:

lib: svm.o
$(CXX) -lgomp -shared -dynamiclib svm.o -o libsvm.so.$(SHVER)

2010年9月1日

Machine learning data set

常在paper中見到的machine learning data set

data set