• Home
  • Blog
  • Bayesian Algorithm and Decision Trees

Bayesian Algorithm and Decision Trees

0 comments

1. Examine the Bayesian algorithm for classification.

The attached flights dataset contains the on-time performance of domestic flights operated by large air carriers.

Please use R Studio to complete.

Calculate the conditional probability of the “Delay” given “Carrier = DL,” “Day of Week=Saturday (7),” “Destination = LGA,” and “Origin = DCA.” (Show your work by writing both equations and computation in R.)

2. Use this Ebay Dataset for the following below and complete in R Studio also

The attached file contains information about 1,972 auctions on eBay.com. The goal is to use these data to build a model that will classify auction as competitive or non-competitive. A competitive auction is defined as an auction with at least two bids placed on the time auctioned. The data include variables that describe the item (auction category), the seller (his/her eBay rating), and the auction terms that the seller selected (auction duration, opening price, currency, day-of-week of auction close). The price at which the auction closed is also included.

Your task is to predict whether or not the auction will be competitive. To complete the task, please convert variable “duration” into a categorical variable, and split the data into training (70%) and testing (30%) datasets. Find the best classification tree (with the avoidance of over fitting), and write down the results in terms of rules.

a.Change the data type for columns as needed, and split the data in train and test randomly.

b.Train, test, and plot the tree by using tree package. Provide a detailed explanation of the splitting criteria you used, and provide the accuracy for the results. Explain the output of the confusion matrix.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}