Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer in R Studio Code please!!! breast - read.csv ( file . choose ( ) , header = TRUE ) attach (

Please answer in R Studio Code please!!!
breast - read.csv(file.choose(""), header = TRUE)
attach(breast)
model2- glm(as.factor(BenignMalignant) ~ ClumpThickness + CellSizeUniformity + CellShapeUniformity + MarginalAdhesion + SingleEpithelialCell + BareNuclei + BlandChromatin + NormalNucleoli + Mitoses, family = binomial(link = "logit"))
breast$prediction2- exp(predict(model2, breast))/(1+ exp(predict(model2, breast)))
for(i in 1:699){
if(breast$prediction2[i]>0.5){
breast$prediction2[i]-4
} else {
breast$prediction2[i]-2
}
}
table(as.factor(breast$BenignMalignant), as.factor(breast$prediction2))
table(as.factor(breast$prediction), as.factor(breast$prediction2))
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What do you think of the MBO program developed by Drucker?

Answered: 1 week ago