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.

热门主题

课程名

litr1-uc6201.200 ee1102 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst cosc2803 math39512 omp9727 ddes9903 babs2202 mis2002s phya21 18-213 cege0012 mgt253 fc021 int2067/int5051 bsb151 math38032 mech5125 mdia1002 cisc102 07 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 efim20036 mn-3503 comp9414 math21112 fins5568 comp4337 bcpm000028 info6030 inft6800 bcpm0054 comp(2041|9044) 110.807 bma0092 cs365 math20212 ce335 math2010 ec3450 comm1170 cenv6141 ftec5580 ecmt1010 csci-ua.0480-003 econ12-200 ectb60h3f cs247—assignment ib3960 tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 econ7230 msinm014/msing014/msing014b math2014 math350-real eec180 stat141b econ2101 fit2004 comp643 bu1002 cm2030 mn7182sr ectb60h3s ib2d30 ohss7000 fit3175 econ20120/econ30320 acct7104 compsci 369 math226 127.241 info1110 37007 math137a mgt4701 comm1180 fc300 ectb60h3 llp120 bio99 econ7030 csse2310/csse7231 comm1190 125.330 110.309 csc3100 bu1007 comp 636 qbus3600 compx222 stat437 kit317 hw1 ag942 fit3139 115.213 ipa61006 econ214 envm7512 6010acc fit4005 fins5542 slsp5360m 119729 cs148 hld-4267-r comp4002/gam cava1001 or4023 cosc2758/cosc2938 cse140 fu010055 csci410 finc3017 comp9417 fsc60504 24309 bsys702 mgec61 cive9831m pubh5010 5bus1037 info90004 p6769 bsan3209 plana4310 caes1000 econ0060 ap/adms4540 ast101h5f plan6392 625.609.81 csmai21 fnce6012 misy262 ifb106tc csci910 502it comp603/ense600 4035 csca08 8iar101 bsd131 msci242l csci 4261 elec51020 blaw1002 ec3044 acct40115 csi2108–cryptographic 158225 7014mhr econ60822 ecn302 philo225-24a acst2001 fit9132 comp1117b ad654 comp3221 st332 cs170 econ0033 engr228-digital law-10027u fit5057 ve311 sle210 n1608 msim3101 badp2003 mth002 6012acc 072243a 3809ict amath 483
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图