-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement time_now for sarplus #1719
Conversation
Codecov Report
@@ Coverage Diff @@
## staging #1719 +/- ##
============================================
+ Coverage 0.00% 23.20% +23.20%
============================================
Files 87 88 +1
Lines 9132 9142 +10
============================================
+ Hits 0 2121 +2121
- Misses 0 7021 +7021
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
query = self._format(""" | ||
SELECT {col_user}, | ||
{col_item}, | ||
SUM( | ||
{col_rating} * | ||
POW(2, (CAST({col_timestamp} AS LONG) - {time_now}) / {time_decay_half_life}) | ||
) AS {col_rating} | ||
FROM {prefix}df_train_input | ||
GROUP BY {col_user}, {col_item} | ||
CLUSTER BY {col_user} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed there is a change and we don't have the exponential anymore. If you get the same data in SAR and SAR+ with the time decay, do you get the same result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Tests to verify are needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
time_now
in SAR+ is not implemented. This PR provides the implementation fortime_now
.TODO:
time_now
time_now
Related Issues
Checklist:
staging branch
and not tomain branch
.