Uploaded February 2024 | Updated September 2026, 2 weeks ago
ðð£ð©ð§ð€ððªððð£ð ðð€ðð§ðð©ððð ðŸðððððð
socratica.com/collections
Cosine Similarity is a way to compare two pieces of text (docs) to see how similar they are stylistically. This is a useful technique from Natural Language Processing, a growing subfield of AI & Machine Learning. In this lesson, we review how to use the bag of words technique to turn a piece of text into a vector, then show how the 'cosine similarity' measure is a useful way to compare two docs. As a concrete application, we compare 10 different classic novels from different authors and time periods to see how well the cosine similarity measure performs.
ðð€ðª ððð£ ððªð¢ð¥ ð©ð€ ðšððð©ðð€ð£ðš ð€ð ð©ðð ð«ðððð€ ððð§ð:
0:00 Intro
0:48 Prerequisites
1:43 The Big Idea
3:39 Cosine Similarity
4:42 Example setup
5:47 The Books
6:51 Building a Feature Vector
8:56 Writing the Functions
10:08 Computing Cosine similarities
11:30 No Stop Words
12:50 Analysis
14:00 No Nouns
ððŒððŸð ðððð:
Bag of Words
youtu.be/kLMhePA3BiY
Use Mathematica for Free
youtu.be/rGzmG1uXklM
BTWâSocratica offers a pro course, 'Mathematica Essentials,' providing key concepts for mastering Wolfram products:
socratica.com/courses/mathematica-essentials
Thank you to our VIP Patreon Members who helped make this video possible!
José Juan Francisco Castillo Rivera
KW
M Andrews
Jim Woodworth
Marcos Silveira
Christopher Kemsley
Eric Eccleston
Jeremy Shimanek
Michael Shebanow
Alvin Khaled
Kevin B
John Krawiec
Umar Khan
Tracy Karin Prell
â Thank you kind friends! ððŠ
â·â·â·
We recommend the following (affiliate links):
The Wolfram Language
amzn.to/3D4jqvz
The Mythical Man Month - Essays on Software Engineering & Project Management
amzn.to/2tYdNeP
Innumeracy: Mathematical Illiteracy and Its Consequences
amzn.to/2ri1nf7
Mindset by Carol Dweck
amzn.to/2q9y8Nj
How to Be a Great Student (our first book!)
ebook: amzn.to/2Lh3XSP
Paperback: amzn.to/3t5jeH3
Kindle Unlimited: amzn.to/3atr8TJ
â·â·â·
If you find our work at Socratica valuable, please consider becoming our Patron on Patreon!
patreon.com/socratica
If you would prefer to make a one-time donation, you can also use
Socratica Paypal
paypal.me/socratica
â·â·â·
Written & Produced by Michael Harrison & Kimberly Hatch Harrison
Edited by Megi Shuke
About our Instructors:
Michael earned his BS in Math from Caltech, and did his graduate work in Math at UC Berkeley and University of Washington, specializing in Number Theory. A self-taught programmer, Michael taught both Math and Computer Programming at the college level. He applied this knowledge as a financial analyst (quant) and as a programmer at Google.
Kimberly earned her BS in Biology and another BS in English at Caltech. She did her graduate work in Molecular Biology at Princeton, specializing in Immunology and Neurobiology. Kimberly spent 16+ years as a research scientist and a dozen years as a biology and chemistry instructor.
Michael and Kimberly Harrison co-founded Socratica.
Their mission? To create the education of the future.
â·â·â·
Welcome to Socratica! We make SMART videos focusing on STEM - science, math, programming. Subscribe here: bit.ly/SocraticaSubscribe
PLAYLISTS
Study Tips bit.ly/StudyTipsPlaylist
Python programming bit.ly/PythonSocratica
SQL programming bit.ly/SQL_Socratica
Chemistry bit.ly/Chemistry_Playlist
Abstract Algebra bit.ly/AbstractAlgebra
Astronomy bit.ly/AstronomySocratica
Biology bit.ly/BiologySocratica
Calculus bit.ly/CalculusSocratica
Geometry bit.ly/GeometrySocratica
Mathematica bit.ly/SocraticaMathematica
#cosinesimilarity #AI #naturallanguageprocessing
ðð£ð©ð§ð€ððªððð£ð ðð€ðð§ðð©ððð ðŸðððððð
socratica.com/collections
Cosine Similarity is a way to compare two pieces of text (docs) to see how similar they are stylistically. This is a useful technique from Natural Language Processing, a growing subfield of AI & Machine Learning. In this lesson, we review how to use the bag of words technique to turn a piece of text into a vector, then show how the 'cosine similarity' measure is a useful way to compare two docs. As a concrete application, we compare 10 different classic novels from different authors and time periods to see how well the cosine similarity measure performs.
ðð€ðª ððð£ ððªð¢ð¥ ð©ð€ ðšððð©ðð€ð£ðš ð€ð ð©ðð ð«ðððð€ ððð§ð:
0:00 Intro
0:48 Prerequisites
1:43 The Big Idea
3:39 Cosine Similarity
4:42 Example setup
5:47 The Books
6:51 Building a Feature Vector
8:56 Writing the Functions
10:08 Computing Cosine similarities
11:30 No Stop Words
12:50 Analysis
14:00 No Nouns
ððŒððŸð ðððð:
Bag of Words
youtu.be/kLMhePA3BiY
Use Mathematica for Free
youtu.be/rGzmG1uXklM
BTWâSocratica offers a pro course, 'Mathematica Essentials,' providing key concepts for mastering Wolfram products:
socratica.com/courses/mathematica-essentials
Thank you to our VIP Patreon Members who helped make this video possible!
José Juan Francisco Castillo Rivera
KW
M Andrews
Jim Woodworth
Marcos Silveira
Christopher Kemsley
Eric Eccleston
Jeremy Shimanek
Michael Shebanow
Alvin Khaled
Kevin B
John Krawiec
Umar Khan
Tracy Karin Prell
â Thank you kind friends! ððŠ
â·â·â·
We recommend the following (affiliate links):
The Wolfram Language
amzn.to/3D4jqvz
The Mythical Man Month - Essays on Software Engineering & Project Management
amzn.to/2tYdNeP
Innumeracy: Mathematical Illiteracy and Its Consequences
amzn.to/2ri1nf7
Mindset by Carol Dweck
amzn.to/2q9y8Nj
How to Be a Great Student (our first book!)
ebook: amzn.to/2Lh3XSP
Paperback: amzn.to/3t5jeH3
Kindle Unlimited: amzn.to/3atr8TJ
â·â·â·
If you find our work at Socratica valuable, please consider becoming our Patron on Patreon!
patreon.com/socratica
If you would prefer to make a one-time donation, you can also use
Socratica Paypal
paypal.me/socratica
â·â·â·
Written & Produced by Michael Harrison & Kimberly Hatch Harrison
Edited by Megi Shuke
About our Instructors:
Michael earned his BS in Math from Caltech, and did his graduate work in Math at UC Berkeley and University of Washington, specializing in Number Theory. A self-taught programmer, Michael taught both Math and Computer Programming at the college level. He applied this knowledge as a financial analyst (quant) and as a programmer at Google.
Kimberly earned her BS in Biology and another BS in English at Caltech. She did her graduate work in Molecular Biology at Princeton, specializing in Immunology and Neurobiology. Kimberly spent 16+ years as a research scientist and a dozen years as a biology and chemistry instructor.
Michael and Kimberly Harrison co-founded Socratica.
Their mission? To create the education of the future.
â·â·â·
Welcome to Socratica! We make SMART videos focusing on STEM - science, math, programming. Subscribe here: bit.ly/SocraticaSubscribe
PLAYLISTS
Study Tips bit.ly/StudyTipsPlaylist
Python programming bit.ly/PythonSocratica
SQL programming bit.ly/SQL_Socratica
Chemistry bit.ly/Chemistry_Playlist
Abstract Algebra bit.ly/AbstractAlgebra
Astronomy bit.ly/AstronomySocratica
Biology bit.ly/BiologySocratica
Calculus bit.ly/CalculusSocratica
Geometry bit.ly/GeometrySocratica
Mathematica bit.ly/SocraticaMathematica
#cosinesimilarity #AI #naturallanguageprocessing










