from virtualitics import api import pandas as pd
data = pd.read_csv('../data/eCommerce.csv')
In this notebook, we will analyze an eCommerce dataset. Each row of data contains information about someone that visited the website and may or may not have spent some money on the selection of products that this website hosts. Suppose we are a marketing agency and we are tasked with identifying cohorts of users to incentivize them to visit the site again.
vip = api.VIP()
Setting up WebSocket connection to: ws://localhost:12345/api Connection Successful! Initializing session.
|User ID||Location||Hobby||Language||Gender||Age||Married||Kids||Pets||First visit to site (months ago)||Last visit to site (months ago)||Device used||Page visits||Number of visits last month||Household Income (USD)||Time spent (seconds)||Amount spent (USD)||Number of products viewed||Frequency of visits last week||Sources|
Let's use VIP's Smart Mapping routine to identify the key drivers that caused users to spend more money on the website.
# Here we are running Smart Mapping with the target set to "Amount spent (USD)" # Instead of specifying which features to include as input to Smart Mapping, we specify which # features to exclude from the input. vip.smart_mapping(data["Amount spent (USD)"], exclude=["User ID"])
|SmartMapping Rank||Feature||Correlated Group|
|2||3||Frequency of visits last week||None|
|3||4||Number of products viewed||None|
|4||5||Time spent (seconds)||None|