June 17, 2018

Shiny Application & Reproducible Pitch

Course project goals: -

  • Demonstrate any Machine Learning concept through interactive web application
    • Concept of "Basic Least Squares" is being demonstrated
  • Create a Shiny application and host it on ShinyApps.io
  • Provide a reproducible pitch presentation for the Shiny application

Shiny App

  • Intent of this app is to interactively search the Mean of a sample data
    • Min: 61.70
    • Max: 73.70
    • Mean (known): 68.09
  • User can interactively adjust the expected Mean value such that Basic Least Squares approaches 0.0

Showing Glimpse of R code in Slide

Server.r code snippet

    # Source dataset 'galton' from 'UsingR' library
    data(galton)
    
    # UI input variables    
    mu <- input$sliderMean
    showXlab <- input$show_xlab
    
    mse <- mean((galton$child - mu)^2)
    g <- ggplot(galton, aes(x = child)) + 
      geom_histogram(fill = "salmon", colour = "black", binwidth = 1) + 
      geom_vline(xintercept = mu, size = 3) + 
      ggtitle(paste("mu = ", mu, "; MSE = ", round(mse, 2), sep = ""))
    if (input$show_xlab){ g <- g + labs(x = "Galton Child Age") }
    if (input$show_ylab){ g <- g + labs(y = "Child Count") }
    g

Links to Shiny App & Slides