What are Vectors? | Vector Databases for Beginners | Part 2

Data Science Dojo · Beginner ·🔍 RAG & Vector Search ·7mo ago

Key Takeaways

This video introduces vectors and their history in machine learning research

Full Transcript

The research aspects, the academia aspects started maybe 2003 and they started doing a lot of research into vector embeddings and how you can represent words um meanings with vector representations and then this paper came out around 2013 about wordtovec and this was the first time that the sort of usefulness of vector representations was seen um in sort of more industry applications. Stuff started coming out and this sort of um snowballed into the attention paper and everything we know nowadays which we'll go into a little bit more um coming up. So you can do a bunch of cool things with vectors. Um this is what really got me interested in machine learning. So let's take a look at some weird cool things that vectors can do. Okay, so I mentioned before you can do math with vector embeddings of words. So if we take the vector embedding for queen and we subtract the vector embedding for king, weirdly enough, it's very similar to the value if you take the vector embedding for woman and you subtract the vector embedding for man. Kind of interesting. Um let's look at another example. So if you take uh this is sort of a visual representation of vector embeddings. Um and so you can think of each little box as a color coordinated of the number of a vector embedding. So immediately what stands out is the vector for water looks a lot different than the vector for any of the other terms. Right? And also if you look a little closer like your vector for woman and girl look very similar. Boy and man look very similar. King and queen look a little similar. In water you're missing this blue streak that is in everything else. Um for these terms you have this green one but that's different here. Um super interesting visually sort of encompassing what we humans have learned about these terms. So, when babies learn what a word means, how are they figuring it out? Um, how do they know what a woman corresponds to, what that word corresponds to? So, what are these two things sort of mean? And this is sort of saying that these vectors actually are encoding the meaning of words in some way. Super interesting. Okay, let's take a break. go back to this in a second. For now, I want to talk about a different type of vector um RGB color codes. [clears throat] So, RGB color codes are basically three numbers and each number corresponds to how much red, green or blue in a color. So, every color is made up of various amounts of red, green and blue. And then we use this basically in um any design applications to determine different colors. You can make any color with any with the differing the values of red, green, and blue. So if you set every value to zero, you get black, right? There's no color. If you set all the values to the max value, 255 in RGB color codes, you get white. Um, if you set red to the max value, you obviously get a red. Um, if you set both red and blue to the max value, you get this lovely purple color. And if you set sort of a combination, you can get this color of emerald. Right? So if we look at this in a 3D space, you can see here that similar colors are being grouped together obviously because they have similar values, right? Um so all the yellows are grouped together, all the greens are grouped together, the blues are grouped together, and more different colors are further apart. Okay, so each number is representing how much red, green, or blue is in the color. Funny enough, this is exactly what a vector embedding is when you're talking about vector embeddings in machine learning. It's a sequence of numbers that's representing the meaning. The main difference with RGB color codes is it's it's three numbers, right? And we know exactly what each of those numbers corresponds to, the red, green, or the blue. Vector embeddings are much higher dimensions. They can be thousands of dimensions and we don't exactly know what number corresponds to what feature of the meaning of the word. There's been some interesting research done about this but we we can't be quite sure. But for theoretical purposes, for understanding purposes, you can think of each of the dimensions as encoding sort of a feature of whatever it's encode or whatever it's embedding. So maybe in the vector for cat, one of the one of the numbers corresponds to if it's furry or not. Maybe one of them corresponds to if it's an animal or not, or if it has ears or not. Different things like this. And the same thing happens with images or audio. Um each of these numbers will encode a meaning of the vector or of of the word of the thing it's trying to embed. So that's sort of a highle overview of what vectors are. Um, this freaked me out a little bit. It took me a while to understand. So, don't be um concerned if you don't get it straight away at first. But for now, all you need to know, we can turn words and text and audio and video and images into the string of numbers that encodes its meaning. So that way we can use it in machine learning applications.

Original Description

