







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








225 ...
glucose
0
(7)
value.
typeof(subTest$TenYearCHD)
subTest$TenYearCHD<-as.integer(subTest$TenYearCHD) typeof(subTest$TenYearCHD)
typeof(prediction)
end <- proc.time()[ 3 ] print(paste("This took ", round(end-start, digits = 1 ), " seconds", sep = ""))
Improve Neural Network Performance
ggplot(varImp_nn)
plotnet(nn_model$finalModel, y_names = "CHD Risk") title("Graphical Representation of our Neural Network")
Creating and Comparing Algorithms control <- trainControl(method="repeatedcv", number= 10 , repeats= 3 ) # NNET set.seed( 100 ) fit.nnet <- train(TenYearCHD~., data=subTrain, method="nnet", trControl=control,trace=FALSE) # LDA set.seed( 100 ) fit.lda <- train(TenYearCHD~., data=subTrain, method="lda", trControl=control) # SVM set.seed( 100 ) fit.svm <- train(TenYearCHD~., data=subTrain, method="svmRadial", trControl=control) # kNN set.seed( 100 ) fit.knn <- train(TenYearCHD~., data=subTrain, method="knn", trControl=control) # Random Forest set.seed( 100 ) fit.rf <- train(TenYearCHD~., data=subTrain, method="rf", trControl=control)
algo_results <- resamples(list(NNET=fit.nnet, LDA=fit.lda, SVM=fit.svm, KNN=fit.knn, RF=fit.rf)) summary(algo_results)
NA's
0
0
0
0
0
Max. NA's
0.1724100 0
0.2332561 0
0.1478812 0
0.1723010 0
0.1510928 0 scales <- list(x=list(relation="free"), y=list(relation="free")) bwplot(algo_results, scales=scales)
Conclusion: