Learn everything about Analytics

Home » Building Sales Prediction Web Application using Machine Learning Dataset

Building Sales Prediction Web Application using Machine Learning Dataset

Sales Prediction Web Application




Part 1: Generating the model

Sales Prediction Web Application : Dataset

Column values

    • Next, we run our trained model on test dataset to get model predictions and check model accuracy
      y_pred = model.predict(test_temp[features])
      from sklearn.metrics import mean_squared_error
      from math import sqrt
      rmse = sqrt(mean_squared_error(y_true, y_pred))
      #Output: 1.5555409360901584


Part 2: Creating backend API from model


Part 3: Deploying backend API to Heroku

Part 4: Creating a client-side app using react and bootstrap

  • We need to add files as per instructions provided by bootstrap docs in the index.html file as shown below:-
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <div id="root"></div>
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

This leaves us with the final step of the deployment of our web app online. So hold your patience and persistence a bit longer and let’s start off with the last step of our project.


Part 5: Deploying the client-side app to Netlify

Image for post


End Notes

About the Author


Saurabh Mhatre

I have worked as a frontend developer in the industry for the last 5 years. I have a part-time master’s degree in data science from GreyAtom and have been learning data science concepts for the last 2 years. In my spare time, I usually create side-projects, teach college students, and write technical articles.

Twitter: https://twitter.com/saurabhnative
LinkedIn: https://www.linkedin.com/in/saurabh-mhatre

You can also read this article on our Mobile APP Get it on Google Play

One Comment