What are two steps of tree pruning work?

pessimistic pruning and optimistic pruning
postpruning and prepruning
cost complexity pruning and time complexity pruning
none of the options

The correct answer is: B. postpruning and prepruning

Pruning is a technique used in decision trees to reduce the size of the tree by removing branches that are unlikely to be correct. There are two main types of pruning: postpruning and prepruning.

Postpruning is done after the tree has been constructed. The algorithm looks at the leaves of the tree and removes any leaves that have a low probability of being correct.

Prepruning is done before the tree is constructed. The algorithm looks at the data set and removes any examples that are likely to be misclassified.

Both postpruning and prepruning can be used to improve the accuracy of a decision tree. However, postpruning is more commonly used because it is less computationally expensive.

A. pessimistic pruning and optimistic pruning are not the two steps of tree pruning work. Pessimistic pruning is a type of postpruning that removes branches that are likely to be incorrect. Optimistic pruning is a type of postpruning that removes branches that are likely to be correct.

C. cost complexity pruning and time complexity pruning are not the two steps of tree pruning work. Cost complexity pruning is a type of postpruning that balances the cost of building the tree with the cost of misclassification. Time complexity pruning is a type of postpruning that removes branches that are unlikely to be correct in a short amount of time.

D. none of the options is not the correct answer.

Exit mobile version