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

[Feature]: Unary operator to pick an item at index from current X #629

Open
sentialx opened this issue May 22, 2024 · 1 comment
Open

[Feature]: Unary operator to pick an item at index from current X #629

sentialx opened this issue May 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sentialx
Copy link

sentialx commented May 22, 2024

Feature Request

Is there a way to define a custom unary operator getXAt that takes an integer i as a parameter and returns X_i? This could possibly allow creating a similar mechanism to attention.

@sentialx sentialx added the enhancement New feature or request label May 22, 2024
@MilesCranmer
Copy link
Owner

Not yet but all we need to do is make SymbolicRegression.jl compatible with GenericOperatorEnum – see https://github.com/SymbolicML/DynamicExpressions.jl?tab=readme-ov-file#tensors. Then the operators could do anything at all – even operations on non-numerical data.

Right now it is fixed to only use OperatorEnum by this line: https://github.com/MilesCranmer/SymbolicRegression.jl/blob/71447ee7bee18fc836a7d7bb4c8ce5d249bc0e7c/src/Options.jl#L718-L722.

We would need to change that to allow the user to specify the AbstractOperatorEnum type, and then basically fix up all the error messages that will show up. But I feel like it wouldn't be too bad.

(There are also n-ary operators planned which someone is working on, those could be useful here as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants