### Our Services

Get 15% Discount on your First Order

# Check the attachments Please read the instructions and questions carefully in ” Assignment_5_2024_Fall.pdf” file and use “Auto.csv” to finish the as

Check the attachments

## Please read the instructions and questions carefully in ” Assignment_5_2024_Fall.pdf” file and use “Auto.csv” to finish the assignment. You should submit both 1) an R code ; 2) A PDF report with answers through the link “Submit Assignment 5 Here”.

Guidelines:

· Use only R for this assignment

· Submit both R code and Report on findings

· Work is to be done individually for this assignment

1. In this problem, you will generate simulated data, and then perform K-means clustering on the data.

1.1 Generate a simulated data set with 30 observations in each of two classes (i.e. 60 observations in total), and 2 variables.

Code Hint: The first four lines of codes should be:

set.seed(2) x=matrix(rnorm(60*2), ncol=2) x[1:30,1]=x[1:30,1]+3

x[1:30,2]=x[1:30,2]-4

1.2 Perform K-means clustering of the observations with K = 2. Plot the data with each observation colored according to its cluster assignment (nstart=20). Take a screenshot of your plot. What is the total within-cluster sum of squares?

1.3 Perform K-means clustering with K = 3. Plot the data with each observation colored according to its cluster assignment (nstart=20). Take a screenshot of your plot. What is the total within-cluster sum of squares?

1.4 Now perform K-means clustering with K = 4. Plot the data with each observation colored according to its cluster assignment (nstart=20). Take a screenshot of your plot. What is the total within-cluster sum of squares?

1.5 Using the scale () function, perform K-means clustering with K = 2 on the data after scaling each variable to have standard deviation one. Take a screenshot of your plot. What is the total within-cluster sum of squares now? How do these results compare to those obtained in (2)?

1

2. Consider the USArrests data. We will now perform hierarchical clustering on the states. USArrests dataset is part of the base R package. You do not need to load any libraries.

2.1 Plot the hierarchical clustering dendrogram using complete linkage clustering with Euclidean distance as the dissimilarity measure. Take a screenshot of your plot.

2.2 Cut the dendrogram at a height that results in three distinct clusters. Which states belong to which clusters? You need to provide state names for each cluster (e.g. Cluster 1 has Alabama, Alaska,…).

2.3 Hierarchically cluster the states using complete linkage and Euclidean distance, after scaling the variables to have standard deviation one.

a) Take a screenshot of your plot.

b) What effect does scaling the variables have on the hierarchical clustering obtained?

c) In your opinion, should the variables be scaled before the inter-observation dissimilarities are computed? Provide a justification for your answer.

2.4 After scaling the variables to have standard deviation one, plot the hierarchical clustering dendrogram using average linkage clustering with Euclidean distance as the dissimilarity measure. Take a screenshot of your plot.

2.5 After scaling the variables to have standard deviation one, plot the hierarchical clustering dendrogram using single linkage clustering with Euclidean distance as the dissimilarity measure. Take a screenshot of your plot.

What to submit:

1.
R code.

a. Should include all the code to accomplish the tasks.

b. Clear and concise comments to indicate what part of the assignment each code chunk pertains to.

c. Code should be easily readable.

d. Filename should be in the format of: LastnameFirstname_A5.R

2.
Report.

a. Take screenshots of your outputs in R Studio and answer all the questions.

b. Submit in PDF format.

c. Answers questions clearly and concisely.

d. Includes appropriate plots. Make sure the plots are properly labeled.

e. The assignment will be graded on the correctness of the answers, comprehensiveness of the analysis, clarity of results’ presentation and neatness of the report.

Order a Similar Paper and get 15% Discount on your First Order

## Related Questions

### 1- Read “Case 18.3: Wearable Technologies Supporting AI in Healthcare” and write an essay that answers the following questions: 1. What is

1- Read “Case 18.3: Wearable Technologies Supporting AI in Healthcare” and write an essay that answers the following questions: 1. What is wearable technology, and how has it evolved beyond its initial purpose of tracking athletic activities? 2. What are the different types of data that wearable technology can collect,

### Discuss some hardening techniques or products you have used for Workstations

Discuss some hardening techniques or products you have used for Workstations

### After the Executive Committee’s meeting, Peter Joseph, the President, and CEO of Container Manufacturing Solutions (CMS) was contented with the briefing

After the Executive Committee’s meeting, Peter Joseph, the President, and CEO of Container Manufacturing Solutions (CMS) was contented with the briefing that you made on how enterprise architecture can help the organization. Mr. Joseph is now interested in the risks involved in creating an EA. He wants you to prepare

### Please write a reflection summary of what you have learned these past 16 weeks in the course “Physical Security” Also, tell me what things I did as an in

