clustering then joins the leaves together--as we move vertically up the upside-down tree--based on how similar they are to each other the instances (or groups of instancesthat are most similar to each other are joined soonerwhile the instances that are not as similar are joined later with this iterative processall the instances are eventually linked together forming the single trunk of the tree this vertical depiction is very helpful once the hierarchical clustering algorithm has finished runningwe can view the dendrogram and determine where we want to cut the tree--the lower we cutthe more individual branches we are left with ( more clustersif we want fewer clusterswe can cut higher on the dendrogramcloser to the single trunk at the very top of this upside-down tree the placement of this vertical cut is similar to choosing the number of clusters in the -means clustering algorithm dbscan an even more powerful clustering algorithm (based on the density of pointsis known as dbscan (density-based spatial clustering of applications with noisegiven all the instances we have in spacedbscan will group together those that are packed closely togetherwhere close together is defined as minimum number of instances that must exist within certain distance we specify both the minimum number of instances required and the distance if an instance is within this specified distance of multiple clustersit will be grouped with the cluster to which it is most densely located any instance that is not within this specified distance of another cluster is labeled an outlier unlike -meanswe do not need to prespecify the number of clusters we can also have arbitrarily shaped clusters dbscan is much less prone to the distortion typically caused by outliers in the data feature extraction with unsupervised learningwe can learn new representations of the original features of data-- field known as feature extraction feature extraction can be used to reduce the number of original features to smaller subseteffectively performing dimensionality reduction but feature extraction can also generate new feature representations to help improve performance on supervised learning problems hierarchical clustering uses euclidean distance by defaultbut it can also use other similarity metrics such as correlation-based distancewhich we will explore in greater detail later in the book closer look at unsupervised algorithms