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

Orthogonal polynomials #2

Open
jstriaukas opened this issue Feb 12, 2022 · 5 comments
Open

Orthogonal polynomials #2

jstriaukas opened this issue Feb 12, 2022 · 5 comments
Assignees

Comments

@jstriaukas
Copy link
Owner

Create a function that computes Legendre & Gegenbauer polynomials.

Examples:
https://github.com/jstriaukas/midasml/blob/master/R/midas.polynomials.R

@slim-patchy
Copy link
Collaborator

Let me start on this issue first

@slim-patchy
Copy link
Collaborator

Code for orthogonal polynomials added to codebase, now at https://github.com/jstriaukas/midasmlpy/blob/master/midasmlpy/midas_polynomials.py. Will add test cases next.

@slim-patchy slim-patchy self-assigned this Mar 11, 2022
@jeremylhour
Copy link

Hi, I think there is a bug in the lb function particulalry at

Psi[:, i] = np.sqrt((2*i + 1) / (b-a)) @ P[:, i]

You will likely get a dimension error because a scalar multiplies a vectors with @ instead of * Psi[:, i] = np.sqrt((2*i + 1) / (b-a)) @ P[:, i]

@jstriaukas
Copy link
Owner Author

Thanks a lot, Jeremy. We will try to fix it ASAP.

@krisstern
Copy link
Collaborator

Bug fixed.

See:

Psi[:, i] = np.sqrt((2*i + 1) / (b-a)) * P[:, i]

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

4 participants