> For the complete documentation index, see [llms.txt](https://movie-team.gitbook.io/movieteam/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://movie-team.gitbook.io/movieteam/movies/undefined-2.md).

# 추천 알고리즘

## 장르 유사도 기반 추천 알고리즘

<mark style="color:blue;">`GET`</mark> `http://127.0.0.1:8000/api/movies/<int:movie_pk>/genre_recommendation/`

#### Headers

| Name                                            | Type   | Description                   |
| ----------------------------------------------- | ------ | ----------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | "Bearer" + 발급 받은 access token |

{% tabs %}
{% tab title="200: OK 특정 영화와 장르가 유사한 영화 리스트 정렬" %}

{% endtab %}
{% endtabs %}

## 영화 이상형 월드컵 정보 제공

<mark style="color:blue;">`GET`</mark> `http://127.0.0.1:8000/api/movies/worldcup/`

#### Headers

| Name                                            | Type   | Description                   |
| ----------------------------------------------- | ------ | ----------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | "Bearer" + 발급 받은 access token |

## 월드컵 결과를 기반으로 한 추천 알고리즘

<mark style="color:green;">`POST`</mark> `http://127.0.0.1:8000/api/movies/worldcup/`

#### Request Body

| Name                                  | Type   | Description                   |
| ------------------------------------- | ------ | ----------------------------- |
| val<mark style="color:red;">\*</mark> | Object | {movie\_id:wins(int)} 형식으로 제공 |

{% tabs %}
{% tab title="200: OK 우승 영화와 추천 영화 리스트 제공" %}

```
{
  winner: winner_movie,
  recommend: movie_list,
}
```

{% endtab %}
{% endtabs %}

## 유저 유사도 기반 추천 알고리즘

<mark style="color:blue;">`GET`</mark> `http://127.0.0.1:8000/api/movies/user_based_recommendation/`

유저의 영화 평점을 바탕으로 코사인 유사도를 구하고, 가장 높은 유저 순으로 자신의 평균 평점 이상으로 평가한 영화를 추천

{% tabs %}
{% tab title="200: OK 비슷한 유저가 좋게 평가한 영화 리스트 제공" %}

{% endtab %}
{% endtabs %}