Please write a reflection summary of what you have learned these past 16 weeks in the course “Physical Security” Also, tell me what things I did as an instructor that were the most helpful to you, as well as any suggestions you have for further improving this course. Thank you, and I

### Perform a LOPA (Layers of Protection Analysis) of your local living area or work location. Remember to get permission from security.

Perform a LOPA (Layers of Protection Analysis) of your local living area or work location. Remember to get permission from security.

### 4/18/24, 11:38 AM Assignment Information 1/3 IT 200 Project Two The IT Professional Guidelines and Rubric Competency In this project, you will

4/18/24, 11:38 AM Assignment Information 1/3 IT 200 Project Two The IT Professional Guidelines and Rubric Competency In this project, you will demonstrate your mastery of the following competency: Articulate the roles and functions of the information technology professional Scenario Whether you are just beginning your career in information technology

### Lab Assignment #9 Confirmatory Factor Analysis using AMOS Goal of Exercise:  The goal of this exercise is to introduce how to operationalize the CFA

Lab Assignment #9 Confirmatory Factor Analysis using AMOS Goal of Exercise:  The goal of this exercise is to introduce how to operationalize the CFA using AMOS. The exercise allows students to learn how to check if the measurement model has acceptable levels of goodness-of-fit and evidence of construct validity.

### Lab – Configure IPv6 Addresses on Network Devices Lab – Configure IPv6 Addresses on Network Devices Topology Addressing

Lab – Configure IPv6 Addresses on Network Devices Lab – Configure IPv6 Addresses on Network Devices Topology Addressing Table Device Interface IPv6 Address Prefix Length Default Gateway R1 G0/0/0 2001:db8:acad:a::1 64 N/A R1 G0/0/1 2001:db8:acad:1::1 64 N/A S1 VLAN 1 2001:db8:acad:1::b 64 N/A PC-A NIC 2001:db8:acad:1::3 64 fe80::1 PC-B NIC

### Assignment 5 Due Saturday 11:59 pm (Week 12) Part 1 (40 points) This dataset contains State-by-state data on COVID-19 vaccinations in the United

Assignment 5 Due Saturday 11:59 pm (Week 12) Part 1 (40 points) This dataset contains State-by-state data on COVID-19 vaccinations in the United States from 1/2/2021 to 8/2/2021. You will be required to answer the following questions by timeseries analysis. * For vaccines that require multiple doses, each individual dose

,, I will upload more information about it to know better about the material Hi all, the instructions for the final project are attached. You are allowed to finish the project within 2 days at most. you can choose and tell me which option is easy and fast you

### file attached Read “Case 14.3: AI at Airbnb” and write an essay that answers the following questions: 1. How has Airbnb’s

file attached Read “Case 14.3: AI at Airbnb” and write an essay that answers the following questions: 1. How has Airbnb’s business model transformed the travel industry? 2. How does Airbnb use sentiment analysis to improve its services? 3. How does text mining help Airbnb gain insights from guest reviews?

### Prepare First, download and install CrypTool. If using a Windows® PC, install CrypTool 1.  If using a MAC PC, install JCrypTool. Note: In order for

Prepare First, download and install CrypTool. If using a Windows® PC, install CrypTool 1.  If using a MAC PC, install JCrypTool. Note: In order for the CrypTool program to function, you must first OPEN a text file. Only then will items on the toolbar become enabled. Additional information for this

### Why is an update/patch process crucial for any organization to have and follow?  Discuss some issues that may arise when patching and updating

Why is an update/patch process crucial for any organization to have and follow?  Discuss some issues that may arise when patching and updating machines.

Tasks may not be submitted as cloud links, such as links to Google Docs, Google Slides, OneDrive, etc., unless specified in the task requirements. All other submissions must be file types that are uploaded and submitted as attachments (e.g., .docx, .pdf, .ppt). A.  Address ethical issues for cybersecurity by

### The Cybersecurity Analyst’s Toolbox (Required/Graded) Discussion Topic During job interviews, employers often ask if you are

The Cybersecurity Analyst’s Toolbox (Required/Graded) Discussion Topic During job interviews, employers often ask if you are familiar with cybersecurity software. For this reason, it is a good idea to become familiar with commonly used software, including capabilities and limitations. These software products are the tools for conducting your day-to-day duties.

### Explain the differences between desktop and laptop architecture.  What features are specific to laptops and laptop displays? Describe the evolution of

Explain the differences between desktop and laptop architecture.  What features are specific to laptops and laptop displays? Describe the evolution of laptops into other mobile devices.

### I’m working on a WebApp platform React project. I have a small requiement that needs to be done. Enabling file upload option for a text field. I have

I’m working on a WebApp platform React project. I have a small requiement that needs to be done. Enabling file upload option for a text field. I have added a screenshot to understand the requirement better.