
With the development of data science and data mining, some consumer-oriented constitution such as TVB also want to make to use of big data analysis to provide better service to consumers. As over thousands of hours TV content are ready in content library, some of them may not be easily discovered by user. Recommendation technology is an ideal way to provide personalized content to user and encourage user to enjoy our service.
In early times, TVB used collaborative filtering approach to make the predicted recommendation by creating a user-to-item matrix and using SVD (Singular value decomposition) or NMF (Non-negative matrix factorization) to find the similar users or similar items. However, this method can’t predict effectively because they don’t consider the sequential information between services. For example, if a user watched TV programme “The File of Justice I” , then a conventional collaborative filtering may rate “The File of Justice II” and “The File of Justice III” equally as likely. However, we all know that the user will watch “The File of Justice II” before “The File of Justice III”. This requires our model to learn the sequence of the users’ watch behavior.
As the result, we improve the methods using machine learning algorithms to build a two-step approach. Firstly, in the candidate generation stage, thousands of videos available are narrowed down to couple hundreds. Next, in the ranking stage, the surviving videos are further ranked in the order based on a classification neural network. Finally, the top N of the ranked order will be used to serve users.

Step 1: Embed programmes into a vector representation
Word(vector) embedding is an effective way to represent the video itself. Before we feed the sequence of video into the model, we must first transform it into some numerical representation, i.e. Embedding. For example, “Game of Thrones” will be transformed into [0.1, 0.3, -0.6]. A benefit of using the word embedding technique is that it can group videos into similar neighbours without us having to specify or label anything.

Step 2: Prepare the dataset
We casted the recommendation problem into a classification problem. The idea is to train a model to predict if one program is good to be recommended given the view history of a user. Each of the P1, P2… below are the vector we created at the last step. You may just flatten the list of vectors or pass it through an RNN/LSTM layer before further process it with a classification model of your choice. Here, let me just skip the details of that and focus on the training data set preparation.
Step 3: Train model
You can use your choice of the model for classification. There are some of the common algorithms.

Step 4: (Optional) Tweak the model
While we all feel uncomfortable when we add additives into our model, it is good to have tuning mechanism, to make the recommendation results look more like the ones in the business owners’ mind.
Let’s get back to the preparation of training sample. Remember we created this set of training sample from user view histories.

Now, let’s assume P3b, P4b, P5b are the behind-the-scenes of P3, P4, P5 respectively, and the management wants it to be recommended too. In order to tweak the model, we can introduce some additives to the model in this way:

These samples will tell the model that it is good to recommend P3b if it sees a P3 in the last position of the view history.
Conclusion and view
The boosting development of big data analysis technology has helped and driven the traditional consumer-oriented companies work better. They can use more flexible approach like recommendation systems and NLP to provide better services, which can help more companies get to know such technologies and drive the whole industry ecology to be better.
Reference
Predicting your favourite TV Programme
https://medium.com/techattvb/predicting-your-favourite-tv-programme-eda31a5e51b3



