시작하기무료로 시작하기

Cutting the tree

Remember from the video that cutree() is the R function that cuts a hierarchical model. The h and k arguments to cutree() allow you to cut the tree based on a certain height h or a certain number of clusters k.

In this exercise, you will use cutree() to cut the hierarchical model you created earlier based on each of these two criteria.

이 연습은 강의의 일부입니다

Unsupervised Learning in R

강의 보기

연습 안내

The hclust.out model you created earlier is available in your workspace.

  • Cut the hclust.out model at height 7.
  • Cut the hclust.out model to create 3 clusters.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Cut by height


# Cut by number of clusters
코드 편집 및 실행