Giter VIP home page Giter VIP logo

market_share_prediction's Introduction

Market Share prediction

The dataset belongs to the Montreal Local TV channels, which contain some information. The goal is to predict Market Share_total column.

Required libraries are pandas, numpy, sklearn and keras, but most of the notebook is written with sklearn, pandas and numpy.

Among different regression algorithm tested, MLPRegressor has the least loss and mean absolute error with high R-squared score. In order to create a model to predict target column, following steps have take:

  1. preprocessing
  2. feature engineering
  3. choose algorithm and evaluate performance

As For preprocessing data part, First, sklearn LabelEncoder is used, to label each distinct value of a column to a numerical value. Second, Data normalization is just done on 'Temperature in Montreal during episode' column with range between -1 and 1.

Among chosen features, 'Temperature in Montreal during episode', 'Start_time and 'End_time' has nan values. In 'Temperature in Montreal during episode' column nan values are replaced with mean. But in other two, 'Start_time' and 'End_time', first they've got converted to categorical like morning, noon, evening and so on. Then using sklearn LabelEncoder, each got distinct label.

This dataset has 20 columns which one of them is the target column. Among 19 different columns, 13 of have taken as input features for model. These featues are specified in the notebook.

The best result could achieve is for simple multi layered percepton regressor model with following outputs:

  • Loss = 1.943
  • mean absolute error = 1.25
  • R-squared score = 0.83

market_share_prediction's People

Contributors

mohammadaliafsahi avatar

Watchers

James Cloos avatar  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.