Docsity

Naive bayes machine learning, Summaries of Introduction to Machine Learning

Toggle sidebar
bg1
Neural Networks
Objective: Predicting Cardiovascular Diseases Risks using Neural
Network
Cardiovascular diseases is one the leading cause of death in in the United States and other
developed countries. The early prognosis of cardiovascular diseases can aid in making decisions
on lifestyle changes in high risk patients and in turn reduce the complications. Framingham
study is an dataset with the follow-up 10-year risk of future coronary heart disease (CHD). It
includes over 4,000 records and 15 attributes of patients’ information.
The objective of this study is to familiar with simple Neural Network machine learning method
to predict the risk of cardiovascular diseases.
The Naive Bayes classifier is a simple and powerful method that can be used for binary and
multiclass classification problems.
Naive Bayes classifier predicts the class membership probability of observations using Bayes
theorem, which is based on conditional probability, that is the probability of something to
happen, given that something else has already occurred.
Observations are assigned to the class with the largest probability score. Naïve Bayes
classification is based on applying Bayes’ theorem with strong independence assumption
between the features. Naïve Bayes classification produces good results when we use it for
textual data analysis such as Natural Language Processing
“Naïve” due to the inherent assumption that the predictive features/attributes are class
conditionally independent of each other and are equally important.
It requires a small data set for training the model It works well with a large predictor feature
vector space Naïve Bayes’ ignores missing values Naïve’ Bayes works well with noisy data Naïve
Bayes’ does not work well with too many numeric features. Naïve Bayes’ requires the data to be
categorical for which the frequencies can be calculated. Naïve Bayes’ does not perform well
with correlated features.
Data Specification
• Age: Age in years
• Sex: Sex (1 = male; 0 = female)
• Chest_Pain_Type: chest pain type
– Value 1: typical angina – Value 2: atypical angina – Value 3: non-anginal pain – Value 4:
asymptomatic
• Exercise_Induced_Angina: (1 = Yes; 2 = No)
pf3

Partial preview of the text

Download Naive bayes machine learning and more Summaries Introduction to Machine Learning in PDF only on Docsity!

Neural Networks

Objective: Predicting Cardiovascular Diseases Risks using Neural

Network

Cardiovascular diseases is one the leading cause of death in in the United States and other

developed countries. The early prognosis of cardiovascular diseases can aid in making decisions

on lifestyle changes in high risk patients and in turn reduce the complications. Framingham

study is an dataset with the follow-up 10-year risk of future coronary heart disease (CHD). It

includes over 4,000 records and 15 attributes of patients’ information.

The objective of this study is to familiar with simple Neural Network machine learning method

to predict the risk of cardiovascular diseases.

The Naive Bayes classifier is a simple and powerful method that can be used for binary and

multiclass classification problems.

Naive Bayes classifier predicts the class membership probability of observations using Bayes

theorem, which is based on conditional probability, that is the probability of something to

happen, given that something else has already occurred.

Observations are assigned to the class with the largest probability score. Naïve Bayes

classification is based on applying Bayes’ theorem with strong independence assumption

between the features. Naïve Bayes classification produces good results when we use it for

textual data analysis such as Natural Language Processing

“Naïve” due to the inherent assumption that the predictive features/attributes are class

conditionally independent of each other and are equally important.

It requires a small data set for training the model It works well with a large predictor feature

vector space Naïve Bayes’ ignores missing values Naïve’ Bayes works well with noisy data Naïve

Bayes’ does not work well with too many numeric features. Naïve Bayes’ requires the data to be

categorical for which the frequencies can be calculated. Naïve Bayes’ does not perform well

with correlated features.

Data Specification

  • Age: Age in years
  • Sex: Sex (1 = male; 0 = female)
  • Chest_Pain_Type: chest pain type
  • Value 1: typical angina – Value 2: atypical angina – Value 3: non-anginal pain – Value 4:

asymptomatic

  • Exercise_Induced_Angina: (1 = Yes; 2 = No)
  • BP: Resting Blood Pressure (in mm Hg on admission to the hospital)
  • thal: Maximum Heart Rate achieved
  • Cholesterol: Serum Cholesterol in mg/dl
  • Fasting_Blood_MoreThan_120: Yes or No
  • Resting_Electrocardiographic_Reading
  • Maximum_Heart_Rate
  • Old_Peak: ST depression induced by exercise relative to rest
  • Number_Blood_Vessels_Calcified (1,2,3,4)
  • Risk: (1 = Yes; 2 = No) knitr::opts_chunk$set(message = FALSE,warning = FALSE) STEP 1: Load the Libraries library(ISLR) library(readxl) library(pROC) library(lattice) library(ggplot2) library(dplyr) library(e1071) library(corrplot) library(kknn) library(ggplot2) library(multiROC) library(MLeval) library(AppliedPredictiveModeling) library(corrplot) library(Hmisc) library(dplyr) library(quantmod) library(nnet) library(caret) library(NeuralNetTools) STEP 2: Load the Data and prepare it. CHDdata<-read.csv("CHD_preprocessed.csv") str(CHDdata)
  • Visualization the Distribution by histogram (countious variables)
  • Normalize the cigPerDay