In part 2, we explore how vector embeddings represent meaning and why they’re so useful in machine learning. In this section, we're going to go over: - The history of vector embeddings in research and industry - Examples of vector math, like word analogies (e.g., king – man + woman ≈ queen) - Visualizing vector embeddings and what they reveal about word meanings - Comparing vector embeddings to RGB color codes for easier understanding - How vectors can encode features of words, images, audio, or video in high-dimensional space Next, we’ll dive deeper into how vector embeddings are used in practical applications and vector search. #vectorembeddings #machinelearning #semanticsearch #ai #deeplearning #embeddings #vectormath #generativeai #datascience #mlforbeginners #vectorsearch . . . Learn data science, AI, and machine learning through our hands-on training programs: https://www.youtube.com/@Datasciencedojo/courses Check our community webinars in this playlist: https://www.youtube.com/playlist?list=PL8eNk_zTBST-EBv2LDSW9Wx_V4Gy5OPFT Check our latest Future of Data and AI Conference: https://www.youtube.com/playlist?list=PL8eNk_zTBST9Wkc6-bczfbClBbSKnT2nI Subscribe to our newsletter for data science content & infographics: https://datasciencedojo.com/newsletter/ Love podcasts? Check out our Future of Data and AI Podcast with industry-expert guests: https://www.youtube.com/playlist?list=PL8eNk_zTBST_jMlmiokwBVfS_BqbAt0z2
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Data Science Dojo · Data Science Dojo · 0 of 60

