Git Product home page Git Product logo

predictor's Introduction

Marketing Performance Predictor

Source code for my blog post about How to predict the success of your marketing campaign

Contains the code to train a prediction model for regression results with linear, decision tree, random forest and support vector regressors and provides a simple Python (Flask) web app to predict ad impressions, clicks and purchases (conversions) for digital (social media and search) marketing campaigns predictor.stagelink.com

Structure

This project contains two parts, a regression model builder/trainer and a web app to predict results.

  1. Model: Basic training pipeline in training.py, consuming first_glance.py (basic descriptive analysis), helpers.py (helper functions), preprocessing.py (data preprocessing) and regression.py (regression class with 4 different regressor methods).

  2. App: Single page app defined in api.py. HTML views in templates, custom CSS in static/css.

Contribution

Please submit any issues you have. If you have any ideas how to further improve the predictor please get in touch or feel free to fork this project and create a pull request with your proposed updates.

Environment

  • Python 3.6
  • Flask (web framework)
  • zappa (deployment to AWS lambda)
  • numpy (Python computing package)
  • pandas (Python data analytics library)
  • statsmodels (Python statistics module)
  • Matplotlib (Python plotting library)
  • Seaborn (Python visualization library)
  • Scikit-learn (Python machine learning library)
  • Joblib (Python pipelining library)
  • Psycopg (Python PostgreSQL adapter)
  • Boto 3 (AWS Python SDK)

Prediction pipeline (as in training.train())

  1. Load data from CSV or (Postgres) database
  2. Preprocess data
  3. Build regressors (linear, tree, forest and SVR)
  4. Evaluate regressors
  5. Fit best regressor to data
  6. Save best regressor

predictor's People

Contributors

kinosal 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.