Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem

Automobile Accidents. The file Accidents.csv contains information on 42,183 actual automobile accidents in 2001 in the United States that involved one of three levels of injury: NO INJURY, INJURY, or FATALITY. For each accident, additional information is recorded, such as day of week, weather conditions, and road type. A firm might be interested in developing a system for quickly classifying the severity of an accident based on initial reports and associated data in the system (some of which rely on GPS-assisted reporting).

Our goal here is to predict whether an accident just reported will involve an injury (MAX_SEV_IR = 1 or 2) or will not (MAX_SEV_IR = 0). For this purpose, create a dummy variable called INJURY that takes the value "yes" if MAX_SEV_IR = 1 or 2, and otherwise "no."

a. Using the information in this dataset, if an accident has just been reported and no further information is available, what should the prediction be? (INJURY = Yes or No?) Why?

b. Select the first 12 records in the dataset and look only at the response (INJURY) and the two predictors WEATHER_R and TRAF_CON_R.

i. Create a pivot table that examines INJURY as a function of the two predictors for these 12 records. Use all three variables in the pivot table as rows/columns.

ii. Compute the exact Bayes conditional probabilities of an injury (INJURY = Yes) given the six possible combinations of the predictors.

iii. Classify the 12 accidents using these probabilities and a cutoff of 0.5.

iv. Compute manually the naive Bayes conditional probability of an injury given WEATHER_R = 1 and TRAF_CON_R = 1.

v. Run a naive Bayes classifier on the 12 records and two predictors using R. Check the model output to obtain probabilities and classifications for all 12 records. Compare this to the exact Bayes classification. Are the resulting classifications equivalent? Is the ranking (= ordering) of observations equivalent?

c. Let us now return to the entire dataset. Partition the data into training (60%) and validation (40%).

i. Assuming that no information or initial reports about the accident itself are available at the time of prediction (only location characteristics, weather conditions, etc.), which predictors can we include in the analysis? (Use the _ sheet.)

ii. Run a naive Bayes classifier on the complete training set with the relevant predictors (and INJURY as the response). Note that all predictors are categorical. Show the confusion matrix.

iii. What is the overall error for the validation set?

iv. What is the percent improvement relative to the naive rule (using the validation set)?

v. Examine the conditional probabilities output. Why do we get a probability of zero for P(INJURY = No | SPD_LIM = 5)?

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92763715

Have any Question?


Related Questions in Computer Engineering

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Red bull is the most popular energy drink in sales in the

Red Bull is the most popular energy drink in sales in the United States. Red Bull GmbH (the parent company) has observed that daily sales are normally distributed with an average of 6,329,903 drinks sold with a standard ...

Task 1create an array that holds a 20 random integers

Task 1: Create an Array that holds a 20 random integers between 1-50. Create an iterator that will return the memory address and value for each integer present in the Array. Task 2: Update Assignment 1 Task 2. Pass the v ...

Systems analysis project personal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

A cartel is branch of an oligopoly there are still a

A cartel is branch of an oligopoly. There are still a handful of large firms and many smaller firms. For instance, the diamond industry and the petroleum industries are examples are oligopolies. However, the main differe ...

Script kiddies amp code monkeysthese two terms can be

Script Kiddies & Code Monkeys These two terms can be interpreted as derogatory, but they also appear as standard jargon in the workplace. What is a script kiddie? What is a code monkey? What are the differences? Does it ...

Let a and b be events the symmetric difference atriangleb

Let A and B be events. The symmetric difference A(triangle)B is defined to be the set of all elements that are in A or B but not both. In logic and engineering, this even is also called the XOR (exclusive or) of A and B. ...

Question consider how deming and tqm would have dealt with

Question: Consider how Deming and TQM would have dealt with (or avoided) the problems at Boeing. What does a TQM initiative look like in an IT department? How would IT support Total Quality at Boeing? The response must b ...

Discuss the role of insurance in healthcare delivery and

Discuss the role of insurance in healthcare delivery and productivity

Help me define corporate social responsibilityhelp me

Help me define corporate social responsibility. Help me conduct research on a Fortune 500 company and how do you determine just how (or if) the company ranks from a CSR perspective. Help me understand if the findings cha ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As