Related Tags

machine learning
recommender system
big data

# What is content-based Filtering?

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

## Content-based Filtering

Content-based Filtering is a Machine Learning technique that uses similarities in features to make decisions. This technique is often used in recommender systems, which are algorithms designed to advertise or recommend things to users based on knowledge accumulated about the user.

## Method

This method revolves completely around comparing user interests to product features. The products that have the most overlapping features with user interests are what’s recommended.

Given the significance of product features in this system, it is important to discuss how the user’s favorite features are decided.

Here, two methods can be used (possibly in combination). Firstly, users can be given a list of features out of which they can choose whatever they identify with the most. Secondly, the algorithm can keep track of the products the user has chosen before and add those features to the users’ data.

Similarly, product features can be identified by the developers of the product themselves. Moreover, users can be asked what features they believe identify with the products the most.

Once a numerical value, whether it is a binary 1 or 0 value or an arbitrary number, has been assigned to product features and user interests, a method to identify similarities between products and user interests needs to be identified. A very basic formula would be the dot product. To calculate the dot product the following formula should be used, $\sum_{i=1}^d p_iu_i$ (where $p_i$ is the product feature value and $u_i$ user interest value in column i).

In the table given above, user interest level with Product 1 can be estimated to be $2*1 + 1*1 + 1*2$ , which equals $5$. Similarly, interest in Product 2 will be $1*4 = 4$ and will be $2*3 + 1*1=7$ in Product 3. Hence, Product 3 will be the algorithm’s top recommendation to the user.

## Pros and Cons

This model is easily scalable due to low amounts of data. Moreover, since, unlike other models, this does not need to compare with other users’ data, it can offer niche results specific to the current user.

However, this model requires a fair amount of domain knowledge from the people attributing features to products. So, its accuracy is largely dependent on that knowledge being accurate. Moreover, content-based filtering depends greatly on previously known user interests. Therefore, it is limited in that it’s unable to expand on known user interests.

RELATED TAGS

machine learning
recommender system
big data
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 7, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2676571309566498, "perplexity": 1203.408451353148}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-40/segments/1664030335469.40/warc/CC-MAIN-20220930113830-20220930143830-00252.warc.gz"}