KNN - K Nearest neighbours
Machine Learning models make predictions from the past data available.
- KNN is one of the simplest Supervised ML algorithm mostly used for Classification. It classifies based on how its neighbors are classified.
- KNN stores available cases and classifies new cases based on similarity measure
- Choice of K - sqrt(N)
- Lazy learning algorithm
How does (kids) teach kids to learn differentiate between cat & dog:
- type of claws, ear length, sound(bark vs meow), plays around vs not
- kids identify given animal based on feature classification
Uses Cases:
- Recommended systems- biggest use case in real-time
- online shopping, OTT platforms, advertisement
- Content Search- documents having similar topics from billions of documents
- Image & video recolonization
- Height, weight -> derive T shirt size
- Predict dog category
- Predict Over weight or not based on height & weight
- Predict Over Diabetes
- Pregnancies, Glucose, BP, Skin thickness, insulin, BMI, diabetes pedegree function, age
- Sport liked based on age & Gender
- Collaborative filtering & content based filtering
- iphone with airpods
- 2 users reading same article. recommend artiles
- Movies
- Movie(movie id, title) & rating(user, movie,rating) details
- create pivot matrix by user
- using cosine similarity
Cosine Similarity & Cosine distance
- Used in Recommendation systems
- Cosine similarity is angle between two points.
- cos-similarity = cos(theta) = angle between two points
- cos-similarity ranges between -1 and 1
Movie Recommendation system
- Movie recommendation based on average Weighted value with simple correlation
- weighted rating = (mean rating for the movie * number of votes) + (mean vote across the whole report * min votes required to be listed in top 250)/(number of votes for movie +
min votes required to be listed in top 250) - Two types of recommendation systems
- Content based filtering(based on type of content/movie)
- This is based on content- movie summary using NLP tf-idf
- Movies are recommended based on category of movie
- eg: Netflix
- Action, Comedy, Romantic, Adventure,
- Geners, cast, crew, language, popularity, country, release_date, revenue,
- Collaborative filtering
- Recommendation is based on user behavior (like minded people behavior)
- eg: Amazon site- recommendations to buy ear phones, headcover
- Collab multiple users based on behavior, pattern.
- Here it tries to behavior of user rather than type of movie
KNN- Nearest neighbor item based on collaborative filtering
Pearson Correlation
Comments
Post a Comment