__1.What is Machine Learning?__

Machine learning is a branch of artificial intelligence that

focuses on developing algorithms and statistical models, enabling computer

systems to learn and make predictions or decisions without being explicitly

programmed. It involves the study of algorithms and statistical models that

computers use to perform tasks and improve their performance through

experience.

__2.What are the types of Machine Learning?__

There are three main types of machine learning:

a) Supervised Learning: In this type, the algorithm learns

from labeled data, making predictions or classifications based on past

examples.

b) Unsupervised Learning: Here, the algorithm learns fromunlabeled data, discovering patterns and relationships without any predefined

outputs.

c) Reinforcement Learning: This type involves an agent

learning through trial and error interactions with an environment to maximize

rewards.

__3.What is the difference between Overfitting and
Underfitting?__

Overfitting occurs when a model learns too much from the

training data, leading to poor performance on new, unseen data. It happens when

the model becomes too complex, capturing noise or irrelevant patterns in the

training set. Underfitting, on the other hand, occurs when a model fails to

capture the underlying patterns in the data, resulting in high bias and low

accuracy.

__4.Explain the Bias-Variance Tradeoff.__

The bias-variance tradeoff is a fundamental concept in

machine learning. Bias refers to the error introduced by approximating a

real-world problem with a simplified model, while variance measures the model’s

sensitivity to fluctuations in the training data. A high-bias model tends to

underfit, while a high-variance model tends to overfit. Achieving an optimal

balance between bias and variance is crucial for building a well-performing

machine learning model.

__5.What are the evaluation metrics used for assessing a
machine learning model?__

Common evaluation metrics in machine learning include

accuracy, precision, recall, F1 score, and area under the receiver operating

characteristic curve (AUC-ROC). The choice of metric depends on the problem at

hand, such as classification, regression, or clustering.

__6.What is the difference between Bagging and Boosting?__

Bagging and boosting are ensemble learning techniques that

combine multiple machine learning models for improved performance. In bagging,

multiple models are trained independently on different subsets of the training

data, and their predictions are combined through averaging or voting. Boosting,

on the other hand, trains models sequentially, where each subsequent model

focuses on the mistakes made by the previous models, resulting in a strongerfinal model.

__7.Explain the concept of Regularization.__

Regularization is a technique used to prevent overfitting inmachine learning models. It adds a penalty term to the model’s objective

function, discouraging complex or large weights. By controlling the model’s

complexity, regularization helps in generalizing well to new, unseen data.

__8.What is the difference between L1 and L2
regularization?__

L1 and L2 regularization are two common forms of

regularization:

L1 regularization (Lasso) adds the absolute value of thecoefficients as a penalty term, leading to sparse solutions by encouraging some

coefficients to become zero.

L2 regularization (Ridge) adds the squared sum of the

coefficients as a penalty term, resulting in smaller but non-zero coefficients.

__9.What is the difference between supervised and
unsupervised learning?__

Supervised learning involves training a model on labeled

data, where the algorithm learns from input-output pairs to make predictions or

classifications. Unsupervised learning, on the other hand, deals with unlabeled

data and focuses on finding patterns, relationships, or clusters in the data

without any predefined output.

__10.How does a decision tree work in machine learning?__

A decision tree is a flowchart-like structure where each

internal node represents a feature, each branch represents a decision rule, and

each leaf node represents an outcome or a class label. The tree is built by

recursively splitting the data based on the most informative features until a

stopping criterion is met. During prediction, the input traverses the decision

tree, following the path based on feature values, and the corresponding outcome

is determined.

__11.What is the curse of dimensionality?__

The curse of dimensionality refers to the challenges faced

when working with high-dimensional data. As the number of dimensions increases,

the data becomes sparse, and the volume of the space expands exponentially.

This sparsity leads to increased computational complexity, decreased

efficiency, and a higher risk of overfitting.

__12.Explain the concept of cross-validation.__

Cross-validation is a technique used to assess the

performance of a machine learning model. It involves dividing the available

data into multiple subsets or folds. The model is trained on a subset of the

data and evaluated on the remaining fold. This process is repeated multiple

times, with different combinations of training and evaluation sets.Cross-validation provides a more robust estimate of a model’s performance and

helps in selecting hyperparameters and avoiding overfitting.

__13.What is gradient descent, and how does it work?__

Gradient descent is an optimization algorithm commonly used

in machine learning to minimize the loss function of a model. It iteratively

adjusts the model’s parameters by calculating the gradients of the loss

function with respect to each parameter. The parameters are updated in the

opposite direction of the gradient, moving towards the minimum of the lossfunction. This process continues until convergence is reached or a stopping

criterion is met.

__14.What is the difference between precision and
recall?__

Precision and recall are evaluation metrics used in

classification tasks:

Precision measures the proportion of correctly predicted

positive instances out of all instances predicted as positive. It focuses on

the model’s ability to avoid false positives.

Recall, also known as sensitivity or true positive rate,

measures the proportion of correctly predicted positive instances out of all

actual positive instances. It focuses on the model’s ability to avoid false

negatives.

__15.Explain the concept of regularization in neural
networks.__

Regularization in neural networks aims to prevent

overfitting by adding a penalty term to the loss function. It discourages

complex models by penalizing large weights or high parameter values.

Regularization techniques such as L1 and L2 regularization (also known as

weight decay) help in achieving a balance between fitting the training data

well and generalizing to unseen data.

__16.What is the role of activation functions in neural
networks?__

Activation functions introduce non-linearities into neural

networks, enabling them to model complex relationships between inputs and

outputs. They determine the output of a neuron based on the weighted sum of

inputs. Common activation functions include sigmoid, tanh, ReLU, and softmax,

each suited for different tasks and network architectures.