Content deleted Content added
use standard variant |
|||
(41 intermediate revisions by 29 users not shown) | |||
Line 1:
{{Short description|Model for representing text documents}}
'''Vector space model''' or '''term vector model''' is an algebraic model for representing text documents (
| last1 = Berry | first1 = Michael W.
| last2 = Drmac | first2 = Zlatko
| last3 = Jessup | first3 = Elizabeth R.
| date = January 1999
| doi = 10.1137/s0036144598347035
| issue = 2
| journal = SIAM Review
| pages = 335–362
| title = Matrices, Vector Spaces, and Information Retrieval
| volume = 41}}</ref>
==Definitions==
In this section we consider a particular vector space model based on the [[Bag-of-words model|bag-of-words]] representation. Documents and queries are represented as vectors.
▲:<math>d_j = ( w_{1,j} ,w_{2,j} , \dotsc ,w_{t,j} )</math>
:<math>q = ( w_{1,q} ,w_{2,q} , \dotsc ,w_{n,q} )</math>
Line 12 ⟶ 22:
The definition of ''term'' depends on the application. Typically terms are single words, [[keyword (linguistics)|keyword]]s, or longer phrases. If words are chosen to be the terms, the dimensionality of the vector is the number of words in the vocabulary (the number of distinct words occurring in the [[text corpus|corpus]]).
Vector operations can be used to compare documents with queries.<ref name=":0">{{Cite book |last=Büttcher |first=Stefan |title=Information retrieval: implementing and evaluating search engines |last2=Clarke |first2=Charles L. A. |last3=Cormack |first3=Gordon V. |date=2016 |publisher=The MIT Press |isbn=978-0-262-52887-0 |edition=First MIT Press paperback |___location=Cambridge, Massachusetts London, England}}</ref>
==Applications==
Candidate documents from the corpus can be retrieved and ranked using a variety of methods. [[Relevance (information retrieval)|Relevance]] [[ranking]]s of documents in a keyword search can be calculated, using the assumptions of [[semantic similarity|document similarities]] theory, by comparing the deviation of angles between each document vector and the original query vector where the query is represented as a vector with same dimension as the vectors that represent the other documents.▼
▲[[Image:vector space model.jpg|right|250px]]
▲[[Relevance (information retrieval)|Relevance]] [[ranking]]s of documents in a keyword search can be calculated, using the assumptions of [[semantic similarity|document similarities]] theory, by comparing the deviation of angles between each document vector and the original query vector where the query is represented as a vector with same dimension as the vectors that represent the other documents.
In practice, it is easier to calculate the [[cosine]] of the angle between the vectors, instead of the angle itself:
Line 34 ⟶ 43:
Using the cosine the similarity between document ''d<sub>j</sub>'' and query ''q'' can be calculated as:
:<math>\mathrm{cos}(d_j,q) = \frac{\mathbf{d_j} \cdot \mathbf{q}}{\left\| \mathbf{d_j} \right\| \left \| \mathbf{q} \right\|} = \frac{\sum _{i=1}^N
As all vectors under consideration by this model are
== Term frequency–inverse document frequency (if–idf) weights==
In the classic vector space model proposed by [[Gerard Salton|Salton]], Wong and Yang
▲In the classic vector space model proposed by [[Gerard Salton|Salton]], Wong and Yang <ref>[http://doi.acm.org/10.1145/361219.361220 G. Salton , A. Wong , C. S. Yang, A vector space model for automatic indexing], Communications of the ACM, v.18 n.11, p.613-620, Nov. 1975</ref> the term-specific weights in the document vectors are products of local and global parameters. The model is known as [[tf-idf|term frequency-inverse document frequency]] model. The weight vector for document ''d'' is <math>\mathbf{v}_d = [w_{1,d}, w_{2,d}, \ldots, w_{N,d}]^T</math>, where
:<math>
Line 51 ⟶ 59:
==Advantages==
The vector space model has the following advantages over the [[Standard Boolean model]]:
#Allows ranking documents according to their possible relevance
#Allows retrieving items with a partial
Most of these advantages are a consequence of the difference in the density of the document collection representation between Boolean and
==Limitations==
The vector space model has the following limitations:
#Query terms are assumed to be independent, so phrases might not be represented well in the ranking
#Semantic sensitivity; documents with similar context but different term vocabulary won't be associated
▲#Semantic sensitivity; documents with similar context but different term vocabulary won't be associated, resulting in a "[[false negative]] match".
Many of these difficulties can, however, be overcome by the integration of various tools, including mathematical techniques such as [[singular value decomposition]] and [[lexical database]]s such as [[WordNet]].
==Models based on and extending the vector space model==
Models based on and extending the vector space model include:
* [[Generalized vector space model]]
Line 82 ⟶ 80:
* [[Rocchio Classification]]
* [[Random indexing]]
* [[Search Engine Optimization]]
==Software that implements the vector space model==
{{further information|Vector database}}
The following software packages may be of interest to those wishing to experiment with vector models and implement search services based upon them.
===Free open source software===
* [[
* [[
* [[Gensim]] is a Python+[[NumPy]] framework for Vector Space modelling. It contains incremental (memory-efficient) algorithms for [[
▲* [[Elasticsearch]]. Another high-performance, full-featured text search engine using Lucene.
▲* [[Gensim]] is a Python+[[NumPy]] framework for Vector Space modelling. It contains incremental (memory-efficient) algorithms for [[Tf–idf]], [[Latent Semantic Indexing]], [[Locality_sensitive_hashing#Random_projection|Random Projections]] and [[Latent Dirichlet Allocation]].
* [[Weka (machine learning)|Weka]]. Weka is a popular data mining package for Java including WordVectors and [[Bag-of-words model|Bag Of Words models]].
* [[Word2vec]]. Word2vec uses vector spaces for word embeddings.
==Further reading==
* [[Gerard Salton|G. Salton]] (1962), "[https://dl.acm.org/citation.cfm?id=1461544 Some experiments in the generation of word and document associations]" ''Proceeding AFIPS '62 (Fall) Proceedings of the December
▲* [[Gerard Salton|G. Salton]] (1962), "[https://dl.acm.org/citation.cfm?id=1461544 Some experiments in the generation of word and document associations]" ''Proceeding AFIPS '62 (Fall) Proceedings of the December 4-6, 1962, fall joint computer conference'', pages 234-250. ''(Early paper of Salton using the term-document matrix formalization)''
* [[Gerard Salton|G. Salton]], A. Wong, and C. S. Yang (1975), "[https://dl.acm.org/citation.cfm?id=361220 A Vector Space Model for Automatic Indexing]" ''Communications of the ACM'', vol. 18, nr. 11, pages 613–620. ''(Article in which a vector space model was presented)''
* David Dubin (2004), [
* [https://web.archive.org/web/20110814000253/http://
* [http://www.miislita.com/term-vector/term-vector-3.html Description of the classic vector space model by Dr E. Garcia]
* [http://nlp.stanford.edu/IR-book/html/htmledition/vector-space-classification-1.html Relationship of vector space search to the "k-Nearest Neighbor" search]
==See also==
{{cmn|
*[[Bag-of-words model]]
*[[Champion list]]
*[[Compound term processing]]
*[[Conceptual space]]
Line 113 ⟶ 112:
*[[Sparse distributed memory]]
*[[w-shingling]]
}}
==References==
{{reflist}}
[[Category:Vector space model|
|