Recommender Systems

5 试题

1.

Suppose you run a bookstore, and have ratings (1 to 5 stars)

of books. Your collaborative filtering algorithm has learned

a parameter vector θ(j) for user j, and a feature

vector x(i) for each book. You would like to compute the

"training error", meaning the average squared error of your

system's predictions on all the ratings that you have gotten

from your users. Which of these are correct ways of doing so (check all that apply)?

For this problem, let m be the total number of ratings you

have gotten from your users. (Another way of saying this is

that m=∑nmi=1∑nuj=1r(i,j)). [Hint: Two of the four options below are correct.]

1m∑nuj=1∑i:r(i,j)=1(∑nk=1(θ(k))jx(k)i−y(i,j))2

1m∑(i,j):r(i,j)=1((θ(j))Tx(i)−r(i,j))2

1m∑(i,j):r(i,j)=1((θ(j))Tx(i)−y(i,j))2

1m∑nmi=1∑j:r(i,j)=1(∑nk=1(θ(j))kx(i)k−y(i,j))2

2.

In which of the following situations will a collaborative filtering system be the most appropriate learning algorithm (compared to linear or logistic regression)?

You've written a piece of software that has downloaded news articles from many news websites. In your system, you also keep track of which articles you personally like vs. dislike, and the system also stores away features of these articles (e.g., word counts, name of author). Using this information, you want to build a system to try to find additional new articles that you personally will like.

You manage an online bookstore and you have the book ratings from many users. You want to learn to predict the expected sales volume (number of books sold) as a function of the average rating of a book.

You run an online news aggregator, and for every user, you know some subset of articles that the user likes and some different subset that the user dislikes. You'd want to use this to find other articles that the user likes.

You manage an online bookstore and you have the book ratings from many users. For each user, you want to recommend other books she will enjoy, based on her own ratings and the ratings of other users.

3.

You run a movie empire, and want to build a movie recommendation system based on collaborative filtering. There were three popular review websites (which we'll call A, B and C) which users to go to rate movies, and you have just acquired all three companies that run these websites. You'd like to merge the three companies' datasets together to build a single/unified system. On website A, users rank a movie as having 1 through 5 stars. On website B, users rank on a scale of 1 - 10, and decimal values (e.g., 7.5) are allowed. On website C, the ratings are from 1 to 100. You also have enough information to identify users/movies on one website with users/movies on a different website. Which of the following statements is true?

It is not possible to combine these websites' data. You must build three separate recommendation systems.

Assuming that there is at least one movie/user in one database that doesn't also appear in a second database, there is no sound way to merge the datasets, because of the missing data.

You can combine all three training sets into one without any modification and expect high performance from a recommendation system.

You can merge the three datasets into one, but you should first normalize each dataset's ratings (say rescale each dataset's ratings to a 1-100 range).

4.

Which of the following are true of collaborative filtering systems? Check all that apply.

When using gradient descent to train a collaborative filtering system, it is okay to initialize all the parameters (x(i) and θ(j)) to zero.

If you have a dataset of user ratings on some products, you can uses these to predict one user's preferences on products he has not rated.

Recall that the cost function for the content-based recommendation system is J(θ)=12∑nuj=1∑i:r(i,j)=1((θ(j))Tx(i)−y(i,j))2+λ2∑nuj=1∑nk=1(θ(i)k)2. Suppose there is only one user and he has rated every movie in the training set. This implies that nu=1 and r(i,j)=1 for every i,j. In this case, the cost function J(θ) is equivalent to the one used for regularized linear regression.

To use collaborative filtering, you need to manually design a feature vector for every item (e.g., movie) in your dataset, that describes that item's most important properties.

5.

Suppose you have two matrices A and B, where A is 5x3 and B is 3x5. Their product is C=AB, a 5x5 matrix. Furthermore, you have a 5x5 matrix R where every entry is 0 or 1. You want to find the sum of all elements C(i,j) for which the corresponding R(i,j) is 1, and ignore all elements C(i,j) where R(i,j)=0. One way to do so is the following code:

Which of the following pieces of Octave code will also correctly compute this total? Check all that apply. Assume all options are in code.

total = sum(sum((A * B) .* R))

