Introduction Algorithm Framework Future work Demo.
-
date post
20-Dec-2015 -
Category
Documents
-
view
222 -
download
2
Transcript of Introduction Algorithm Framework Future work Demo.
Preprocessing
Stemming› Porter Stemming Algorithm› E.g.
cat – cats meet – meeting agree – agreed correct - correctness
Vector Space
Build dictionary 1› word -> frequency
Sort the keys of dictionary 1 Build dictionary 2
› key -> (index, count) Build binary vectors
› index -> occurrence
Performance
Algorithms coded in Python› Dynamic typing› Not good at numerical operations
Solution: numpy
Numpy
A Python extension module Written mostly in C Define numerical array and matrix
types and basic operations on them
Numpy vs Python
Python code› a = range(10000000)› b = range(10000000)› c = []› for i in range(len(a)):
c.append(a[i] + b[i]) Takes up to 10 seconds on a several
GHz processor
Numpy vs Python
Numpy code› import numpy as np› a = np.arrange(10000000)› a = np.arrange(10000000)› c = a + b
Almost Instant