Question: When designing a class for the node objects ,the class should have at least the following fields: is.1eaf :a logical variable that indicates whether the

When designing a class for the node objects ,the class should have at least the following fields: is.1eaf :a logical variable that indicates whether the node is a leaf or an internal node; height : a numeric variable that stores the height of the node; observations : a list or vector that stores all observations (or indices of these observations) in the cluster represented by the node; left.node : if the node is an internal node ,left.node points to its left child; and right.node : if the node is an internal node ,right.node points to its right child. These will be sufficient for completing Task 2(a). To complete Task 2(b), you may need to add more elds to the class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
