## What does grid search CV do?

Grid search is an approach to parameter tuning that will methodically build and evaluate a model for each combination of algorithm parameters specified in a grid. The recipe below evaluates different alpha values for the Ridge Regression algorithm on the standard diabetes dataset. This is a one-dimensional grid search.

**What is randomized Search CV?**

Randomized search on hyper parameters. RandomizedSearchCV implements a fit and a score method. In contrast to GridSearchCV, not all parameter values are tried out, but rather a fixed number of parameter settings is sampled from the specified distributions.

### What is randomized search?

Random search (RS) is a family of numerical optimization methods that do not require the gradient of the problem to be optimized, and RS can hence be used on functions that are not continuous or differentiable. Such optimization methods are also known as direct-search, derivative-free, or black-box methods.

**What is entropy in decision tree?**

Entropy. A decision tree is built top-down from a root node and involves partitioning the data into subsets that contain instances with similar values (homogenous). ID3 algorithm uses entropy to calculate the homogeneity of a sample.

#### How do you find the maximum depth in a decision tree?

There is no theoretical calculation of the best depth of a decision tree to the best of my knowledge. So here is what you do: Choose a number of tree depths to start a for loop (try to cover whole area so try small ones and very big ones as well) Inside a for loop divide your dataset to train/validation (e.g. 70%/30%)

**Is decision tree a regression?**

Decision trees where the target variable can take continuous values (typically real numbers) are called regression trees. In decision analysis, a decision tree can be used to visually and explicitly represent decisions and decision making.

## Which nodes have the maximum entropy in a decision tree?

Logarithm of fractions gives a negative value and hence a ‘-‘ sign is used in entropy formula to negate these negative values. The maximum value for entropy depends on the number of classes. The feature with the largest information gain should be used as the root node to start building the decision tree.

**How do you find the best split in decision tree?**

Decision Tree Splitting Method #1: Reduction in VarianceFor each split, individually calculate the variance of each child node.Calculate the variance of each split as the weighted average variance of child nodes.Select the split with the lowest variance.Perform steps 1-3 until completely homogeneous nodes are achieved.