Posts

Showing posts with the label Machine Learning

Recommendation System(Part-3)

Image
  Decomposing the Ratings Average Rating: Sum of all ratings of a user / total ratings Item Bias: If an item is liked by most users it will have positive bias and if not then negative bias. User bias: harsh user? How much does the user deviate from average. Interacting term: True impact of movie on user Learning Biases 1 and 2  are regularization parameters that shrink the biases towards zero when the number of ratings for one item or ratings by a user is small. Alternatively compute bi and bu symmetrically by minimizing the cost function. Larger bi and bu will be close to 0 Adding in the user item interaction term Reducing the number of Parameters The number of users is much larger than the number of items e.g. Netflix Prize data contained 480,189 users and 17770 movies with a total of 100,480,507 ratings. Pratarek proposed modeling the user as a linear combination of item vectors Number of parameters is now O(mk) Recommendation as Subset Selection Out of the not rated items...

Recommendation system(Part-2)

Image
  Collaborative Filtering Biggest Drawback Cold Start for item : Items that are not rated by any user, cannot be recommended. Cold Start for user as well as the users who have not consumed/rated can’t be recommended to Fall back to most popular items (impersonalized) Solution to new user cold start Maximising the probability of a signal (click-bait). Item Latency : The time between an item being introduced to the catalogue and the first time it gets recommended is called item latency. The previous rating formula did not take into consideration whether the user is a harsh rater or not, to take all these into account the formula was updated and the new formula is: This formula tells how far the user is his/her rating for this item going to be. Item Based Collaborative Filtering Looks at the similarity of items Uses cosine similarity between the item i and the item rated by user u k  Looks for items rated by users with similar ratings ti item i. Pearson correlation:  It is u...

Recommendation System(Part-1)

Image
  A recommender system is a system used to predict ratings of an item given by a user and recommend items Types of Recommender System: Content Based Filtering Collaborative Filtering Content Based Filtering   Track what the user consumes Recommend items similar to those consumed in past Need item description Narrow vision Good for new items Collaborative Filtering Track all the users consumption No need for item description Recommend items consumed by users who have a similar consumption pattern to the user of interest. More serendipity Recommend based on the neighbourhood of user Hybrid Filtering Combines the best of two Recommendation can be viewed as a rating prediction problem . Accuracy function is computed using metrics such as: Mean square error MSE: ( (r jk - f (u j - i k )) 2 ) / n Mean absolute error MAE: ( |r jk - f (u j - i k )| ) / n We create  item rating matrix (R), the data Where the rows refer to the users and columns to items, the intersection of...

Text Analysis (Part-7)

Image
  This is the last lecture on Text Analysis and in this we have discussed another  Word Embedding Technique  known as the  GloVe. GloVE The basic idea behind the GloVe word embedding is to derive the relationship between the words from Global Statistics , o ne of the simplest ways is to look at the co-occurrence matrix.  A co-occurrence matrix tells us how often a particular pair of words occur together. Each value in a co-occurrence matrix is a count of a pair of words occurring together. Example:  Consider a sentence in a corpus:  “I play cricket, I love cricket and I love football” . The co-occurrence matrix for the corpus looks like this: Now, we can easily compute the probabilities of a pair of words. For instance, let us consider on the word “cricket”: p(cricket/play)=1 p(cricket/love)=0.5 Next, we can compute the ratio of probabilities: p(cricket/play) / p(cricket/love) = 2 As the ratio > 1 , we can infer that the most  relevant word to ...

Text Analysis (Part-6)

Image
  In the previous lectures we had already covered various important   Text Analysis Technique,  this lecture was not about the technique to perform text analysis but it was about the technique to   faster the process of Text Analysis , this is named as   Locality Sensitive Hashing (LSH). Locality Sensitive Hashing Why LSH? The task of finding nearest neighbours like finding the  similar document  is very common. Although using brute force to check for all possible combinations will give us the exact nearest neighbour but it is not practical for larger data as it is  time consuming . Approximate algorithms to accomplish this task has been an area of active research, although these algorithms don’t guarantee the exact answer, but provide a  good approximation . These algorithms are  faster and scalable .  Locality sensitive hashing (LSH)  is one such algorithm which have various applications. Basic Idea LSH   refers to ...