subject

The reported height and height datasets were collected from three classes taught in the Departments of Computer Science and Biostatistics, as well as remotely through the Extension School. The Biostatistics class was taught in 2016 along with an online version offered by the Extension School. On 2016-01-25 at 8:15 AM, during one of the lectures, the instructors asked students to fill in the sex and height questionnaire that populated the reported height dataset. The online students filled the survey during the next few days, after the lecture was posted online. We can use this insight to define a variable, call it type, to denote the type of student: inclass or online: The code below sets up the dataset for you to analyze in the following exercises:
library(dslabs)
library(dplyr)
library(lubridate)
data("reported heights")
dat mutate(reported-heights, date-time ynd hms(time-stamp)) %)% <. filter(date-time )s make-date(2016, θ1, 25) & date-time < make-date(2016, θ2, 1)) %)% mutateltype İfelse(day(date-time)-= 25 & hour(date-time)-= 8 & between(minute(date-time), 15, 30),
"inclass","online")) %)%
select (sex, type)
y <-factor <- dat$sex, c("Female", "Male"))
x <-dat$type
In the course videos, height cutoffs were used to predict sex. Instead of using height, use the type variable and report your prediction accuracy Use what you learned about Q1 to make an informed guess about sex based on the most prevalent sex for each type. You do not need to split the data into training and test sets.
Write a line of code using the table function to show the confusion matrix between y_hat and y Use the format function(a, b) for your answer and do not name the columns and rows.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:00, candiceforever123
Idon understand these and need some ! ?
Answers: 2
image
Computers and Technology, 23.06.2019 01:00, leo4687
Complete the sentence about a presentation delivery method
Answers: 2
image
Computers and Technology, 23.06.2019 08:30, Calirose
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, rscvsdfsrysas3712
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
You know the right answer?
The reported height and height datasets were collected from three classes taught in the Departments...

Questions in other subjects:

Konu
Mathematics, 09.01.2020 19:31
Konu
Mathematics, 09.01.2020 19:31