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

tk.augment_fourier() #22

Closed
mdancho84 opened this issue Sep 26, 2023 · 10 comments · Fixed by #182
Closed

tk.augment_fourier() #22

mdancho84 opened this issue Sep 26, 2023 · 10 comments · Fixed by #182

Comments

@mdancho84
Copy link
Contributor

mdancho84 commented Sep 26, 2023

@mdancho84 mdancho84 assigned mdancho84 and unassigned mdancho84 Sep 28, 2023
@rabadzhiyski rabadzhiyski added this to the v0.2.0 milestone Oct 4, 2023
@rabadzhiyski rabadzhiyski added the help wanted Extra attention is needed label Oct 7, 2023
@rabadzhiyski rabadzhiyski added Priority and removed help wanted Extra attention is needed labels Oct 16, 2023
@GTimothee
Copy link
Contributor

I can try to help on this one :)

@mdancho84
Copy link
Contributor Author

That would be great. The challenge is to get the peaks of the sin/cos to match the period or periods given. I want the functionality to be very similar to R timetk augment_fourier which depends on fourier_vec.

@JustinKurland
Copy link
Collaborator

Happy for @GTimothee to give this a go as I have been tackling other tasks presently.

@GTimothee
Copy link
Contributor

OK I will do my best, let's start with this one :) I contacted JustinKurland privately and he kindly offered his help :)

@mdancho84
Copy link
Contributor Author

Sounds great!!

mdancho84 pushed a commit that referenced this issue Oct 21, 2023
…ing-PEP8-1

Update future.py docstring PEP8
@GTimothee GTimothee mentioned this issue Oct 23, 2023
@GTimothee
Copy link
Contributor

GTimothee commented Oct 23, 2023

Just to let you know I think I found a bug in the original implementatio. I found that this line

data['radians'] = 2 * np.pi * (data[date_column] - min_date).dt.total_seconds() / (24 * 3600)
should be before data.copy() or it will break here:
np.cos(freq * df['radians']) if order % 2 == 0 else np.sin(freq * df['radians'])

(key error 'radians' in df['radians'])

Should I push a fix in a separate issue or should we ignore it and just wait for the new version of the function ?

@mdancho84
Copy link
Contributor Author

Just push the fix, and we will get it updated. This way if we modify the original function, then the corrected version has the fix already in there.

@mdancho84
Copy link
Contributor Author

@GTimothee Just a heads up - I've refactored this and the rest of the feature engineering functions to a new submodule called feature_engineering. Please do a git pull.

@GTimothee
Copy link
Contributor

Sorry I did not see your message ! Will do

@mdancho84
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants