1.
Understanding Models
A model is an approximation of the relationship between two variables. In machine learning and
statistics, models serve as simpli ed representations of complex real-world phenomena. They aim
to capture the essential patterns and relationships within data to make predictions or provide
insights.
Evaluation - The performance of models is assessed using various metrics, depending on the type
of problem (e.g., accuracy for classi cation, mean squared error for regression).
Supervised Learning
Supervised Learning is a type of machine learning where the algorithm learns from labeled data to
predict a target variable. In this approach, the model is trained on a dataset where both the input
features and the corresponding correct outputs are provided. The goal is to learn a mapping
function that can accurately predict the output for new, unseen inputs. Supervised learning is
further divided into: Classi cation tasks: where the target variable is categorical (e.g., identifying
pneumonia from X-ray images), and Regression tasks: where the target variable is continuous
(e.g., predicting real estate prices). The model's performance is evaluated by comparing its
predictions to the known correct answers in the training data. Regression vs. Classi cation
Algorithms Both are supervised learning techniques that use labeled training data. The choice
between regression and classi cation depends on whether the target variable is continuous or
categorical. Some algorithms like decision trees can be used for both regression and
classi cation tasks.
Unsupervised Learning
Unsupervised Learning involves algorithms that learn patterns and structures from unlabeled data
without prede ned target variables. The primary objective is to discover hidden patterns,
groupings, or relationships within the data. Common techniques in unsupervised learning include
clustering, which groups similar data points together (e.g., market segmentation), and anomaly
detection, which identi es unusual patterns or outliers in the data (e.g., detecting fraudulent
activity). Unlike supervised learning, there are no explicit correct answers to guide the learning
process. Instead, the algorithm must nd meaningful structures based on the inherent properties
of the data itself. Accordingly, unsupervised learning poses challenges, such as di culty in
validating results and the need for human interpretation to ensure meaningful insights.
Phases of generating a Machine Learning Model
1. Data Collection
fi
fi
fi
fi
fi
fi
fi
fi
ffi
fi
2.
2. Generating Model - creating a machine learning model involves 4 key elements
1. Feature Selection - Methods of feature selection are:
1. Domain expertise
2. Visualisation
3. Statistical correlations
4. Modelling
2. Algorithm Selection
3.
- Linear Regression: For predicting continuous values
- Logistic Regression: For binary classi cation problems
- Decision Trees: For both classi cation and regression tasks
- Random Forests: For ensemble learning and handling complex datasets
- Support Vector Machines (SVM): For classi cation and regression tasks with high-dimensional
data
3. Hyper-parameter Tuning
4. Choosing a loss function to optimise
fi
fi
fi
5.
3. Evaluating Model