Skip to content
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

Is changing Power from an NpElemOperator to an NpPairOperator a good idea? #1010

Closed
wuzhe1234 opened this issue Mar 25, 2022 · 1 comment
Closed
Labels
good first issue question

Comments

@wuzhe1234
Copy link
Contributor

@wuzhe1234 wuzhe1234 commented Mar 25, 2022

In order to achieve the expression like "Power($close, Rank($close, 14))" which is fairly common in fomulla alpha.

I guess we could use following code:

class Power(NpPairOperator): def __init__(self, feature_left, feature_right): super(PairPower, self).__init__(feature_left, feature_right, "power")

Finally, we could add a rpow magic method to Expression class

@wuzhe1234 wuzhe1234 added the question label Mar 25, 2022
@you-n-g
Copy link
Collaborator

@you-n-g you-n-g commented Apr 11, 2022

@wuzhe1234
I think it is a good idea.
Looking forward to your contribution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue question
Projects
None yet
Development

No branches or pull requests

2 participants