Machine_Learning for prediction of diabetes

Zhanyou Xu
August 12, 2018

First Slide

To test the Shiny app, please visit: https://bioinformatics-biostatistics.shinyapps.io/AAA111/.

The app includes the following four pains

  • Load your data
  • Model selection and tune the model parameters
    • 3 models:
      • Random Forest (RF),
      • Logistic Regression (LR), and
      • Support Vector Machine (SVM)
  • Run the prediction
  • Download the results

Slide With Code to show the data

library(mlbench)
data(PimaIndiansDiabetes)
dim(PimaIndiansDiabetes)
[1] 768   9
head(PimaIndiansDiabetes)[1:2,]
  pregnant glucose pressure triceps insulin mass pedigree age diabetes
1        6     148       72      35       0 33.6    0.627  50      pos
2        1      85       66      29       0 26.6    0.351  31      neg

Slide With Plot

# check the correlation of the predictors
library("corrplot")
M <- cor(PimaIndiansDiabetes[, 1:(ncol(PimaIndiansDiabetes)-1)])
corrplot(M, method = "circle")

plot of chunk unnamed-chunk-2

Slide With 10-fold cross validation

    folder accuracy
1 folder_1   0.7208
2 folder_2   0.7403
3 folder_3   0.7857
4 folder_4   0.7532
5 folder_5   0.7500
[1] "Thank you for your attention, and please try my Shiny App at:        <https://bioinformatics-biostatistics.shinyapps.io/AAA111/>, and email me at        zhanyouxu@gmail.com if you have any questions and feedbacks. Thank you!"