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

Common functions #24364

Open
ravi160822 opened this issue Dec 10, 2022 · 1 comment
Open

Common functions #24364

ravi160822 opened this issue Dec 10, 2022 · 1 comment

Comments

@ravi160822
Copy link

ravi160822 commented Dec 10, 2022

Is there a plan to add common loss functions like MSE, CrossEntropy to sympy.
Including functions like softmax, sigmoid.

so one could do something like,

from sympy import softmax

and see the softmax equation, along with adding additional arguments required for softmax

@oscarbenjamin
Copy link
Contributor

I don't know if anyone plans to add these things or what they would be used for if they were added. If you think that there are good reasons to add them then please:

  1. Explain precisely what these functions are.
  2. Explain precisely how these might work in SymPy.
  3. Describe what they might be used for.
  4. Explain why there is a benefit in adding them rather than using the existing capabilities of SymPy.

The idea that someone imports the softmax function just to "see" an equation is not a convincing argument for adding these to SymPy. Any mathematical function added to SymPy entails a long tail of maintenance work and bug fixes and there needs to be a nontrivial benefit for that to be worthwhile.

Here are two pull requests in the past that are related to the sigmoid function in the past: #15952 #20758 (comment)

Those two pull requests were sort of rejected. I say sort of because essentially what happened is the authors proposed something and then gave up when challenged to give a good motivation for the proposed changes. Likewise here I suggest closing this unless a significant motivation is given.

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

No branches or pull requests

2 participants