Question: Use this R script code to answer these 4 formulas. breast = read.csv ( file . choose ( ) , header = TRUE

Use this R script code to answer these 4 formulas.
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))
 Use this R script code to answer these 4 formulas. breast=read.csv(file.choose(""),header=TRUE)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!