SQL Joins

Image
Joins are used to combine rows from two or more tables based on related columns between them. Joins allow you to retrieve data from multiple tables simultaneously, enabling you to create complex queries that fetch data from different sources. There are different types of joins in SQL, including: INNER JOIN Returns only the rows that have matching values in both tables based on the specified join condition. It discards non-matching rows from both tables. Example:           create table t1(x int); insert into t1 values(1); insert into t1 values(1); insert into t1 values(0); create table t2(y int); insert into t2 values(0); insert into t2 values(1); insert into t2 values(1);           select * from t1 inner join t2 on t1.x = t2.y Output: 2. LEFT JOIN (or) LEFT OUTER JOIN Returns all the rows from the left (or first) table and the matching rows from the right (or second) table. If there is no match, NULL values are

Machine Learning Foundations - Recommender System - Quiz

1) Recommending items based on global popularity can (check all that apply):

a) provide personalization
b) capture context (e.g., time of day)
c) none of the above

2) Recommending items using a classification approach can (check all that apply):

a) provide personalization
b) capture context (e.g., time of day)
c) none of the above

3) Recommending items using a simple count based co-occurrence matrix can (check all that apply):

a) provide personalization
b) capture context (e.g., time of day)
c) none of the above

4) Recommending items using featurized matrix factorization can (check all that apply):

a) provide personalization
b) capture context (e.g., time of day)
c) none of the above

5) Normalizing co-occurrence matrices is used primarily to account for:

a) people who purchased many items
b) items purchased by many people
c) eliminating rare products
d) none of the above

6) A store has 3 customers and 3 products. Below are the learned feature vectors for each user and product. Based on this estimated model, which product would you recommend most highly to User #2?

User ID Feature vector
1 (1.73, 0.01, 5.22)
2 (0.03, 4.41, 2.05)
3 (1.13, 0.89, 3.76)
Product ID Feature vector
1 (3.29, 3.44, 3.67)
2 (0.82, 9.71, 3.88)
3 (8.34, 1.72, 0.02)

a) Product #1
b) Product #2
c) Product #3

7) For the liked and recommended items displayed below, calculate the recall and round to 2 decimal points. (As in the lesson, green squares indicate recommended items, magenta squares are liked items. Items not recommended are grayed out for clarity.) Note: enter your answer in American decimal format (e.g. enter 0.98, not 0,98)

8) For the liked and recommended items displayed below, calculate the precision and round to 2 decimal points. (As in the lesson, green squares indicate recommended items, magenta squares are liked items. Items not recommended are grayed out for clarity.) Note: enter your answer in American decimal format (e.g. enter 0.98, not 0,98)

0.25

9) Based on the precision-recall curves in the figure below, which recommender would you use?

a) RecSys #1
b) RecSys #2
c) RecSys #3

Comments

Post a Comment

Popular posts from this blog

Machine Learning Foundations - Deep Learning Summary - Quiz

Machine Learning Foundation - Deep Learning - Programming Assignment