Lecture Summary
- Document comparisons
- Represent a document by "bag-of-words"
- ignore grammar, dependencies, order of words etc.
- Similarity measurements by Jaccard’s Index

- Cannot reflect importance of words
- Term weighting by TF-IDF
- Similarity measurements by Term Frequency & Inverse Document Frequency
- tf-idf(t,d) = tf(t,d) x idf(t)
- tf(t,d) = number of times t appears in d
- df(t) = number of documents that contains t
- idf(t) = log(N/df(t)) where N = number of documents
- Similarity of measurements by Vector Space Model

- Text Classification
- Two steps of classification:
- Train a classifier by using labeled data (‘supervised’ learning)
- Classify new data using the classifier
- Naïve Bayes Text Classification
- Idea: Probability of a document belonging to a class depending on the probability of the words in the document belonging to the class
- Text Clustering
- Unsupervised learning
- Hard:each item can only belong to one cluster
- Soft: each item can belong to different clusters at to different extents
- K-mean Clustering
- Goal: to find K points (centroids) in the item space that represent the K clusters of items
- Represent documents using the vector space model
- Standard algorithm for K-Means clustering
- Model-based Text Clustering
- Generalize K-mean clustering to a soft text clustering model
Notes
This lecture discussed some methods of comparing and classifying documents. Some mathematics tools including probability and vectors were used in these methods. After undergraduate, I haven't used these tools for years. I really haven't to practice them again.
The idea of document comparison is very interesting to me. I am thinking whether this technique can be used in identifying and classifying phishing websites. In my job, I need to handle some phishing website cases. We can only identify them manually. If we can represent a website using bag-of-words, we can compare the suspected phishing websites and the legitimate websites by algorithms.




No comments:
Post a Comment