AD654程序代写、代写Python编程、Analytics语言代写代写Web开发|代写留学生Processing

AD654: Marketing Analytics
Boston University
Assignment III: Classification: Will this Traveler Be Satisfied?
For this assignment, you will use the file euro_hotels.csv, which can be found on our course Blackboard
page.
For Parts I and II of this assignment, you will upload two files into Blackboard: The .ipynb file that you
create in Jupyter Notebook, and an .html file that was generated from your .ipynb file. If you run into
any trouble with submitting the .html file to Blackboard, you can submit it as a PDF instead.
For Part III of this assignment, you will submit either your .twb file (if you used Tableau Desktop) or a
link to your dashboard on the Tableau server (if you used Tableau Public), along a one-paragraph
description of your dashboard.
For any question that asks you to perform some particular task, you just need to show your input and
output in Jupyter Notebook. Tasks will always be written in regular, non-italicized font.
For any question that asks you to include interpretation, write your answer in a Markdown cell in
Jupyter Notebook. Any homework question that needs interpretation will be written in italicized font.
Do not simply write your answer in a code cell as a comment, but use a Markdown cell instead.
Remember to be resourceful! There are many helpful resources available to you, including the video
library, the lecture notes on Blackboard, the Friday facilitator-led sessions, the Zoom office hours
sessions, and the web.
Some content posted here in this assignment will be covered in our next class session.
Part I: Logistic Regression Model:
A. Bring the dataset into your environment, and use the head() function to explore
the variables.
B. Which of the variables here are categorical? Which are numerical?
C. Use the value_counts() function from pandas to learn more about the outcome
variable, satisfaction. Describe your findings -- what are the different outcome
classes here, and how common are each of them in the dataset?
D. The outcome variable in this model will be satisfaction. If satisfaction is not
currently in numeric format, use scikit-learn’s Label Encoder to make this
change. Then, call the head() function again on your dataframe.
a. Comparing the first five rows now, vs. the way they looked when you
originally called the head() function, what changed?
E. For your categorical input variables, do you need to take any steps to convert
them into dummies, in order to build a logistic regression model? Why or why
not?
a. If you answered “yes” to the previous question, dummify your categorical
inputs now, being sure to drop one level as you do.
F. Create a data partition. For your random_state value, use a number based on
either your work, home, or school address, or just a number that you like (For
example, I live at 200 Market St, I work at 1010 Commonwealth Avenue, and my
lucky number is 80, so I could use either 200, 1010, or 80). Assign 40% of your
rows to your test set, and 60% to your training set.
a. How did you pick your seed value?
G. Build a logistic regression model using Python, with the outcome variable
satisfaction. Use the rest of the variables from the dataset as inputs (except ID).
Remember to use only your training data to build this model.
H. Show your model’s coefficients.
a. Which of your numeric variables appear to influence the outcome
variable the most? Which ones have the least impact? Choose any
three variables that seem to matter for this model, and write a sentence
or two for each with your thoughts about their importance. You can
think about your own experience as a traveler as you write this.
b. Now look at the categorical variables and their coefficients. Write a
paragraph with your opinion about the ‘type of travel’ and ‘purpose of
travel’ coefficients shown here.
I. Assess the performance of your model against the test set. Build a confusion
matrix, and answer the following questions about your model. You can use
Python functions to answer any of these questions or you can use your
confusion matrix to determine the answers in a slightly more manual way. The
‘positive’ class in this model is represented by the “1” outcome.
a. What is your model’s accuracy rate?
b. What is your model’s sensitivity rate?
c. What is your model’s specificity rate?
d. What is your model’s precision?
e. What is your model’s balanced accuracy?
J. Compare your model’s accuracy against the training set vs. accuracy against the
test set (just use accuracy only for this).
a. What is the purpose of comparing those two values?
b. In this case, what does the comparison of those values suggest about the
model that you have built?
K. Make up a traveler. Assign this person a value for each predictor variable in this
model, and store the results in a new dataframe. Now, put your person through
this model.
a. What did your model predict -- will this person be satisfied?
b. According to your model, what is the probability that the person will be
satisfied?
L. When using a logistic regression model to make predictions, why is it important
to only use values within the range of the dataset used to build the model?
a. Make a new dataframe, but this time, for the numeric predictor variables,
select some numbers that are outside the range of the dataset. Use your
model to make a prediction for this new dataframe. What do you notice
about the result? (To answer this, don’t simply state the predicted
outcome, but also write 1-2 sentences of explanation for what you see).
Part II: Random Forest Model
M. Read the dataset back into Python. Again, use the Label Encoder to convert the
outcome variable into 0 or 1 format. Dummify the categorical inputs again, but
this time, don’t drop any levels.
N. Re-partition the data, using the same seed value that you used in the previous
part of this assignment.
O. Build a random forest model in Python with your training set. Use the same
input variables, and same output variable, as you used in the logistic regression
model (the only difference here is that the categories should not have any levels
dropped). Use GridSearch CV to help you determine the best
hyperparameter settings for your model.
P. How did your random forest model rank the variables in order of importance,
from highest to lowest? For a random forest model, how can you interpret
feature importance?
Q. Assess the performance of your model against the test set. Build a confusion
matrix to do this. You can use Python functions to answer any of these
questions or you can use your confusion matrix to determine the answers in a
slightly more manual way. The ‘positive’ class in this model is represented by the
“1” outcome.
a. What is your model’s accuracy rate?
b. What is your model’s sensitivity rate?
c. What is your model’s specificity rate?
d. What is your model’s precision?
e. What is your model’s balanced accuracy?
R. Compare your model’s accuracy against the training set vs. your model’s
accuracy against the test set. How different were these results?
S. Use the predict() function with your model to classify the person who you
invented in Step I. Does the model think this person will be satisfied?
T. For this question, no Python code is required -- just use a Markdown cell to
answer. Assume that Lobster Land is thinking about opening an on-site hotel on
its theme park property. Write a 3-5 sentence paragraph that speculates about
why Lobster Land might care about being able to use this model. There is not a
single “correct” answer to this question. Be thoughtful and be creative, and
consider the impact of being able to predict a particular customer’s likely
satisfaction. You can mention a marketing angle, an operations angle, or anything
else that comes to mind.
Part III: Using Tableau to Build a Dashboard:
A. Bring the lobsterland_2020.csv into your Tableau Public environment.
B. Using a tiled layout, build a dashboard that includes any four unique visualizations
of your choice. By “unique” this just means that you should not build two of the
same type of plot. Give a title to each of your four plots.
C. Write a one-paragraph description of your dashboard. Write about the plots
that you made and describe your process. You can do this in any file format, and
upload it with your Assignment 3 submission.
D. Paste a link to your file in the same document that you used to write the
description.
Note: This section is intentionally very open-ended. Each submission will be unique. The
goal here is not to arrive at a single “correct” answer but to have everyone gain some hands-on
experience with building a dashboard in Tableau. The dashboards will not be scored by some
‘beauty contest’ measure -- the key here is to (1) make a good-faith effort to build a dashboard
with four separate types of visualizations, and (2) include a thoughtful narrative paragraph.
Every answer that does those things will receive full credit for this section.

热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图