C = A * B; total = sum(sum(C(R == 1)));

C = (A * B) * R; total = sum(C(:));

total = sum(sum(A(R == 1) * B(R == 1));

Machine Learning week 9 quiz: Recommender Systems相关推荐

  1. Machine Learning week 9 quiz: programming assignment-Anomaly Detection and Recommender Systems

    一.ex8.m %% Machine Learning Online Class % Exercise 8 | Anomaly Detection and Collaborative Filterin ...

  2. Learning Tree-based DeepModel for Recommender Systems

    摘要 已经研究了用于推荐系统的基于模型的方法以提供更精确的结果.在具有大型语料库的系统中,预测所有用户 - 项目对的偏好的学习模型的计算量是巨大的,这使得该模型难以直接用于候选推荐生成阶段.为了克服计 ...

  3. Machine Learning week 11 quiz: Application: Photo OCR

    Application: Photo OCR 5 试题 1. Suppose you are running a sliding window detector to find text in ima ...

  4. Machine Learning week 10 quiz: Large Scale Machine Learning

    Large Scale Machine Learning 5 试题 1. Suppose you are training a logistic regression classifier using ...

  5. Machine Learning week 8 quiz: programming assignment-K-Means Clustering and PCA

    一.ex7.m %% Machine Learning Online Class % Exercise 7 | Principle Component Analysis and K-Means Clu ...

  6. Machine Learning week 7 quiz: programming assignment-Support Vector Machines

    一.ex6.m %% Machine Learning Online Class % Exercise 6 | Support Vector Machines % % Instructions % - ...

  7. Machine Learning week 6 quiz: Machine Learning System Design

    Machine Learning System Design 5 试题 1. You are working on a spam classification system using regular ...

  8. Machine Learning week 6 quiz: programming assignment-Regularized Linear Regression and Bias/Variance

    一.ex5.m %% Machine Learning Online Class % Exercise 5 | Regularized Linear Regression and Bias-Varia ...

  9. Machine Learning week 5 quiz: programming assignment-Multi-Neural Network Learning

    一.ex4.m %% Machine Learning Online Class - Exercise 4 Neural Network Learning% Instructions % ------ ...

最新文章

  1. 命令行编译运行CSharp文件
  2. Howto: Deploy VC2008 apps without installing vcredist_x86.exe
  3. kill()函数 详解
  4. position:fixed和scroll实现div浮动【示例】
  5. ArcGIS实验教程——实验十:矢量数据投影变换
  6. 登录时本地保存账号密码及关闭ARC的方法
  7. 缓冲文件系统(fopen/fread/fwrite)和非缓冲文件系统(open/read/write)
  8. 数据看穿一生:前半生赚钱养娃,后半生赚钱买命
  9. 05MySQL基本操作
  10. [ Problem 1 ] 数独游戏
  11. 华三交换机如何进入配置_H3C交换机应该如何安装配置解析
  12. 用条件断点寻找E盾的登录、合法、算法和取服务器数据CALL
  13. 华三模拟器(防火墙)实现IPSEC穿越NAT实验
  14. The TARGETDIR variable must be provided when invoking this installer的解决方案
  15. 行为型模式:备忘录模式
  16. 【python】使用py3-bencode打开torrent文件
  17. 解决微信公众平台IP白名单
  18. 鼠标经过文字显示隐藏图片css样式
  19. 如何从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 “Jammy Jellyfish”|Linux 中国
  20. 《算法图解》读书笔记—像小说一样有趣的算法入门书

热门文章

  1. 逻辑回归评分卡实现和评估
  2. Java 8 - 正确高效的使用并行流
  3. Apache Kafka-生产者_批量发送消息的核心参数及功能实现
  4. Spring Cloud【Finchley】-04使用Ribbon实现客户端负载均衡
  5. c语言 1 2是什么类型,C语言2-C数据类型(1).docx
  6. adb打开网页_adb命令打开手机设置页面
  7. cubase怎么添加midi设备_Cubase教程丨20分钟快速上手Cubase(下)
  8. 2021-10-27 PTA 数据结构 链表 两个有序链表序列的合并
  9. 道格拉斯-普克 Douglas-Peuker(DP算法) python java实现
  10. Linux 初始root密码设置