Code Monkey home page Code Monkey logo

web-traffic-forecasting-using-cnns-and-lstms's Introduction

Web Traffic 🕸💥 Forecasting using CNNs and LSTMs Project Status: Active

The web traffic is basically the number of sessions in a given time frame, and it varies a lot with respect to what time of the day it is, what day of the week it is, and so on, and how much web traffic of platform can withstand depends on the size of the servers that are supporting the platform.

If the traffic is more than what the servers can handle, the website might show this 404 error, which is something we don’t want to happen. It will make the visitors go away.

  • One solution to this problem is to increase the number of servers. However, the downside of the solution is the cause can go up, which is again undesirable. So, what is the solution?
  • You can dynamically a lot of servers based on the historical visitor’s volume data or based on the historical web traffic data. And that brings us to the data science problem, which is basically forecasting the web traffic or a number of sessions based on the historical data.

Installation and Usage:

  • Run the command pip install -r requirements.txt to install the necessary dependencies.
  • Run the command jupyter notebook and follow along the commented Jupyter notebook.

Dataset:

We will work with the web traffic dataset. It is a six-month series data which you can find here.

Model Architectures :

  1. Basic LSTM Model :

lstm_model

  1. Basic CNN Model :

cnn_model

( Baseline model was taken as a simple moving average model. )

Training/Validation Loss :

Basic LSTM Model Basic CNN Model
loss_lstm loss_cnn

Results:

Metric Baseline Model Basic LSTM Model Basic CNN Model
Mean Square Error 0.5546 0.01501 0.0138
  1. Basic LSTM Model :

pred_lstm

  1. Basic CNN Model :

pred_cnn

Conclusions:

  • Going through the results, we conclude that both the models tend to have almost similar performance. Feel free to fine tune the hyperparameters ( different batch sizes, optimizers etc. ) or customize the DL architectures?
  • Transfer Learning, SOTA models? 😯
  • Facebook Prophet?😏

web-traffic-forecasting-using-cnns-and-lstms's People

Contributors

prateekralhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.