diff options
Diffstat (limited to 'src/com/android/tv/recommendation/RecentChannelEvaluator.java')
-rw-r--r-- | src/com/android/tv/recommendation/RecentChannelEvaluator.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/tv/recommendation/RecentChannelEvaluator.java b/src/com/android/tv/recommendation/RecentChannelEvaluator.java index e724f4ce..f4c4877d 100644 --- a/src/com/android/tv/recommendation/RecentChannelEvaluator.java +++ b/src/com/android/tv/recommendation/RecentChannelEvaluator.java @@ -51,9 +51,12 @@ public class RecentChannelEvaluator extends Recommender.Evaluator { if (watchDuration < WATCH_DURATION_MS_LOWER_BOUND) { watchDurationScore = MAX_SCORE_FOR_LOWER_BOUND; } else if (watchDuration < WATCH_DURATION_MS_UPPER_BOUND) { - watchDurationScore = (watchDuration - WATCH_DURATION_MS_LOWER_BOUND) - / (WATCH_DURATION_MS_UPPER_BOUND - WATCH_DURATION_MS_LOWER_BOUND) - * (1 - MAX_SCORE_FOR_LOWER_BOUND) + MAX_SCORE_FOR_LOWER_BOUND; + watchDurationScore = + (watchDuration - WATCH_DURATION_MS_LOWER_BOUND) + / (WATCH_DURATION_MS_UPPER_BOUND + - WATCH_DURATION_MS_LOWER_BOUND) + * (1 - MAX_SCORE_FOR_LOWER_BOUND) + + MAX_SCORE_FOR_LOWER_BOUND; } else { watchDurationScore = 1.0; } @@ -61,4 +64,4 @@ public class RecentChannelEvaluator extends Recommender.Evaluator { } return (maxScore > 0.0) ? maxScore : NOT_RECOMMENDED; } -}
\ No newline at end of file +} |