代做AD699: Data Mining for Business Analytics Spring 2019 Quiz #2代做留学生SQL语言
- 首页 >> OS编程AD699: Data Mining for Business Analytics
Spring 2019
02APR
Quiz #2
Version: FOXTROT
You have one hour to complete this quiz. You may use a calculator, along with your book and/or notes, but may not use a smartphone or anything else with Internet connectivity.
For any multiple choice question, you are not being asked to choose the “best” from among four possibilities; instead, there are three wrong answers, and one right answer. Any multiple choice question must be answered with one completely clear answer choice.
For any free response questions, show your work. Rounding is completely okay (and showing your work helps me to see what you did).
Free response questions that ask for multiple pieces of info will be scored in a binary fashion (1 or 0 points).
There are three versions of this quiz, but all contain the same content.
1. On your first day of work at your summer internship, your boss comes into your office and shows you the summary of the linear regression model shown below. She instructs you to “select the three input variables here that are MOST statistically significant. Which ones will you keep?
, , and
2. Suppose someone is planning to build a data mining model. To build this model, the person will use the dataset ships, whose variables are shown below. The person is not allowed to perform any manipulation or data pre-processing -- in other words, he must run the function on the variables shown below, exactly as they appear (incidents is the outcome, and the other variables are the predictors). Which of the following algorithms can this person use to accomplish this task?
a. Classification Tree
b. Naive Bayes
c. Multiple Linear Regression
d. K-nearest neighbors
3. Suppose we are planning to build a k-nearest neighbors model with three predictors: income (measured in thousands of dollars), age (measured in years), and education level (1 represents high school education, 2 represents college education, and 3 represents graduate education). If we build this model without performing any data normalization/standardization, what could we expect to happen?
a. Among the three input values, income will dominate in terms of its influence on the model outcome.
b. Among the three input values, education level will dominate in terms of its influence on the model outcome.
c. All three inputs will have an equal influence on the model outcome; however, if normalization is performed, the relative impact of each predictor will change.
d. Age and education level will have a strong weighting on the outcome, but income will have a small impact, since it is measured in a unit of currency.
4. A survey was recently conducted in which 653 BU students were asked about their preferred sources of TV news. Of all the students asked, 150 said that they never watch CNN. 112 students said that they sometimes watch CNN, and also sometimes watch Fox. 106 students said that they never watch CNN or Fox. Given that a person in the survey never watches CNN, what is the probability that he sometimes watches Fox?
5. An analyst recently collected data about investment habits. Data about 1275 individual investors was used in this analysis. Of those 1275 investors, 750 never buy bonds.
525 of the people surveyed indicated that they buy stocks, but never buy bonds. 400 of the people surveyed indicated that they sometimes buy bonds and also sometimes buy stocks. Given that an investor in this survey does not buy stocks, what is the probability that he also does not buy bonds?
6. On your first day on the job at your summer internship, your boss comes in on the first day with an instruction. “I need you to create a k-nearest neighbors model for classification,” she says. “And I need you to use a k-value of 5.” What does she mean by this?
a. This model will classify a new record by first determining the five records that are most similar to the one being tested, then determining the majority class among those five, and assigning it as the predicted outcome for the new record.
b. This model will take the numerical mean (average) of the outcome variable for the five nearest records. It will then predict that the record being tested will have the same outcome value as this average.
c. This model will run the knn() function with a default setting of five iterations; in other words, it will loop through the function five times in order to determine the optimal parameters.
d. This model will generate at least five outcome classes. The person building the model will then need to exercise judgement, including statistical analysis and his/her own subject matter expertise, in order to identify the outcome classes that are most relevant from this original group of five.
7. After class one day, you get on the T in Kenmore Square. You hear someone begin to yell at someone else so you take your headphones off and start to listen in. Here’s what you hear:
Person A: “Are you SERIOUS, man?!?! Did I really just watch you code a naiveBayes() function without specifying a smoothing constant?”
Person B: “Yes, I am serious. And did you just look over my shoulder at my laptop, read what I was working on, and then comment on it? You need to learn some manners, Brother.”
Person A: “First of all, you’re not my brother, so don’t call me that. Second of all, I’m honestly trying to help, so you’re being ungrateful right now.”
The two people look like they’re about to begin fighting, but then Person A steps off the train at BU East, and things calm down.
Why did Person A want to see Person B use a smoothing constant?
a. If Person B had partitioned his data in an imbalanced way (such as 60% training, 40% validation), then a smoothing constant would have been needed in order to “rebalance” the data. Person A most likely wanted to ensure that Person B had considered this (otherwise, the results could have been unreliable).
b. If Person B tried to run a naiveBayes() function, and one of the predictors in the record being classified had never appeared in the training set, the naive Bayes function would have assigned a value of “0” to the probability if no smoothing constant had been specified.
c. Person A was most likely afraid that “Bayesian poisoning” could have taken place without the presence of a smoothing constant. Person A was most likely trying to ensure that Person B’s model was not vulnerable to the Bayesian poisoning risk.
d. Most likely, Person A was worried about the risk of overfitting the model. By employing a smoothing constant (such as Laplace=0), Person B could have guaranteed that no overfitting had occurred in the construction of the model.
8. Why is pruning an important step in the process of building a classification tree?
a. Pruning occurs when a person uses different samples of data in order to
compare the error that each sample produces when used to build the model; this way, an analyst can be more confident that a tree model will be accurate when used with new data.
b. Pruning reduces the size of the tree; although this makes the model less
accurate for classifying the data from which it was built, this will make the model more reliable in the future when it attempts to classify records that it has not seen before.
c. The term “pruning” describes the process by which the model splits records according to the various predictors and their values; the pruning process is designed to create terminal nodes that are as homogeneous as possible.
d. If pruning does not occur, the tree cannot be grown to the point at which the terminal nodes generate completely homogenous groupings; therefore, pruning is always recommended when building a tree model.
9. What is the primary overall goal of recursive partitioning?
a. To ensure that multiple data samples from the training data have been
checked against the model results to ensure the greatest possible degree of accuracy.
b. To identify and create splits among the predictors that can be used to make the resulting groups of records as homogenous as possible.
c. To help reduce the importance of categorical inputs in a classification tree, thereby ensuring that numerical inputs are assigned the highest level of importance.
d. To prepare the tree for the use in a random forest model (because all trees
that have been built with the recursive partitioning process will then become used in a random forest in order to determine the best possible model).
10. What general relationship can an analyst expect to see between the complexity parameter (CP) used in a tree model, and the number of splits in the resulting tree?
a. Higher complexity parameters tend to result in smaller trees.
b. Higher complexity parameters tend to result in larger trees.
c. Higher complexity parameters tend to result in trees that do not use recursive partitioning, but do use pruning.
d. Higher complexity parameters eliminate the impact of outliers and
missing values from the training data, which is why most tree models start with a very low value, such as cp = 0.0001.
11. A person who lives in New Haven, Connecticut (a city with an almost-even number of Red Sox fans and Yankees fans) is building a classification tree in order to place people into the correct classification (Yankees or Red Sox). She finds that if she splits the variable
“AGE” at 42 years old, the resulting node will contain 75 records, with 45 Yankees fans and 30 Red Sox fans. However, if she splits the variable “AGE” at 55 years old, it will contain 75 records, with 55 Yankees fans and 20 Red Sox fans.
Answer all three parts of the question below:
Gini impurity level for the node created with an AGE of 42 split:
Gini impurity level for the node created with an AGE of 55 split:
Which split will the model create?
12. You are preparing to build a multiple linear regression model, and you’re looking at your potential input variables to better understand the data in front of you. One of the things that you’re hoping to avoid is multicollinearity. Which two variables shown below, if used together as inputs in the same model, would present the greatest multicollinearity risk? (Write the name of one variable in each of the blanks shown below)
AND .
13. Using a k=1 approach, and using Euclidean distance, classify whether Tim will join the Horror Movie Club.
There are three relevant predictors in this model -- ratings from 1 to 5 (1 being worst, 5 being best) for three movies: Jigsaw, Friday the 13th, and Nightmare on Elm St.
NAME |
JIGSAW |
FRIDAY the 13th |
NIGHTMARE ON ELM ST. |
MEMBER OF HORROR MOVIE CLUB? |
Arnold |
5 |
4 |
5 |
YES |
Brendan |
3 |
2 |
2 |
NO |
Carol |
4 |
3 |
4 |
YES |
Tim |
5 |
5 |
3 |
? |
What is Tim’s Euclidean distance to his nearest neighbor?
Will Tim join the Horror Movie Club?
14. Is it possible to build a k-nn model when your data has more than two outcome classes?
a. Yes, a k-nn model can be built in such a situation, but an important data
preparation step must take place first -- the data must be first separated into a single “class of interest” with the rest of the classes grouped together as “other.”
b. Yes, a k-nn model can be applied in such a situation, and a new record can be classified based on the most common class among its k neighbors.
c. No -- since a k-nn model can only be applied in a situation where there are just two class outcomes, this dataset will not be suitable for a k-nn model.
d. No -- because an outcome with two groups of results will lead to a multicollinearity problem, this cannot be performed with a k-nn classification model.
15. Using the information shown below, and using a naive bayes methodology, calculate the probability that a flight will be delayed if it departs on Day 2, at a time of 10:00 a.m., leaving from Dulles Airport (IAD).