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

Request to add linear interpolation imputation method as a new naive model #457

Closed
1 task done
colesussmeier opened this issue Jul 15, 2024 · 2 comments
Closed
1 task done
Assignees
Labels
enhancement New feature or request new algo Proposing to add a new model/algorithm

Comments

@colesussmeier
Copy link
Contributor

1. Model description

Linear interpolation (Lerp) imputation method:

  • Lerp will linearly interpolate missing values between the nearest non-missing values.
  • If there are missing values at the beginning or end of the series, they will be back-filled or forward-filled with the nearest non-missing value, respectively.
  • If an entire series is empty, all 'nan' values will be filled with zeros.

I think linear interpolation is a great naive baseline to compare more complicated models to, and would love to see it become part of PyPOTS! I have the code implemented already, so I can make a PR to dev with your consent.

2. Check open-source status

  • The model implementation is publicly available

3. Provide useful information for the implementation

Implementation is relatively straight-forward and uses numpy.interp under the hood. I don't have an official paper on it for this use-case but it has been widely used in many domains for many years. Please let me know if you have any questions and if I can submit a PR! Email: colesussmeier@gmail.com :)

@colesussmeier colesussmeier added enhancement New feature or request new algo Proposing to add a new model/algorithm labels Jul 15, 2024
Copy link

Hi there 👋,

Thank you so much for your attention to PyPOTS! You can follow me on GitHub
to receive the latest news of PyPOTS. If you find PyPOTS helpful to your work, please star⭐️ this repository.
Your star is your recognition, which can help more people notice PyPOTS and grow PyPOTS community.
It matters and is definitely a kind of contribution to the community.

I have received your message and will respond ASAP. Thank you for your patience! 😃

Best,
Wenjie

@WenjieDu
Copy link
Owner

Thanks for proposing this idea, @colesussmeier! We previously used pandas to help generate linear interpolation results, but I think it would be cool to add one implementation into PyPOTS ;-) Could you please make a PR to submit yours? I'll help review your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new algo Proposing to add a new model/algorithm
Projects
None yet
Development

No branches or pull requests

2 participants