Question: atus , counterfeit , genuine Replace A B C D and E in the code below to create this plot. ggplot ( banknote , ,

atus
, counterfeit
, genuine
Replace A
B
C
D and E in the code below to create this plot.
ggplot (banknote,, colour =[D]
[E]()
6. Now, let's perform k-means clustering. We will ignore the fact that the banknotes are classified as genuine or counterfeit, and work only with the variables Top and Diagonal to see if the k-means algorithm with k=2 will cluster the genuine notes into a group and the counterfeit notes into a group. Firstly, we will create a new dataset that contains only the Top and Diagonal from the banknote dataset. Then we will run the kmeans algorithm with 2 clusters on this data. Replace A
B and C in the code such that this objective can be achieved.
banknote2- banknote %>%
[A](Top, Diagonal)
kmean_res -[B](banknote2, centers =[C])
2
7. Next we want to visualise the results in the following way:
library (factoextra)
, data = banknote2,[C]= "point")
8. Based on comparing the plot in 3 with the plot in 1, did the k-means algorithm cluster all the genuine notes into the same cluster? Give a reason for your answer.
atus , counterfeit , genuine Replace A B C D and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!