Question

class on time on time on time none late none day season wind rain weekday spring none none weekday winter none slight weekday
Entering the data: 1 Enter the data from Figure 3.1 in the text into R. Either you can enter it directly into Ror alternately
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Reading the data file

> train=read.csv(file = "Data.csv")
> attach(train)

2. Loading the naive bayes package
> library(naivebayes)
naivebayes 0.9.7 loaded
Warning message:
package ‘naivebayes’ was built under R version 3.6.3

3. Building the model
> nbModelSum2020 <- naive_bayes(class~., train,laplace = 1)

4. Creating test dataset
> test<- train[,c(1,2,3,4)]

5. Adding new rows
> testNB1 <- rbind(test,c("weekday","winter","high","heavy"),
+ c("weekday","summer","high","heavy"),
+ c("Sunday","summer","normal","slight"))

Add a comment
Know the answer?
Add Answer to:
class on time on time on time none late none day season wind rain weekday spring...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • scribed previously. on time on time very late on time on time very late summer day...

    scribed previously. on time on time very late on time on time very late summer day season wind rain class weekday spring none none on time weekday winter none slight on time weekday winter none slight weekday winter high heavy late saturday summer normal none weekday autumn normal none holiday summer high slight sunday normal none weekday winter high heavy weekday summer none slight on time saturday spring high heavy cancelled weekday summer high slight on time saturday winter normal...

  • C++ Project Modify the Date Class: Standards Your program must start with comments giving your name...

    C++ Project Modify the Date Class: Standards Your program must start with comments giving your name and the name of the assignment. Your program must use good variable names. All input must have a good prompt so that the user knows what to enter. All output must clearly describe what is output. Using the date class, make the following modifications: Make the thanksgiving function you wrote for project 1 into a method of the Date class. It receive the current...

  • TEST 1: ANSWERS INTS EACH). This section takes around 5 minutes. Name Spring 2019 8) A researcher wants to determine whether female teachers give higher or lower grades, on average, then male t...

    TEST 1: ANSWERS INTS EACH). This section takes around 5 minutes. Name Spring 2019 8) A researcher wants to determine whether female teachers give higher or lower grades, on average, then male teachers. She picks a random sample by picking a random sample of schools, in the schools picked, picking a random sample of departments, and in the departments picked, picking a random sample of teachers. What kind of sampling was performed? d) voluntary response e) cluster b) stratified Random...

  • Please answer all of the following. The boxplot below shows the number of contacts in their...

    Please answer all of the following. The boxplot below shows the number of contacts in their cell by gender for my Spring 2018 statistics classes. Using the boxplot, answer the 4 questions below. Boxplot of CellNumbers 900 800 700 600 500 400 300 200 100 0 Male Female Gender CellNumbers Which distribution has 3 outliers? Which distribution appears skewed right, excluding 1. Male 1 outliers? 2. Female Which distribution is 1 3. Both less variable (has the smaller IQR)? 4....

  • A Day at the Beach - Case Study on Lipid Metabolism By Justin Hines, Lafayette College,...

    A Day at the Beach - Case Study on Lipid Metabolism By Justin Hines, Lafayette College, and Marcy Osgood, University of New Mexico Jessie knew she was late for the family reunion, probably too late for the big picnic lunch at Forest Lake Beach, but too early for the barbecue dinner. “Too bad,” she thought, because she had skipped breakfast, trying to beat the traffic as she left the city. She hoped there would be some leftovers, because she was...

  • **TStack.py below** # CMPT 145: Linear ADTs # Defines the Stack ADT # # A stack (also called a pushdown or LIFO stack)...

    **TStack.py below** # CMPT 145: Linear ADTs # Defines the Stack ADT # # A stack (also called a pushdown or LIFO stack) is a compound # data structure in which the data values are ordered according # to the LIFO (last-in first-out) protocol. # # Implementation: # This implementation was designed to point out when ADT operations are # used incorrectly. def create(): """ Purpose creates an empty stack Return an empty stack """ return '__Stack__',list() def is_empty(stack): """...

  • What are the differences between Apple production in the US and China? What would make production...

    What are the differences between Apple production in the US and China? What would make production more feasible in the United States? Should Apple or other companies move more production to the US? A Tiny Screw Shows Why iPhones Won't Be 'Assembled in U.S.A.' A screw from the late 2013 model of the Mac Pro.CreditJames Nieves/The New York Times A screw from the late 2013 model of the Mac Pro.CreditCreditJames Nieves/The New York Times By Jack Nicas • Jan. 28,...

  • After Fran graduated with an undergraduate art degree in 2008, she decided to combine her knowledge...

    After Fran graduated with an undergraduate art degree in 2008, she decided to combine her knowledge and love of art with a second love—plants and flowers—toward developing a business. Her intent was to focus on a specialty niche in the flower shop business. She decided to concentrate her efforts on make-to-order special flower arrangements, like are typically found at banquets and weddings. Due to her talent and dedication to doing a good job, she was highly successful, and her business...

  • second attempt. need asap please 2-4 sentences summarizing the article 4 interesting quotes from the article...

    second attempt. need asap please 2-4 sentences summarizing the article 4 interesting quotes from the article and 4 points explaining each quote In the first few years of the new millennium, at the height of the boom in the offshore call-center business, Tata Consultancy Services, the Indian technology-services giant, made the counterintuitive decision to divest its call-center operations. Why? Because although outsourced call centers were a fast-growing piece of its current business, TCS’s leadership had come to believe that they...

  • please help and thank you Materials Needed per class: 1 box of 24 microscope slides of...

    please help and thank you Materials Needed per class: 1 box of 24 microscope slides of meiosis 1 1 box of 24 microscope slides of meiosis 2 red and yellow popbead chromosome kits Objectives To become familiar with the process of meiosis and to be able to identify the principal phases of meiosis To understand how the process of meiosis is similar to mitosis and how it differs from mitosis Introduction The genetic information of a cell is encoded in...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT