FAM Unit6
FAM Unit6
Classification and
Regression
Linear Regression-
Y = β0 + β 1 X
• Y is a dependent variable.
• X is an independent variable.
• β0 and β1 are the regression coefficients.
• β0 is the intercept or the bias that fixes the offset to a
line.
• β1 is the slope or weight that specifies the factor by
which X has an impact on Y.
• Multiple Linear Regression
outputs.
• MAE=1/n∑∣Y–Y^∣
• Here,
• n is the number of observations
• Y represents the actual values.
• Y^ represents the predicted values
RMSE=
MSE
Mean Absolute Percentage Error(MAPE)
• R2 = 1 – (RSS/TSS)
• R2 represents the required R Squared value,
• RSS represents the residual sum of squares, and
• TSS represents the total sum of squares.
• (txt book)
Confusion Matrix
• Used in classification problem which displays
TP,TN,FP,FN counts.
• It is also used to calculate various classification
metrics such as Accuracy, Precision, Recall and
F1 score.
ROC curve
• ROC curve used in binary classification , plots
the true positive rate (TPR) against the False
positive rate (FPR) at different threshold.
• Residual Plot
Residual plot is used for assessing the
performance of Regression Model.
It displays the discrepancies between predicted
and actual values.
• Multiclass Classification
Binary logistic regression
• Binary logistic regression works well for binary classification problems
that have only two possible outcomes. The dependent variable can have
only two values, such as yes and no or 0 and 1.
• Even though the logistic function calculates a range of values between 0
and 1, the binary regression model rounds the answer to the closest values.
Generally, answers below 0.5 are rounded to 0, and answers above 0.5 are
rounded to 1, so that the logistic function returns a binary outcome.
Linear regression is used to predict the Logistic regression is used to predict the
continuous dependent variable using a given categorical dependent variable using a given
set of independent variables. set of independent variables.
Least square estimation method is used for Maximum likelihood estimation method is used
estimation of accuracy. for Estimation of accuracy.
The output must be continuous value, such as Output must be categorical value such as 0 or
price, age, etc. 1, Yes or no, etc.