Perfume Recommendation with Sentence-BERT

Tahir
2 min readJan 23, 2023

--

I recently completed a guided project where I delved into the world of natural language processing and learned about Sentence-BERT, a powerful tool for transforming unstructured text data into semantically meaningful sentence embeddings. These embeddings can then be compared using similarity metrics such as cosine-similarity, which is a measure of the similarity between two non-zero vectors of an inner product space

In this project, I applied Sentence-BERT to a dataset of perfume notes and used the resulting embeddings to build a recommender system that suggests similar types of perfumes based on their notes.

365 Days of my Data Science Journey

The goal of this project was to develop a recommender system that could output similar types of perfumes based on the notes of a given perfume. To achieve this, I first had to collect a dataset of perfume notes and their corresponding perfume names. I then used Sentence-BERT to transform these notes into embeddings, which I stored in a database.

One of the key challenges I faced was finding a way to compare the embeddings in a meaningful way. To do this, I employed the cosine-similarity metric, which measures the similarity between two vectors by calculating the cosine of the angle between them. I implemented a similarity search algorithm that used cosine-similarity to find the most similar perfumes to a given perfume. The algorithm took the embeddings of the notes of the given perfume as input and compared them to the embeddings of the notes of all other perfumes in the database. The perfumes with the highest cosine-similarity scores were then returned as the most similar perfumes.

The results were impressive, with the recommender system able to accurately identify perfumes with similar notes and recommend them to users.

Overall, this project was an incredible learning experience and has given me a deeper understanding of the capabilities of Sentence-BERT and its potential applications in the field of natural language processing. I am excited to continue exploring this topic and seeing how it can be used to improve various industries and applications.

Github Repo

#linkedin #project #data #smr #sentence #bert #recommendation #recommender #recommendersystem #recommend #recommendationsystem #recommandedata #recommendationalgorithm #perfume #machinelearning #ml #embeddings #embedding #cosinesimilar

Read More

How TikTok Uses Algorithms And Collaborative Filtering To Make You Addicted

Credit Card Fraud Detection using Scikit-Learn and SnapML

Data Visualization Using Google Analytics and Google Data Studio

--

--