From the course: Introduction to AI-Native Vector Databases

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Challenge: Working with vectors

Challenge: Working with vectors

In this chapter, we covered the difference between structured and unstructured data, how we might represent unstructured data as vectors, how you can visualize these vectors, and how you can measure the distance between vectors. Now it's time to apply this knowledge with a challenge. Given two color vectors with coordinates of RGB values, can you write a Python program that first can be used to draw out the vectors for these colors? Second, calculate the Euclidean, Manhattan, cosine, and dot product distance between these colors. Can you also come up with a color that has a smaller cosine distance from the first vector? Take some time to work on this challenge, and once you've come up with a solution, meet me in the next video where I'll walk you through what I did.

Contents