Machine Learning Introduction

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

Machine Learning

What is Machine Learning?


A subset of Artificial Intelligence focuses primarily on the creation of algorithms to
enable a computer to independently learn from previous data and experience.
Machine Learning Life Cycle
1.Gather Data
● Goal of this step is to identify and obtain all data-related problems.
● we need to identify the different data sources, as data can be collected from various sources such
as files, database, internet, or mobile devices
● The quantity and quality of the collected data will determine the efficiency of the output.
● The more will be the data, the more accurate will be the prediction.
● This step includes the below tasks
Identify various data sources
Collect data
Integrate the data obtained from different sources
● By performing the above task, we get a coherent set of data, also called as a dataset. It will be used in
further steps.
2.Data Preparation
● Is a step where we put our data into a suitable place and prepare it to use in our machine learning
training.
● In this step, first, we put all data together, and then randomize the ordering of data.
● Divided into two processes
Data Exploration
- Understand the nature, characteristics, format, and quality of the data.
- Identify correlations, general trends, and outliers to gain insights.
Data Pre-processing
Prepare the data for analysis by cleaning and transforming it as needed.
3.Data Wrangling
● Is the process of converting raw data into a useable format.
● Transforming the data in a proper format to make it more suitable for analysis in the next step.
● Cleaning of data is required to address the quality issues.
● In real-world applications, collected data may have various issues, including
Missing Values
Duplicate data
Invalid data
Noise
● Use various filtering techniques to clean the data.
● It is mandatory to detect and remove the above issues because it can negatively affect the quality of the outcome.
4.Data Analysis
● This step involves
-Selection of analytical techniques
-Building models
-Review the result
● This step aims to utilize machine learning techniques, such as classification,
regression, and clustering, to build and evaluate models that analyze cleaned and
prepared data.
5.Train Model
In this step, we use datasets to train our model with various machine learning
algorithms to improve its performance, enabling it to learn patterns, rules, and
features relevant to solving the problem effectively.
6.Test Model
● In this step, we check for the accuracy of our model by providing a test dataset
to it.
● Testing the model determines the percentage accuracy of the model as per the
requirement of project or problem.
Data Preprocessing in ML
Steps

1 2 3 4 5 6 7

Getting the Importing Importing Finding Encoding Splitting Feature


dataset libraries datasets Missing Categorica dataset scaling
Data l Data into
training
and test
set
Types Of Machine Learning
1.Supervised Learning
How Supervised Learning Works
Input data is already categorized or labeled with known outputs, and the model learns to
predict the output for new, unseen data based on the patterns it recognizes in the labeled
data.
1.Regression(‫)التوقع‬
● Used if there is a relationship between the input variable and the output variable. It is used for the prediction of
continuous variables, such as Weather forecasting, Market Trends, etc.
● Regression algorithms
• Linear Regression
• Regression Trees
• Non-Linear Regression
• Bayesian Linear Regression
• Polynomial Regression

• Evaluation: Metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error
(MAE), 𝑅2R2 score, etc.
Linear Regression
● Linear regression algorithm shows a linear relationship between a dependent (y) and one
or more independent (y) variables.
● y=β0​+β1​x+ϵ where:
• 𝑦y is the dependent variable.
• 𝑥x is the independent variable.
• 𝛽0β0​is the intercept (constant term).
• 𝛽1β1​is the coefficient (slope) that represents the relationship between 𝑥x and 𝑦y.
• 𝜖ϵ is the error term (residuals).
Linear Regression-cont
● Dependent Variable (Response Variable):
Definition: The dependent variable is the outcome or the variable you are trying to predict or explain.
Notation: It is usually denoted by 𝑦y.
Role: Its value depends on the independent variables.
Example: In a model predicting house prices, the house price is the dependent variable.
● Independent Variables (Predictors or Features):
Definition: Independent variables are the input variables used to predict the dependent variable.
Notation: They are usually denoted by 𝑥x (in simple linear regression) or 𝑥1,𝑥2,…,𝑥𝑛x1​,x2​,…,xn​(in multiple linear regression).
Role: These variables provide the information needed to make predictions about the dependent variable.
Example: In a model predicting house prices, features like square footage, number of bedrooms, and location are independent
variables.

You might also like