Skip to content

Conversation

@Mikeyzgoat
Copy link
Contributor

@Mikeyzgoat Mikeyzgoat commented Mar 11, 2025

Related Issue

  • Demand Forecasting with LSTM-Transformer Model

  • CodePeak 2025 Participant

  • Contributor

Closes: #648 that will be closed through this PR

Describe the add-ons or changes you've made

Added a demand forecasting model using LSTM-Transformer to predict future sales quantities based on historical e-commerce data. Implemented data preprocessing, time series forecasting model, and visualization of results. Fine-tuned hyperparameters and applied a smoothing technique for better trend visualization.

Type of change

What sort of change have you made:

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Trained the LSTM-Transformer model for 500/1000 epochs with different learning rates.
  • Validated results by comparing predicted vs. actual sales quantities.
  • Visualized predictions using Matplotlib.
  • Applied rolling forecasts for future predictions.

Checklist:

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Different Learning rates, epochs to check overfitting and underfitting

Training with epoch 500 and learning rate 0.01
training with epoch 500 learning rate 0.01
Training with epoch 1000 and learning rate 0.0001
training with epoch 1000 learning rate 0.0001
Training with epoch 1000 and learning rate 0.005
training with epoch 1000 learning 0.005

@welcome
Copy link

welcome bot commented Mar 11, 2025

Hello there! 👋 Welcome to the project! 💖
Thank you and congrats 🎉 for opening your first pull request. Please adhere to our Code of Conduct. 🙌🏻 We will get back to you as soon as we can. 😄

Feel free to get in touch with me through social media handles. Hope to see you there!😄

@prathimacode-hub
Copy link
Owner

Hola, @Mikeyzgoat. Kindly use 3-4 algorithms and compare the models and accuracy. Also involve the lifecycle of data science : data analysis, data visualization, 3-4 models, compare models with accuracy and score followed by a summary statement mentioning best fit model out of implemented algorithms. If possible, add a .pkl file for best fit model. As of now, u had incorporated only LSTM model. Do the changes accordingly. Thank you.

@prathimacode-hub prathimacode-hub added the codepeak 25 This label is applicable for all CodePeak issues label Mar 12, 2025
@Mikeyzgoat
Copy link
Contributor Author

Sure thing @prathimacode-hub , I will add SARIMAX and XGBOOST for comparision, prior to this I ll also run data cleaning, preprocessing and enhance feature extraction. Thanks for the review!, I will reach out within 1-2 days.

@prathimacode-hub
Copy link
Owner

Sure thing @prathimacode-hub , I will add SARIMAX and XGBOOST for comparision, prior to this I ll also run data cleaning, preprocessing and enhance feature extraction. Thanks for the review!, I will reach out within 1-2 days.

Perfect, go ahead..

@prathimacode-hub
Copy link
Owner

Any update? @Mikeyzgoat

@Mikeyzgoat
Copy link
Contributor Author

Any update? @Mikeyzgoat

Yes, i might need a day or two, was caught up in some office work. Will revert back ASAP

@Mikeyzgoat
Copy link
Contributor Author

Hi @prathimacode-hub sorry for the delay, i have added the models as asked and have followed the data preparation processes, kindly verify and update. Thanks!

Copy link
Owner

@prathimacode-hub prathimacode-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR is approved. Well done.. 🙌 @Mikeyzgoat

@prathimacode-hub prathimacode-hub added the Approved This PR is tagged when the solution is approved label Mar 19, 2025
@Mikeyzgoat
Copy link
Contributor Author

Thank you @prathimacode-hub , can you update the same on CODEPEAK please, thanks again!. Happy coding

@prathimacode-hub
Copy link
Owner

Thank you @prathimacode-hub , can you update the same on CODEPEAK please, thanks again!. Happy coding

Sure, I asked for process to add tags, so shall do at earliest.. @Mikeyzgoat

@prathimacode-hub prathimacode-hub changed the title Fixes: #648, Added LSTM-Transformer model for Demand Forecasting CodePeak 2025 : Supply Chain Demand Forecasting Mar 19, 2025
@prathimacode-hub prathimacode-hub merged commit 7abc692 into prathimacode-hub:main Mar 19, 2025
1 check passed
@welcome
Copy link

welcome bot commented Mar 19, 2025

Congrats on merging your first Pull Request! 🎉 All the best for your amazing open source journey ahead. 🚀⚡️

@prathimacode-hub prathimacode-hub added the Intermediate This issue will be considered as Intermediate for CodePeak 2025. Points will be 10 label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved This PR is tagged when the solution is approved codepeak 25 This label is applicable for all CodePeak issues Intermediate This issue will be considered as Intermediate for CodePeak 2025. Points will be 10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CodePeak 2025 : Supply Chain Demand Forecasting

2 participants