Q1: Discuss the reasons for using Bayesian analysis when faced with uncertainty in making decisions.
Q2: Objective: Utilize NaÃ¯ve Bayes to predict the flight delay.
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlinesOrder Paper Now
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)
> 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!
â€¢ 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: