R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

task_df <- data.frame(
  Task = c(
    "Finding if a football team will win or lose",
    "Finding the customers of a company based on their gender",
    "Finding if a person will live past the age of 100",
    "Sorting a student database based in student ID",
    "Determining the type of trips married people usually take",
    "Determining if an applicant will default on a loan",
    "Finding the topic of a collection of articles",
    "Predicting if an earthquake will strike next year",
    "Predicting the outcomes of tossing a (fair) pair of dice",
    "Finding if the heart rate of a patient is abnormal"
  ),
  Classification = c(
    "Classification",
    "Not ML",
    "Classification",
    "Not ML",
    "Clustering",
    "Classification",
    "Clustering",
    "Classification",
    "Probability Estimation (Not ML)",
    "Classification"
  ),
  stringsAsFactors = FALSE
)

Including Plots

You can also embed plots, for example:

convert_temperature <- function(value, from, to) {
  key <- paste(from, to, sep = "_")
  
  switch(key,
         "C_F" = (value * 9/5) + 32,
         "C_K" = value + 273.15,
         "F_C" = (value - 32) * 5/9,
         "F_K" = (value - 32) * 5/9 + 273.15,
         "K_C" = value - 273.15,
         "K_F" = (value - 273.15) * 9/5 + 32,
         "Invalid conversion"
  )
}

convert_temperature(100, "C", "F")  
## [1] 212
convert_temperature(32, "F", "C")  
## [1] 0
convert_temperature(300, "K", "F")  
## [1] 80.33

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.