Objective: Utilize Naïve Bayes to predict the flight delay. Given the FlightDelay.csv file, use Naïve Bayesian Analysis model to determine whether the various flights experience delay or arrive at their destination on time. We start by clicking the “install” on your R plot window (as shown below) to type and install the following packages: naivebayes, dplyr, ggplot2, and psych; one at a time. After the installation of all the packages, load them into the memory through these commands: > library (naivebayes) > library (dplyr) > install.packages(ggplot2) > library (psych) Next, we load the .csv file and check the statistical properties of the csv file as follow: > setwd(“C:/RData”) # your working directory > tumor <- read.csv(“FlightDelay.csv”) # loading the file > str(FlightDelay) # check the properties of the file . . . continue from here! Important Note: • You need to split your data into test-data (tdata) and validated-data (vdata). • Use tdata to build Naïve Bayes’ model and use vdata to predict your model. • The dependent variable (y) of the model is delay. • The independent variables are dest, origin, carrier, deptime, weather, & dayweek. • Show your conclusion. Mandatory video on Naïve Bayer classification using R programming: https://www.youtube.com/watch?v=RLjSQdcg8AM
Cookie and Privacy Settings
Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.
These cookies are strictly necessary to provide you with services available through our website and to use some of its features.
We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.
We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.
Google Webfont Settings:
Google Map Settings:
Vimeo and Youtube video embeds: