Unit 1
Types of Machine Learning Algorithms:
Supervised Learning:
- Definition: In supervised learning, the algorithm is trained on a labeled dataset, where each input is paired with the corresponding correct output. The goal is to learn a mapping from inputs to outputs.
- Example: Predicting house prices based on features like square footage, number of bedrooms, etc.
Unsupervised Learning:
- Definition: Unsupervised learning deals with unlabeled data, and the algorithm tries to find patterns or structures in the data without explicit guidance. Clustering and dimensionality reduction are common tasks.
- Example: Grouping customers based on their purchasing behavior without predefined categories.
Maximum Likelihood Estimation (MLE)-
Maximum Likelihood Estimation (MLE) method, the goal is to find the parameters of a statistical distribution in such a way that the observed data is the most probable under that distribution. In simpler terms, MLE seeks the values for the parameters that make the observed data most likely according to a specified probability distribution. The fundamental idea behind MLE is to find the values of the parameters that maximize the likelihood function, which measures how well the model explains the observed data.
- Likelihood Function:
- The likelihood function measures how well the chosen distribution explains the observed data for different parameter values.
- It is a measure of the probability of observing the data given specific values of the distribution's parameters.
$$
\hat{\theta}{\text{MLE}} = \arg\max\theta L(\theta \mid x)
$$
- Log-Likelihood:
- In practice, dealing with the product of many likelihood values can be challenging. Often, the log-likelihood function, denoted as l(θ∣x), is used instead.
l(θ∣x)=logL(θ∣x)
- Taking the logarithm simplifies calculations and does not change the location of the maximum.
- Properties of MLE:
- MLE has desirable statistical properties, such as consistency, asymptotic normality, and efficiency.
- Consistency implies that as the sample size increases, MLE converges to the true parameter values.
- Asymptotic normality means that for large samples, the distribution of MLE approaches a normal distribution.
- Applications:
- MLE is widely used in various fields, including statistics, machine learning, and econometrics.
- Common applications include parameter estimation in probability distributions, regression analysis, and model fitting
Steps in Building a Machine Learning Model:
a. Data Preprocessing:
- Data Cleaning: Handle missing values and correct errors in the dataset.
- Data Transformation: Normalize or scale features, encode categorical variables.
- Data Splitting: Divide the dataset into training and testing sets.