-
Notifications
You must be signed in to change notification settings - Fork 500
[SYSTEMDS-3744, SYSTEMDS-3745, SYSTEMDS-3746, SYSTEMDS-3747, SYSTEMDS-3748] Python API Builtin cumsum, cumprod, summin, cummax, cumsumprod #2093
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
Conversation
65b8d15
to
6032c72
Compare
return Matrix(self.sds_context, "replace", named_input_nodes={"target": self, "pattern": pattern, "replacement": replacement}) | ||
|
||
def cumsum(self) -> 'Matrix': | ||
""" Column prefix-sum. (For row-prefix sum, use X.t().cumsum().t()) |
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.
interesting, do we not support cumulative sum on rows?
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.
jep, afaik. It says so in the docu (even Arnab told me yesterday not trust it ^^) and java code suggests it too
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 think we should probably make a task for this, if it really is not supported.
It seems odd to to two transposes to do row cumulative operations.
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.
well, it's fine to add a task even through the focus was always R compliance and R defines it as column-wise cumulative aggregates (unary operation without additional parameters). The same also applies to rev(). Recently some of the operations like roll() are more inspired by numpy and there you have indeed usually axis parameters.
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.
Also when committing this task here lets call it [SYSTEMDS-3744-48] ... and in the future let's create JIRA tasks for groups of operations that belong together. Thanks.
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 have made a task for it and marked it as a student project, unrelated to this PR, such that we do not forget it.
https://issues.apache.org/jira/browse/SYSTEMDS-3762
da4f3fa
to
d69ef96
Compare
the PR should be ready now, I just changed the description of the cumsumprod operator |
…-3748] Python API Builtin cumsum, cumprod, cumsumprod, cummin, cummax
d69ef96
to
febadb9
Compare
reformatted |
[SYSTEMDS-3744, SYSTEMDS-3745, SYSTEMDS-3746, SYSTEMDS-3747, SYSTEMDS-3748] Python API Builtin cumsum, cumprod, summin, cummax, cumsumprod
This patch adds the builtin operators cumsum, cumprod, summin, cummax, cumsumprod to the python api.