Question

In: Computer Science

Machine Learning - clustering Having generated a dendrogram, can we “prune” it?

Machine Learning - clustering

Having generated a dendrogram, can we “prune” it?

Solutions

Expert Solution

Prune is a technique in machine learning that reduces the size of clustering trees by removing branches of the tree. Pruning reduces the complexity of clustering trees and improves predictive accuracy by the reduction of overtraining.

Clustering having generated a dendrogram We can Prune it based on top down or bottom up fashion. A top down pruning will traverse nodes from top level nodes to bottom level nodes and cuts subtrees starting at the root, while a bottom up pruning will traverse nodes from bottom level nodes to top level nodes and cuts subtrees start at the leaf nodes.

There are two popular pruning algorithms.

  1. Reduced error pruning: Reduced error pruning start at the leaf nodes, each node is replaced with its most popular class. If the prediction accuracy is not done then the change is kept.
  2. Cost complexity pruning: Cost complexity pruning generates a series of trees y0 to yn y0 is the initial tree and yn is the root tree. At step i, the tree is created by removing a subtree from tree i-1 and replacing it with a leaf node with value chosen as in the tree building algorithm.

The function prune(T,t) defines the tree obtained by pruning the subtrees ‘t’ from the tree ‘T’. Once the series of trees has been created, the best tree is chosen based accuracy as measured by a training set or cross-validation.

We can prune a Clustering tree having generated a dendrogram based on the labels:

example:

par(mfrow = c(1,2))
dend15 %>% set("labels_colors") %>% 
   plot(main = "main tree", ylim = c(0,4))
dend15 %>% set("labels_colors") %>%
   prune(c("1","5")) %>% 
   plot(main = "Prune tree", ylim = c(0,4))

Related Solutions

We are learning about The Iliad in mythology and I'm having a bit of troble understanding...
We are learning about The Iliad in mythology and I'm having a bit of troble understanding the context. Can someone summarize the story for me to better understand and assist me with these questions! Can we view the behavior of Agamemnon or Achilles as appropriate for heroes? How does the characterization of Hector help define heroic behavior for early Greeks?
We are learning about The Iliad in mythology and I'm having a bit of troble understanding...
We are learning about The Iliad in mythology and I'm having a bit of troble understanding the context. Can someone summarize the story for me to better understand and assist me with these questions! Can we view the behavior of Agamemnon or Achilles as appropriate for heroes? How does the characterization of Hector help define heroic behavior for early Greeks?
We are learning about Ramayana in Mythology and I'm having a bit of trouble understanding the...
We are learning about Ramayana in Mythology and I'm having a bit of trouble understanding the story. Why would Rama be set apart as a true hero? The story of Rama and Sita is a favorite story that parents tell their children. What purpose does the Ramayana serve as an instructional story for Indian culture? What effect do the test and temptations have on the heroic character?
How can we ensure that nurses engage in lifelong learning?
How can we ensure that nurses engage in lifelong learning?
1. Define the concept of “Machine Learning”. 2. Summarise two applications of machine learning and the...
1. Define the concept of “Machine Learning”. 2. Summarise two applications of machine learning and the value it create.
Identify several areas where artificial intelligence (AI) and machine learning (ML) are having practical consequences, through...
Identify several areas where artificial intelligence (AI) and machine learning (ML) are having practical consequences, through your own research and via reading/responding to colleagues.   Carry on a reasonably intelligent conversation about these different methods, showing knowledge of current events, the social milieu in which the occur and have impact, the role of AI, and some understanding of the specific elements of the AI/ML methods involved. Characterize one area in depth where AI/ML methods have changed the game remarkably within the...
2. “As long as we do not mind having high inflation, we can achieve as low...
2. “As long as we do not mind having high inflation, we can achieve as low a level of unemployment as we want. All we have to do is increase the demand for goods and services by using, for example, expansionary monetary policy.” True or false? Explain and illustrate your answer.
Machine Learning - multivariate methods Let us say in two dimensions, we have two classes with...
Machine Learning - multivariate methods Let us say in two dimensions, we have two classes with exactly the same mean. What type of boundaries can be defined? show a picture of the options
Synchronous and Induction Machine Questions Q1: How do we find induced voltage, frequency, synchronous reactance, generated...
Synchronous and Induction Machine Questions Q1: How do we find induced voltage, frequency, synchronous reactance, generated voltage at pf for a synchronous generator? Q2: How do we find slip and number of poles, speed of rotor, load torque, induced torque in a induction motor? Q3: Based on an induction motor test(no-load, blocked-rotor test)- what are the circuit parameters and how do we draw the circuit? Q4: For a synchronous machine, how do we draw phasor diagram?
1. 3 types of machine learn algorithms - regression, clustering, and classification. Please give examples to...
1. 3 types of machine learn algorithms - regression, clustering, and classification. Please give examples to each of these algorithms to explain what business question can be answered by these algorithms. 2. Please describe the overfitting issue in supervised learning, and what method do we usually use to solve it. 3. Describe the definition and difference between supervised and unsupervised learning.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT