Reference no: EM132999924
In this assignment, program a Naive Bayes Classifier using datasets provided to you, and in Part 2 you will evaluate equivalent models represented in a couple of research papers.
To demonstrate completion of this assignment, create a Word document with your working code, screenshots of program results, and written answers to questions. Writing should be professional and rigorous, and include scientific/mathematical justification, where appropriate, for all conclusions reached. Upload your final Jupyter notebook and Word document to the LMS when complete.
Part 1: Operational Tasks
For the following exercises, work with the framingham_nb_training and framingham_nb_test data sets. Use Python to solve each problem.
• Convert all variables (Death, Sex, and Educ) to factors.
• Create two contingency tables, one with Death and Sex and another with Death and Educ.
• Use the tables in the previous exercise to calculate:
1. The probability a randomly selected person is alive or is dead.
2. The probability a randomly selected person is a male.
3. The probability a randomly selected person has an Educ value of 3.
4. The probabilities that a dead person is male with education level 1, and that a living person is male with education level 1.
5. The probabilities that a living person is female with education level 2, and that a dead person is female with education level 2.
• Create side-by-side bar graphs for Death, one with an overlay of Sex and the other with an overlay of Educ.
• Use the graphs from the previous exercise to answer the following questions:
1. If we know a person is dead, are they more likely to be male or female?
2. If we know a person is alive, are they more likely to be male or female?
3. If we know a person is dead, what education level are they most likely to have?
4. If we know a person is alive, what education level are they most likely to have?
5. Which education levels are more prevalent for dead persons? For living persons?
• Compute the posterior probability of Death = 0 (person is living) for a male with education level 1. Compute the posterior probability of Death = 1 (person is dead) for a male with education level 1.
• Compute the posterior probability of Death = 0 (person is living) for a female with education level 2. Compute the posterior probability of Death = 1 (person is dead) for a female with education level 2.
• Run the Naïve Bayes classifier to classify persons as living or dead based on sex and education.
• Evaluate the Naïve Bayes model on the framingham_nb_test data set. Display the results in a contingency table. Edit the row and column names of the table to make the table more readable. Include a total row and column.
• According to your table in the previous exercise, find the following values for the Naïve Bayes model:
1. Accuracy
2. Error rate
• According to your contingency table, find the following values for the Naïve Bayes model:
1. How often it correctly classifies dead persons.
2. How often it correctly classifies living persons.
PART 2: Mathematical and Statistical Basis
1. Read Kern et al. (2017). Evaluate the Naïve Bayes Classifier specified in Section 2.4.2, and compare it against the other methods presented (logistic regression, nonlinear discriminant analysis, classification tree, penalized model, neural network). Why did the Naïve Bayes model outperform all the other models except for mixture discriminant and classification tree? How did the sensitivity of the model factor into the model validation?
2. Read Karanja et al. (2020). Explain how the Naïve Bayes Classifier outlined in Section 4.1(c) applies to the Internet of Things as evaluated in the article. How does the max(P(T|Ci)) of the Gaussian probability function help in evaluating an image texture derived from malware analysis?
Include references to all theoretical concepts and works cited. Show all your steps with explanations. Explain major components of complex solutions, code, and any output. Include captions to tables, images, and diagrams. Use formal and detailed mathematical and scientific notation throughout the document.
While APA style is not required for the body of this assignment, solid academic writing is expected, and documentation of sources should be presented using APA formatting guidelines, which can be found in the APA Style Guide, located in the Student Success Center.
Attachment:- Topic Assignment.rar
Difference between the cost of bank loan
: Consider a $100,000 bank loan for one year at a quoted annual simple interest rate of 9%. What is the difference between the cost of this bank loan when it is q
|
What are the amounts recorded by Marian Company
: Using the preceding data, what are the amounts recorded by Marian Company for the right-of-use asset and lease liability, respectively
|
Calculate the holding period return assuming all coupons are
: Calculate the holding period return assuming all coupons are reinvested. An investor purchases a four-year, 9% semi-annual coupon payment
|
What is the project cost of capital
: ETM Corp. is evaluating a new project which has an unlevered beta of 1.1. The project will be financed with 40 percent debt with a cost of 7 percent.
|
Evaluate the naïve bayes classifier
: Evaluate equivalent models represented in a couple of research papers - Evaluate the Naïve Bayes Classifier specified in Section
|
What is the NPV of the acquisition
: The cost of environmental clean-up is expected to be $300,000 per year starting from Year 5 in perpetuity. What is the NPV of the acquisition
|
Find the profitability index
: Mary Bighair is considering investing in a beauty salon that will cost her $18,000. The after-tax cash flows on the investment should be about $4,000 per year f
|
Should the agency sell Mustangs and change the model
: The annual cost of change is $ 240,000 with annual operating costs of $ 900,000. Should the agency sell Mustangs and change the model if the MARR is 15%
|
Prepare journal entries to record all of the events
: The allotment money was received by 20 March 2020. Share issue costs of $3,500 were also paid on the same date. Prepare journal entries to record events
|