コンテンツ ベースのフィルタリング
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
コンテンツ ベース フィルタリングでは、アイテムの機能を使用して他のアイテムをおすすめしています
過去のアクションや明示的なリクエストに基づいて
ユーザーが好むものと類似しています
できます。
コンテンツ ベースのフィルタリングのデモを行うために、いくつかの機能をハンドエンジニアリングしてみましょう。
ダウンロードしてください次の図は、特徴量行列を示しています。
各行はアプリを表し、各列は機能を表します。機能
カテゴリ(教育、カジュアル、健康など)や
多岐にわたります。簡単に説明すると、この特徴マトリックスはバイナリであるとします。
ゼロ以外の値は、アプリにこの機能があることを意味します。
また、同じ特徴空間でユーザーを表します。ユーザー関連イベントには、
ユーザーが明示的に提供することもできます。たとえばユーザーが
"エンタメアプリ"選択します。暗黙的に指定することも、
アプリを自動インストールできますたとえば、ユーザーが
Science R Us が公開している別のアプリをインストールしました。
モデルは、このユーザーに関連するアイテムをおすすめします。そのためには、
まず類似性指標(ドット積など)を選択します。次に、
システムをセットアップし、この類似性に従って各候補アイテムをスコア付けします。
表示されます。レコメンデーションは、このユーザーに特有のものであり、
他のユーザーに関する情報は使用していませんでした。
類似度尺度としてドット積を使用する
ユーザーのエンベディングと \(x\) アプリが
Embeddings \(y\) はどちらもバイナリ ベクトルです。以降
\(\langle x, y \rangle = \sum_{i = 1}^d x_i y_i\)、
両方に表示される特徴が \(x\) \(y\)
求められます。つまり、 \(\langle x, y \rangle\) は
両方のベクトルで同時にアクティブになる特徴の
ペア数です高
ドット積は、より一般的な特徴を示すため、類似性が高くなります。
実際に試してみましょう。
前述のアプリの問題で、各アプリのドット積を計算します。
その情報を元に、以下の質問に答えてください。
おすすめするアプリ
Science R Us が開発した教育アプリ。
正解です。このアイテムはドット積が最も高くなります
2 でユーザーは科学アプリや教育アプリをとても気に入っています。
Healthcare が作成した健康アプリ。
このアプリのスコアは 1 です。Google が推奨する
最悪の推奨事項ではありません
最善とはいえません
TimeWastr が作成したカジュアル アプリ。
このアプリのドット積が最も小さいのは 0 です。Google
ユーザーはゲームなどのカジュアル アプリに興味がない。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-07-26 UTC。
[null,null,["最終更新日 2024-07-26 UTC。"],[[["\u003cp\u003eContent-based filtering suggests items similar to a user's preferences by analyzing item features and user interactions.\u003c/p\u003e\n"],["\u003cp\u003eUser and item features are represented in a feature matrix, where common features indicate higher similarity.\u003c/p\u003e\n"],["\u003cp\u003eDot product is used as a similarity metric, with higher values indicating stronger relevance between user and item.\u003c/p\u003e\n"],["\u003cp\u003eRecommendations are tailored to individual users based on their specific features and interactions, without using data from other users.\u003c/p\u003e\n"],["\u003cp\u003eThe system identifies the best recommendations by calculating dot products and selecting items with the highest scores.\u003c/p\u003e\n"]]],[],null,["# Content-based filtering uses item features to recommend other items\nsimilar to what the user likes, based on their previous actions or explicit\nfeedback.\n\nTo demonstrate content-based filtering, let's hand-engineer some features\nfor the Google Play store. The following figure shows a feature matrix where\neach row represents an app and each column represents a feature. Features\ncould include categories (such as Education, Casual, Health), the publisher\nof the app, and many others. To simplify, assume this feature matrix is binary:\na non-zero value means the app has that feature.\n\nYou also represent the user in the same feature space. Some of the user-related\nfeatures could be explicitly provided by the user. For example, a user selects\n\"Entertainment apps\" in their profile. Other features can be implicit,\nbased on the apps they have previously installed. For example, the user\ninstalled another app published by Science R Us.\n\nThe model should recommend items relevant to this user. To do so, you must\nfirst pick a similarity metric (for example, dot product). Then, you must\nset up the system to score each candidate item according to this similarity\nmetric. Note that the recommendations are specific to this user, as the model\ndid not use any information about other users.\n\nUsing dot product as a similarity measure\n-----------------------------------------\n\nConsider the case where the user embedding \\\\(x\\\\) and the app\nembedding \\\\(y\\\\) are both binary vectors. Since\n\\\\(\\\\langle x, y \\\\rangle = \\\\sum_{i = 1}\\^d x_i y_i\\\\), a\nfeature appearing in both \\\\(x\\\\) and \\\\(y\\\\) contributes a 1 to\nthe sum. In other words, \\\\(\\\\langle x, y \\\\rangle\\\\) is the number\nof features that are active in both vectors simultaneously. A high\ndot product then indicates more common features, thus a higher similarity.\n\nTry it yourself!\n----------------\n\nCalculate the dot product for each app in the preceding app problem.\nThen use that information to answer the question below: \nWhich app should we recommend? \nThe educational app created by Science R Us. \nYou are correct! This item has the highest dot product at 2. Our user really likes science and educational apps. \nThe health app created by Healthcare. \nThis app scores a 1. It isn't the worst recommendation our system could make, but it certainly isn't the best. \nThe casual app created by TimeWastr. \nThis app actually has the lowest dot product at 0. Our user isn't interested in casual apps like games."]]