[Feature] 추천 점수 계산 및 정렬 기능 구현, 태그 점수 업데이트 로직 추가#23
Merged
jihyeonjjang merged 7 commits intodevfrom Jun 11, 2025
Merged
Conversation
- calculateRecommendationScore(for:) 함수 구현 (태그 선호도 + 시간 감쇠, 좋아요 보정, 인기 점수 기반 종합 점수 계산) - 태그 선호 점수에 지수 감쇠 적용하는 decayWeight(for:) 함수 추가 - 조회수, 다운로드 수, 댓글 수에 로그 스케일 적용한 calculatePopularityScore(...) 함수 추가
- RecommendationScorer.calculateRecommendationScore(for:)를 이용해 점수 계산 - 점수 기준으로 영상 정렬하는 sortVideosByRecommendationScore(from:) 함수 구현
giseungNoh
approved these changes
Jun 11, 2025
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 } |
Collaborator
There was a problem hiding this comment.
수고하셨습니다. 혹시 홈 뷰에서 맨처음은 그냥 전체영상 뿌리고 그 다음부터는 이 메서드 이용해서 뿌리면 되는건가요?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
관련 이슈
Fixes #8, #9, #10