본문 바로가기
AZ ml

음식점 추천 기계학습 모델 결과 해석하기 (6)

by EasyGPT 2016. 1. 13.
반응형

Recommender System  음식점 추천자시스템

Example experiment 예제 실험


For recommender systems, we will use the restaurant recommendation problem as an example: to recommend restaurants for customers based on their rating history.  
추천자시스템의 경우, 음식점 추천 문제를 예로 사용합니다: 고객의 등급 지정 내역을 기반으로 고객에게 음식점을 추천합니다.

The input data consists of three parts: 입력 데이터는 다음 부분으로 구성됩니다.

  • restaurant ratings from customers   고객의 음식점 등급
  • customer feature data                      고객 특성 데이터
  • restaurant feature data                     음식점 특성 데이터

There are several things we can do with Azure Machine Learning’s built-in Train Matchbox Recommender module:  
Azure ML
기본 제공 매치박스 추천 훈련 모듈을 사용하여 여러 가지를 수행할 있습니다.

  • Predict ratings for a given user and item      지정된 사용자와 항목의 등급 예측
  • Recommend items to a given user                지정된 사용자를 위한 항목 추천
  • Find users related to a given user                 지정된 사용자와 관련된 사용자 찾기
  • Find items related to a given item                 지정된 항목과 관련된 항목 찾기

We can choose what we want to do by selecting from the four options in the Recommender prediction kind menu on the right panel.  
오른쪽 패널의 추천자 예측 유형 메뉴에 있는 4개의 옵션에서 선택하여 수행할 사항을 선택할 있습니다.

Here, we will walk through all of the four scenarios.
여기서는 4개의 시나리오 전부를 단계별로 수행합니다.

A typical Azure Machine Learning experiment for recommender system looks like Figure 20.  
추천자시스템의 일반적인 Azure ML 실험은 그림20 같습니다.

For details on how to use those recommender system modules, please see help page for Train Matchbox Recommender and Score Matchbox Recommender
추천자시스템 모듈 사용방법에 대한 자세한 내용은 매치박스 추천 훈련 매치박스 추천 채점 도움말 페이지를 참조하세요.

 

screenshot_of_experiment

 

screenshot_of_experiment

Figure 20 Recommender System Experiment  그림20 추천자시스템 실험


Result interpretation 결과 해석


Predict ratings for a given user and item  특정된 사용자와 항목의 등급 예측

By selecting Rating Prediction in the Recommender prediction kind menu, we ask the recommender system to predict the rating for a given user and item.  
추천자 예측 유형 메뉴에서 등급 예측 선택하여 추천자 시스템에서 지정된 사용자와 항목의 등급을 예측하도록 요청합니다.

The visualization of the Score Matchbox Recommender output looks like Figure 21.  
매치박스 추천 채점 산출물을 시각화하면 그림21 같습니다.

screenshot_of_experiment

Figure 21 Visualize Score Result of Recommender System - Rating Prediction 
그림21 추천자시스템 - 등급 예측의 채점 결과 시각화

 

There are three columns. 3개의 열이 있습니다.

The first two columns are the user-item pairs provided by the input data.  
처음 2열은 입력 데이터가 제공하는 사용자-항목(user-item) 쌍입니다.  

The third column is the predicted rating of a user for a certain item.  
번째 열은 특정 항목에 대한 사용자의 예측 등급(predicted rating)입니다.

For example, in the first row, customer U1048 is predicted to rate restaurant 135026 as 2. 
예를 들어, 첫째 행에서 U1048 고객은 135026 음식점의 등급을 2 지정할 것으로 예측됩니다.


Recommend items to a given user 지정된 사용자에 대한 추천항목


By selecting Item Recommendation in the Recommender prediction kind menu, we ask the recommender system to recommend items to a given user.  
추천자 예측 유형 메뉴에서 추천항목 선택하여 추천자시스템에서 지정된 사용자에게 항목 을 추천하도록 요청합니다.

There is one more parameter we need to choose in this scenario, Recommended item selection.  
시나리오에서는 추천 항목 선택이라는 매개변수를 하나 선택해야 합니다.

The option From Rated Items (for model evaluation) is primarily for model evaluation during the training process.
등급이 지정된 항목에서(모델 평가용) 옵션은 주로 훈련 프로세스 중에 모델 평가용으로 사용 됩니다.

For this prediction stage, we will choose From All Items.
예측 단계에서는 From All Items(모든 항목에서) 선택합니다.

The visualization of the Score Matchbox Recommender output looks like Figure 22.  
매치박스 추천 채점 출력을 시각화하면 그림22 같습니다.

 

screenshot_of_experiment

Figure 22 Visualize Score Result of Recommender System - Item Recommendation
그림22 추천자시스템 - 항목 추천의 채점 결과 시각화


There are six columns. 6 개의 열이 있습니다.

The first column represents the given user IDs to recommend items for, provided by the input data.  
첫째 열은 입력 데이터에서 제공한 항목을 추천받도록 지정된 사용자 ID 나타냅니다.

The rest five columns represent the items recommended to the user, in a descending order in terms of relevance.  
나머지 5 열은 사용자에게 추천될 항목을 나타내며 관련성에 따라 내림차순으로 정렬됩니다.

For example, in the first row, the most recommended restaurant for customer U1048 is 134986, followed by 135018 134975 135021 and 132862. 
예를 들어, 번째 행에서 U1048 고객에게 가장 많이 추천된 음식점은 134986이고, 다음으로 135018 134975 135021 132862 순으로 추천되었습니다.


Find users related to a given user 지정된 사용자와 관련된 사용자 찾기


By selecting Related Users in the “Recommender prediction kind” menu, we ask the recommender system to find related users to a given user.
추천자 예측 유형메뉴에서 관련 사용자를 선택하여 추천시스템에서 지정된 사용자와 관련된 사용자를 찾도록 요청합니다.
Related users are the users who have similar preferences.
관련된 사용자는 기본 설정이 비슷한 사용자 입니다.

There is one more parameter we need to choose in this scenario, Related user selection.
시나리오에서는 관련된 사용자 선택이라는 매개변수를 하나 선택해야 합니다.

The option “From Users That Rated Items (for model evaluation)” is primarily for model evaluation during the training process.
등급을 지정한 사용자로부터(모델 평가용)” 옵션은 주로 학습 프로세스 중에 모델 평가용으로 사용됩니다.

We choose “From All Users” for this prediction stage.
예측 단계에서는From All Users(모든 사용자로부터) 선택합니다.
The visualization of the 
Score Matchbox Recommender output looks like Figure 23.
매치박스 추천 출력을 시각화하면 그림 23 같습니다.

screenshot_of_experiment

Figure 23 Visualize Score Result of Recommender System - Related Users  
그림23 추천자시스템 - 관련 사용자의 채점 결과 시각화

 

There are six columns. 6개의 열이 있습니다.

The first column is the given user IDs to find related users for, provided by input data.  
첫째 열에는 입력 데이터에서 제공된 관련 사용자를 대상이 되는 지정된 사용자 ID입니다.

The rest five columns store the predicted related users of the user, in a descending order in terms of relevance.  
나머지 5 열에는 사용자의 예측 관련 사용자가 저장되어 있고, 관련성에 따라 내림차순으로 정렬됩니다.

For example, in the first row, the most relevant customer for customer U1048 is U1051, followed by U1066 U1044 U1017 and U1072. 
예를 들어, 번째 행에서 U1048 고객과 가장 관련성이 높은 고객은 U1051이고, 뒤를 이어 U1066 U1044 U1017 U1072 순입니다.


Find items related to a given item 지정된 항목과 관련된 항목 찾기


By selecting Related Items in the Recommender prediction kind menu, we ask the recommender system to find related items to a given item.  
추천자 예측 유형 메뉴에서 관련 항목 선택하여 추천자시스템에서 지정된 항목과 관련된 항목을 찾도록 요청합니다.

Related items are the items most likely to be liked by the same user.
관련 항목은 동일한 사용자가 좋아할 가능성이 가장 항목입니다.

There is one more parameter we need to choose in this scenario, Related item selection.
시나리오에서는 관련된 항목 선택이라는 매개변수를 하나 선택해야 합니다.

The option From Rated Items (for model evaluation) is primarily for model evaluation during the training process.
등급이 지정된 항목 옵션(모델 평가용) 주로 훈련과정에서 모델 평가용으로 사용됩니다.

We choose From All Items for this prediction stage.
예측 단계에서는 모든 항목에서(From All Items) 선택합니다.

The visualization of the Score Matchbox Recommender output looks like Figure 24.
매치박스 추천 채점 산출물을 시각화하면 그림24 같습니다.

 

screenshot_of_experiment

Figure 24 Visualize Score Result of Recommender System - Related Items  
그림24 추천자시스템 - 관련 항목의 점수 결과 시각화


There are six columns. 6 개의 열이 있습니다.

The first column represents the given item IDs to find related items for, provided by the input data.   번째 열은 입력 데이터에서 제공한 관련 항목을 찾을 지정된 사용자 ID 나타냅니다.

The other five columns store the predicted related items of the item, in a descending order in terms of relevance.  
나머지 5개의 열에는 항목의 예측 관련 항목이 저장되어 있고, 관련성에 따라 내림차순으로 정렬됩니다.

For example, in the first row, the most relevant item for item 135026 is 135074, followed by 135035 132875 135055 and 134992.
예를 들어, 번째 행에서 135026 항목의 가장 관련성이 높은 항목은 135074이고, 다음은 135035 132875 135055 134992 순입니다.


Web service publication 서비스 게시


The process of publishing these experiments as web services to get predictions is similar for each of the four scenarios.
이러한 실험을 웹서비스로 게시하여 예측을 얻는 프로세스는 4개의 시나리오와 비슷합니다.

Here we will take the second scenario, recommend items to a given user, as an example.
번째 시나리오에서는 지정된 사용자에게 항목을 추천합니다.

You can follow the same procedure with the other three.
다른 가지와 동일한 절차를 따르면 됩니다.

Saving the trained recommender system as a trained model, filtering the input data to a single user ID column as requested, we can hook up the experiment as in Figure 25 and publish it as a web service.  훈련된 추천자시스템을 훈련 모델로 저장하고, 요청된 대로 입력 데이터를 단일 사용자ID 열로 필터링하면, 그림25에서와 같이 실험을 연결하여 웹서비스로 게시할 있습니다.

 

screenshot_of_experiment

Figure 25 Scoring Experiment of Restaurant Recommendation Problem 
그림25 음식점 추천 문제의 실험 채점


Running the web service, the returned result looks like Figure 14.  웹서비스를 실행하면 반환된 결과는 그림14 같습니다.

The five recommended restaurants for user U1048 are 134986, 135018, 134975, 135021 and 132862.  U1048 사용자에게 추천된 5개의 음식점은 134986, 135018, 134975, 135021 132862입니다.

screenshot_of_experiment

 

screenshot_of_experiment

Figure 26 Web Service Result of Restaurant Recommendation Problem
그림26 음식점 추천 문제의 웹서비스 결과

반응형

댓글