Question

Task 1 Following the Naïve Bayes classification example in the slides, please predict if the player...

Task 1

Following the Naïve Bayes classification example in the slides, please predict if the player go out to play if

1. the outlook is Overcast

2. the temperature is cool

3. the humidity is high

4. not windy

Task 2

Please import the “admit.csv” into Rstudio. In this dataset, we know the GRE score, the GPA, and the rank of 400 applicants for a graduate program. We also know if each of the candidates is admitted. In the admit column, 1 stands for “admitted”, and 0 stands for “rejected”. We are going to do clustering based on GRE and GPA for these applicants. Do not forget to standardize the dataset before clustering.

Please do hierarchical clustering using complete link method. If you want only two clusters, what cluster is the 4th applicant in? If you want three clusters, what cluster is the 4th applicant in?

Please show the codes while answer the questions.


R programming

0 0
Add a comment Improve this question Transcribed image text
Answer #1

task1:answer is If the given conditions are met then the player go out for playing .   

task2 :

for this we have to apply the k meas clustering algorithm which has 5 steps for which the dataset is required in the given question the data set of the GRE GPA and the rank of the 400 candidates will given ,with the help of this the data is created in which clustering the data used by k means clustering algorithm .

  1. Specify the number of clusters (K) to be created (by the analyst)
  2. Select randomly k objects from the dataset as the initial cluster centers or means
  3. Assigns each observation to their closest centroid, based on the Euclidean distance between the object and the centroid
  4. For each of the k clusters update the cluster by calculating the new mean values of all the data points in the cluster. The centoid of a Kth cluster is a vector of length p containing the means of all variables for the observations in the kth cluster; p is the number of variables.
  5. minimize the total within sum of square. That is, iterate steps 3 and 4 until the cluster assignments stop changing or the maximum number of iterations is reached. By default, the R software uses 10 as the default value for the maximum number of iterations.

after this we required to make the clusters in which one cluster denotes  the same set of the data like the student score the rank between 100-200 is come in cluster one and other 200-300 comes in other cluster and so on .

for clustering we scalling the data using r functions.

data("GRE") //LOADIG THE DATASET

df <- scale(GRE) //SCALLING THE DATA

head(df, n = 3) //VIEW THE FIRST THREE ROWS

Add a comment
Know the answer?
Add Answer to:
Task 1 Following the Naïve Bayes classification example in the slides, please predict if the player...
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
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