Cosine Similarity For Vectorspaces

Learning goals

1. Be familiar with the the vector space model for text documents
2. Be aware of term frequency and (inverse) document frequency
3. Have reviewed the definitions of base and dimension
4. Realize that the angle between two vectors can be seen as a similarity measure

Script

The slides can be found at File:Cosine-Similarity-For-Vectorspaces.pdf

Quiz

1 Calculate the scalar product between ${\displaystyle {\begin{pmatrix}2\\2\\5\end{pmatrix}}}$ and ${\displaystyle {\begin{pmatrix}2\\3\\0\end{pmatrix}}}$.

 9 10 14 54

2 What is true about the distance measures on vector spaces?

 they can have arbitrary large distances the cosine distance can be arbitrary large the euclidean distance is bound to a value of ${\displaystyle 2\pi }$ they can be transformed to a similarity measure
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 3, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9912011027336121, "perplexity": 371.9601971029223}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-21/segments/1620243992516.56/warc/CC-MAIN-20210516075201-20210516105201-00129.warc.gz"}