Skip to main content

relativeImp is a Python package to conduct the key driver analysis and generate relative importance by driver.

Project description

Relative Importance Calculator

Introduction

Key driver analysis is a popular and powerful tool in marketing research to quantify the relative importance of individual drivers in predicting an outcome variable. For example, marketing researchers conduct key driver analysis using customer experience survey responses to understand which aspects of the customer experience would drive the customer overall satisfaction the most.

As drivers are often highly correlated with each other, typical multiple regression analysis would produce flawed indicators of driver importance. Instead, we adopt the relative weight analysis approach which accurately partitions variance among the correlated drivers.

The Relative Importance Calculator produces the raw and normalized relative importance by driver for a specified outcome variable. The sum of the raw relative importance equals R-squared (i.e. the total proportion of variation in the outcome variable that can be explained by all the drivers) and the sum of the normalized relative importance equals one.

Prerequisite

To use the Relative Importance Calculator, you need to have pandas and NumPy installed.

Installation

Install the Relative Importance Calculator from PyPI:

pip install relativeImp

Input and Output

The Relative Importance Calculator takes three mandatory input parameters and returns a pandas DataFrame:

Input Parameters:

df: pandas.core.frame.DataFrame
    Raw input data, e.g. survey responses

outcomeName: str
    Name of the single outcome variable, e.g. overall satisfaction scores

driverNames: list
    Names of the driver variables, e.g. satisfication drivers such as quality, ease of use etc.  

Output:

pandas.core.frame.DataFrame with three columns:
    driver: names of the driver variables
    rawRelaImpt: the raw relative importance whose sum equals R-squared
    normRelaImpt: the normalized relative importance whose sum equals one    

Example Code

import pandas as pd
from relativeImp import relativeImp

df = pd.read_excel("raw_survey_responses.xlsx")
yName = 'Overall Satisfaction'
xNames = ['Response Time to the Service Call',
            'Efficiency of Handling the Service Call',
            'Answer/Solution Provided',
            'Knowledge of the Service Personnel',
            'Communication Skills of the Service Personnel',
            'Professionalism of the Service Personnel']

df_results = relativeImp(df, outcomeName = yName, driverNames = xNames)

Creator

Copyright © 2019 Dan Yang

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

relativeImp-0.0.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relativeImp-0.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file relativeImp-0.0.2.tar.gz.

File metadata

  • Download URL: relativeImp-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for relativeImp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 16e025546a7149eb038e3278ecf0e4364b2ea7ab57f59af7bbbbd655aff11fbc
MD5 a4d64c2e6d02b07ecee6ea21cca9de9c
BLAKE2b-256 519b8442550de1c1c76c295953ffb99277b7001e0f9c6574345e081c7650386d

See more details on using hashes here.

File details

Details for the file relativeImp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: relativeImp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for relativeImp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7db59c76b09178d8fa3cdb5c764b3dabb4f644c3ea9be019b24c4c71c4eed511
MD5 90373e2dd0cba305e44f6fba514a8f31
BLAKE2b-256 2ea6d02857fb2ffb19d3660e70a1ab7bff9308f914351e0b00ad8a0da3c8de63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page