← Previous Next →
1 Feature Engineering and Predictive Modeling | Data Analytics with R and Azure ML | Community Webinar
Feature Engineering and Predictive Modeling | Data Analytics with R and Azure ML | Community Webinar
Data Science Dojo
2 Data Exploration and Visualization | Beginning Azure ML | Part 3
Data Exploration and Visualization | Beginning Azure ML | Part 3
Data Science Dojo
3 Reading External Data Sources | Beginning Azure ML | Part 2
Reading External Data Sources | Beginning Azure ML | Part 2
Data Science Dojo
4 Importing Data, Accessing, & Creating a New Experiment | Beginning Azure ML | Part 1
Importing Data, Accessing, & Creating a New Experiment | Beginning Azure ML | Part 1
Data Science Dojo
5 Casting Columns & Renaming Columns | Beginning Azure ML | Part 4
Casting Columns & Renaming Columns | Beginning Azure ML | Part 4
Data Science Dojo
6 Scrub Missing Values & Project Columns | Beginning Azure ML | Part 5
Scrub Missing Values & Project Columns | Beginning Azure ML | Part 5
Data Science Dojo
7 Feature Engineering & R Script | Beginning Azure ML | Part 6
Feature Engineering & R Script | Beginning Azure ML | Part 6
Data Science Dojo
8 Building Your First Model | Beginning Azure ML |  Part 7
Building Your First Model | Beginning Azure ML | Part 7
Data Science Dojo
9 Run and Fine-Tune Multiple Models | Beginning Azure ML | Part 8
Run and Fine-Tune Multiple Models | Beginning Azure ML | Part 8
Data Science Dojo
10 Deploying Your First Predictive Model As a Web Service | Beginning Azure ML | Part 9
Deploying Your First Predictive Model As a Web Service | Beginning Azure ML | Part 9
Data Science Dojo
11 Using R API to Obtain Predictions From Your Web Service Beginning Azure ML | Part 10
Using R API to Obtain Predictions From Your Web Service Beginning Azure ML | Part 10
Data Science Dojo
12 Using Python API to Obtain Predictions From Your Web Service | Beginning Azure ML | Part 11
Using Python API to Obtain Predictions From Your Web Service | Beginning Azure ML | Part 11
Data Science Dojo
13 Twitter Sentiment Analysis | Natural Language Processing | Community Webinar
Twitter Sentiment Analysis | Natural Language Processing | Community Webinar
Data Science Dojo
14 Listening to the Melody of the Universe (LIGO Gravitational Waves Presentation) | Community Webinar
Listening to the Melody of the Universe (LIGO Gravitational Waves Presentation) | Community Webinar
Data Science Dojo
15 David Wechsler on the Impact of Data Science Bootcamp
David Wechsler on the Impact of Data Science Bootcamp
Data Science Dojo
16 Andrew Choi on the Impact of Data Science Bootcamp
Andrew Choi on the Impact of Data Science Bootcamp
Data Science Dojo
17 Microsoft's Software Engineer Shares Her Experience with Data Science Bootcamp
Microsoft's Software Engineer Shares Her Experience with Data Science Bootcamp
Data Science Dojo
18 Michael DAndrea on the Impact of Data Science Bootcamp
Michael DAndrea on the Impact of Data Science Bootcamp
Data Science Dojo
19 Data Driven Decision-Making with Data Science Bootcamp: Artem Kopelev's Revelation
Data Driven Decision-Making with Data Science Bootcamp: Artem Kopelev's Revelation
Data Science Dojo
20 Learn the Fundamentals of Data Science: Srinivas Rao's Experience with Data Science Bootcamp
Learn the Fundamentals of Data Science: Srinivas Rao's Experience with Data Science Bootcamp
Data Science Dojo
21 Re-Learning Data Science with Data Science Bootcamp: Analyst's Revelation
Re-Learning Data Science with Data Science Bootcamp: Analyst's Revelation
Data Science Dojo
22 Scale R to Big Data with Hadoop & Spark | Community Webinar
Scale R to Big Data with Hadoop & Spark | Community Webinar
Data Science Dojo
23 Enhancing Skills with Data Science Bootcamp: Sharon Lane-Getaz's Revelation
Enhancing Skills with Data Science Bootcamp: Sharon Lane-Getaz's Revelation
Data Science Dojo
24 Ryan DeMartino on the Impact of Data Science Bootcamp
Ryan DeMartino on the Impact of Data Science Bootcamp
Data Science Dojo
25 Software Engineer at Microsoft Reveals About His Experience with Data Science Bootcamp
Software Engineer at Microsoft Reveals About His Experience with Data Science Bootcamp
Data Science Dojo
26 Wade Wimer on the Impact of Data Science Bootcamp
Wade Wimer on the Impact of Data Science Bootcamp
Data Science Dojo
27 Analyzing Data with Data Science Bootcamp: Hannah Richta's Revelation
Analyzing Data with Data Science Bootcamp: Hannah Richta's Revelation
Data Science Dojo
28 Applying Data Science Skills to The Current Role with Bootcamp: Marcos Lacayo's Revelation
Applying Data Science Skills to The Current Role with Bootcamp: Marcos Lacayo's Revelation
Data Science Dojo
29 Lance Milner on the Impact of Data Science Bootcamp
Lance Milner on the Impact of Data Science Bootcamp
Data Science Dojo
30 Deloitte's Data Scientist Revelation: Learning Predictive Analytics with Data Science Bootcamp
Deloitte's Data Scientist Revelation: Learning Predictive Analytics with Data Science Bootcamp
Data Science Dojo
31 Rajesh Patil's Experience at Data Science Bootcamp As an Enterprise Architect
Rajesh Patil's Experience at Data Science Bootcamp As an Enterprise Architect
Data Science Dojo
32 Michael Atlin on the Impact of Data Science Bootcamp
Michael Atlin on the Impact of Data Science Bootcamp
Data Science Dojo
33 Amina Tariq's In-Person Experience at Data Science Bootcamp
Amina Tariq's In-Person Experience at Data Science Bootcamp
Data Science Dojo
34 Ceo's Revelation about Data Science Bootcamp
Ceo's Revelation about Data Science Bootcamp
Data Science Dojo
35 Stephen Miller Describes His Experience at Data Science Dojo's Bootcamp
Stephen Miller Describes His Experience at Data Science Dojo's Bootcamp
Data Science Dojo
36 Kevin Hillaker on the Impact of Data Science Bootcamp
Kevin Hillaker on the Impact of Data Science Bootcamp
Data Science Dojo
37 Marko Topalovic's Experience with Data Science Bootcamp
Marko Topalovic's Experience with Data Science Bootcamp
Data Science Dojo
38 Text Analytics With Python, Cognitive Services & PowerBI | Data Analytics | Community Webinar
Text Analytics With Python, Cognitive Services & PowerBI | Data Analytics | Community Webinar
Data Science Dojo
39 Unisys Manager's Revelation: Visualizing Real Time Data with Data Science Bootcamp
Unisys Manager's Revelation: Visualizing Real Time Data with Data Science Bootcamp
Data Science Dojo
40 Learn Data Mining with Data Science Bootcamp: Ryan LaBrie's Revelation
Learn Data Mining with Data Science Bootcamp: Ryan LaBrie's Revelation
Data Science Dojo
41 Vang Xiong on the Impact of Data Science Bootcamp
Vang Xiong on the Impact of Data Science Bootcamp
Data Science Dojo
42 Data Scientist's Experience at Our Data Science Bootcamp
Data Scientist's Experience at Our Data Science Bootcamp
Data Science Dojo
43 Alejandro Wolf Yadlin on the Impact of Data Science Bootcamp
Alejandro Wolf Yadlin on the Impact of Data Science Bootcamp
Data Science Dojo
44 Introduction To Titanic Kaggle Competition | Part 1
Introduction To Titanic Kaggle Competition | Part 1
Data Science Dojo
45 Learning How to Code in R with Data Science Bootcamp: Priscilla Mannuel's Revelation
Learning How to Code in R with Data Science Bootcamp: Priscilla Mannuel's Revelation
Data Science Dojo
46 Andrew Berman On Why Data Science Bootcamp Is Better Fit for Him
Andrew Berman On Why Data Science Bootcamp Is Better Fit for Him
Data Science Dojo
47 How To Do Titanic Kaggle Competition in R | Part 3.1
How To Do Titanic Kaggle Competition in R | Part 3.1
Data Science Dojo
48 How to do the Titanic Kaggle competition in R | Part 3.1
How to do the Titanic Kaggle competition in R | Part 3.1
Data Science Dojo
49 Delve Deeper into Data Science with Data Science Bootcamp
Delve Deeper into Data Science with Data Science Bootcamp
Data Science Dojo
50 Bank of America Data Scientist Reveals His Experience of Data Science Bootcamp
Bank of America Data Scientist Reveals His Experience of Data Science Bootcamp
Data Science Dojo
51 Shaena Montanari on the Impact of Data Science Bootcamp
Shaena Montanari on the Impact of Data Science Bootcamp
Data Science Dojo
52 Types of Sampling | Introduction to Data Mining | Part 12
Types of Sampling | Introduction to Data Mining | Part 12
Data Science Dojo
53 Sampling for Data Selection | Introduction to Data Mining | Part 11
Sampling for Data Selection | Introduction to Data Mining | Part 11
Data Science Dojo
54 Data Aggregation | Introduction to Data Mining | Part 10
Data Aggregation | Introduction to Data Mining | Part 10
Data Science Dojo
55 Data Cleaning | Introduction to Data Mining | Part 9
Data Cleaning | Introduction to Data Mining | Part 9
Data Science Dojo
56 Missing & Duplicated Data | Introduction to Data Mining | Part 8
Missing & Duplicated Data | Introduction to Data Mining | Part 8
Data Science Dojo
57 Data Noise | Introduction to Data Mining | Part 7
Data Noise | Introduction to Data Mining | Part 7
Data Science Dojo
58 Graph and Ordered Data | Introduction to Data Mining | Part 5
Graph and Ordered Data | Introduction to Data Mining | Part 5
Data Science Dojo
59 Document Data & Transaction Data | Introduction to Data Mining | Part 4
Document Data & Transaction Data | Introduction to Data Mining | Part 4
Data Science Dojo
60 Data Quality | Introduction to Data Mining | Part 6
Data Quality | Introduction to Data Mining | Part 6
Data Science Dojo

Related Reads

📰
Production RAG for enterprises: evaluation, safety, and cost
Learn how to evaluate and implement production-ready RAG for enterprises, focusing on safety and cost efficiency
Medium · AI
📰
RAG for Financial Docs Is Different. Here’s the Chunking Strategy That Finally Worked.
Learn how to apply a structure-aware chunking strategy to improve RAG for financial documents, overcoming the limitations of generic 512-token chunks
Medium · RAG
📰
RAG: Every Data Type You'll Actually Run Into (Part 2)
Learn to handle real-world data for RAG by understanding common data types and preparing them for vector stores
Medium · LLM
📰
RAG: Every Data Type You'll Actually Run Into (Part 2)
Learn to handle real-world data for RAG by preparing it for vector stores, a crucial step in implementing RAG effectively
Medium · RAG
Up next
OpenAI Embeddings and Vector Databases Crash Course
Adrian Twarog
Watch →