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

L1_poly = CaputoL1point(-0.5, lambda x: x**2 - 1) #25

Closed
creator2020A opened this issue Feb 12, 2024 · 6 comments
Closed

L1_poly = CaputoL1point(-0.5, lambda x: x**2 - 1) #25

creator2020A opened this issue Feb 12, 2024 · 6 comments

Comments

@creator2020A
Copy link

creator2020A commented Feb 12, 2024

Your example here in the website:
L1_poly = CaputoL1point(-0.5, lambda x: x**2 - 1)
Gives an error from your code def CaputoL1point
if alpha <= 0 or alpha >= 1:
raise ValueError('Alpha must be in (0, 1) for this method.')
May I ask what am I missing?

@cooperhatfield
Copy link
Collaborator

cooperhatfield commented Feb 12, 2024

The alpha value refers to the level of differentiation, you're specifying alpha=-0.5 which is a half integration. If that's what you want to do, you should first integrate your function normally, and then take a half derivative by specifying alpha=0.5.

I'll update that example to fix the error, thank you for noticing!

@creator2020A
Copy link
Author

creator2020A commented Feb 13, 2024 via email

@creator2020A
Copy link
Author

creator2020A commented Feb 13, 2024 via email

@cooperhatfield
Copy link
Collaborator

Hi Differint/Differint, But in your example code it works exactly like that?

On Tue, Feb 13, 2024 at 12:24 PM Cooper Hatfield @.> wrote: The alpha value refers to the level of differentiation, you're specifying alpha=-0.5 which is a half integration. If that's what you want to do, you should first integrate your function normally, and then take a half derivative by specifying alpha=0.5. — Reply to this email directly, view it on GitHub <#25 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKYELMOWKQM4RDDJC5NRITYTKQD7AVCNFSM6AAAAABDFPVBVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZZG43TINBZGU . You are receiving this because you authored the thread.Message ID: @.>

I believe the wiki page was written using an old implementation, but it was written so long ago that I don't know why there's an example giving a result with an invalid call of the function.

@creator2020A
Copy link
Author

Thank you.

@cooperhatfield
Copy link
Collaborator

It should work the same way as the theoretical formula, ignoring issues/errors due to the algorithm. For specifics, you should be able to find a reference to the paper used for the implementation in the functions docstring.

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