Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Homework5 Marketing Segmentation—Propensity model Requirements: use google colaboratory Please kindly comment on your code to help me understand · Write a proposal to your managers about your thoughts...

1 answer below »
Homework5 Marketing Segmentation—Propensity model
Requirements:
use google colaboratory
Please kindly comment on your code to help me understand
· Write a proposal to your managers about your thoughts on
· How are you going to segment your customers?
· What are the potential use cases?
· If you are going to build a segmentation model, what features are you going to use?
· Read data description in the next page.
· Build a machine learning model to segment the restaurants into different revenue tiers Propensity model(logistic regression,knn,Xgboost)
· Select the features that are important for predicting revenue
· Understand how each feature influences revenue
Sample code: Please reference sample code in the attachment
Data: https:
www.kaggle.com/c
estaurant-revenue-prediction/data
Data description
· Dataset
· The data columns include:
· open date
· location
· city type
· categories of obfuscated data: Demographic data, Real estate data, and Commercial data
· revenue: a (transformed) revenue of the restaurant in a given year and is the target of predictive analysis
· Assume restaurants in the dataset are Trave stores
· File descriptions
· train.csv - the training set. Use this dataset for training your model.
· test.csv - the test set.
· sampleSubmission.csv - a sample submission file in the co
ect format

Homework5 Marketing Segmentation—Propensity model
Requirements:
use google colaboratory
Please kindly comment on your code to help me understand
· Write a proposal to your managers about your thoughts on
· How are you going to segment your customers?
· What are the potential use cases?
· If you are going to build a segmentation model, what features are you going to use?
· Read data description in the next page.
· Build a machine learning model to segment the restaurants into different revenue tiers Propensity model(logistic regression,knn,Xgboost)
· Select the features that are important for predicting revenue
· Understand how each feature influences revenue
Sample code: Please reference sample code in the attachment
Data: https:
www.kaggle.com/c
estaurant-revenue-prediction/data
Data description
· Dataset
· The data columns include:
· open date
· location
· city type
· categories of obfuscated data: Demographic data, Real estate data, and Commercial data
· revenue: a (transformed) revenue of the restaurant in a given year and is the target of predictive analysis
· Assume restaurants in the dataset are Trave stores
· File descriptions
· train.csv - the training set. Use this dataset for training your model.
· test.csv - the test set.
· sampleSubmission.csv - a sample submission file in the co
ect format
Answered Same Day Jun 08, 2021

Solution

Bezawada Arun answered on Jun 15 2021
138 Votes
{
"cells": [
{
"cell_type": "code",
"execution_count": 116,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"from sklearn import metrics\n",
"from sklearn.metrics import confusion_matrix\n",
"from sklearn.metrics import classification_report\n",
"from sklearn.metrics import roc_auc_score\n",
"from sklearn.metrics import roc_curve\n",
"from sklearn.neighbors import KNeighborsClassifier\n",
"from sklearn.model_selection import train_test_split\n",
"import xgboost as xgb\n",
"from xgboost import XGBClassifier\n",
"from sklearn.metrics import accuracy_score\n",
"from sklearn.feature_selection import SelectKBest\n",
"from sklearn.feature_selection import chi2\n",
"from IPython.display import Image\n",
"from IPython.core.display import HTML "
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(137, 43)\n"
]
},
{
"data": {
"text/html": [
"
\n",
"