Machine Learning
Machine Learning
1. Supervised Learning:
2. Unsupervised Learning:
3. Reinforcement Learning:
Dataset Formats:
1. Features:
o Features are the characteristics or properties of the data.
o In a dataset, they are the columns that describe different aspects of
an object.
o Example: In a house price dataset, features can be size, number of
bedrooms, location, and price.
2. Observations:
o Observations are individual data points or records in the dataset.
o Each observation is a row in the dataset, containing values for all
features.
o Example: One house with 1,500 sq. ft., 3 bedrooms, New York,
$500,000 is an observation.
SUPERVISED LEARNING
Linear regression aims to find the best-fitting linear equation that predicts the
dependent variable (YYY) based on the independent variable(s) (XXX). The
general form of this equation is:
Y=mX+cY = mX + cY=mX+c
where:
mmm represents the slope, indicating the change in YYY for a unit
change in XXX.
ccc is the intercept, the value of YYY when XXX is zero.
Types:
The cost function J(m,c)J(m, c)J(m,c) for Linear Regression is given by:
where:
Explanation:
Example Calculation:
Consider a dataset:
Conclusion:
The Cost Function quantifies how well the model fits the data. Lower cost
means a better fit. It is minimized during training to improve prediction
accuracy.