Skip to main content

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

Metadata

Release files for relativeImp 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for relativeImp 0.0.2
File Size Uploaded Provenance Actions
relativeImp-0.0.2.tar.gz 2.8 kB Without provenance Details for relativeImp-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for relativeImp 0.0.2
File Interpreter ABI Platform Actions
relativeImp-0.0.2-py3-none-any.whl Python 3 none any Details for relativeImp-0.0.2-py3-none-any.whl

Total release size: 7.0 kB

Release files / relativeImp-0.0.2.tar.gz

Download URL relativeImp-0.0.2.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
16e025546a7149eb038e3278ecf0e4364b2ea7ab57f59af7bbbbd655aff11fbc
BLAKE2b-256 checksum
How to use checksums
519b8442550de1c1c76c295953ffb99277b7001e0f9c6574345e081c7650386d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / relativeImp-0.0.2-py3-none-any.whl

Download URL relativeImp-0.0.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7db59c76b09178d8fa3cdb5c764b3dabb4f644c3ea9be019b24c4c71c4eed511
BLAKE2b-256 checksum
How to use checksums
2ea6d02857fb2ffb19d3660e70a1ab7bff9308f914351e0b00ad8a0da3c8de63
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for relativeImp 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page