Skip to content

[Feature] 추천 점수 계산 및 정렬 기능 구현, 태그 점수 업데이트 로직 추가#23

Merged
jihyeonjjang merged 7 commits intodevfrom
feature/recommendation-tag-score
Jun 11, 2025
Merged

[Feature] 추천 점수 계산 및 정렬 기능 구현, 태그 점수 업데이트 로직 추가#23
jihyeonjjang merged 7 commits intodevfrom
feature/recommendation-tag-score

Conversation

@jihyeonjjang
Copy link
Copy Markdown
Collaborator

변경 내용

  • 영상 시청 비율 기반 태그 점수 업데이트
  • 추천 점수 계산 로직 구현 (태그, 좋아요, 인기 기반)
  • 추천 점수 기준으로 영상 정렬 기능 추가

관련 이슈

Fixes #8, #9, #10

- calculateRecommendationScore(for:) 함수 구현
  (태그 선호도 + 시간 감쇠, 좋아요 보정, 인기 점수 기반 종합 점수 계산)
- 태그 선호 점수에 지수 감쇠 적용하는 decayWeight(for:) 함수 추가
- 조회수, 다운로드 수, 댓글 수에 로그 스케일 적용한 calculatePopularityScore(...) 함수 추가
- RecommendationScorer.calculateRecommendationScore(for:)를 이용해 점수 계산
- 점수 기준으로 영상 정렬하는 sortVideosByRecommendationScore(from:) 함수 구현
Copy link
Copy Markdown
Owner

@TeddKo TeddKo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Repository owner deleted a comment from korbit-ai Bot Jun 11, 2025
Copy link
Copy Markdown
Collaborator

@kdn0325 kdn0325 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@vinyl-nyl vinyl-nyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다

Comment on lines +14 to +20
func sortVideosByRecommendationScore(from allVideos: [VideoEntity]) -> [VideoEntity] {
let scoredVideos = allVideos.map { video in
let score = RecommendationScorer.calculateRecommendationScore(for: video)
return (video, score)
}

return scoredVideos.sorted { $0.1 > $1.1 }.map { $0.0 }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다. 혹시 홈 뷰에서 맨처음은 그냥 전체영상 뿌리고 그 다음부터는 이 메서드 이용해서 뿌리면 되는건가요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 맞습니다!

@jihyeonjjang jihyeonjjang merged commit e2749dc into dev Jun 11, 2025
@jihyeonjjang jihyeonjjang deleted the feature/recommendation-tag-score branch June 11, 2025 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants