Linear and Logistic Regression Revision Notes Flashcards

1
Q

Definition of Linear Regression

A

In linear regression the machine is trained using known features and known labels, the machine learns to fit the feature combinations/weightings to the label. Once this is complete it can then predicts labels for new and unknown items.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Definition of Logistic Regression

A

Logistic regression is a method for predicting binary outcomes from data. Examples of binary outcomes are yes/no, win/lose, alive/dead, and so on. It is used when the dependent variable is categorical and the goal is to find the relationship between the dependent variable and one or more independent variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

mathematical formulation for linear

A

A bike rental store which loans bikes out in the city.
They want a model built which can make use of their historic data to predict the daily rental demand to allow for inventory planning and staff rota planning.
Have data for the past 18 months, including the amount of bikes rented out on each date. We have also been able to source historic weather data.

Mathematical formulation looks like y=f(x)

Y is the predicted label, f is the function that operates on the features represented by x. So details about the day of week or weather are x, number of rentals is y, f is the function that calculates the number of rentals based on that data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

mathematical formulation for logistic

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Appropriate use cases for linear regression

A

Predicting Continuous Data: When you want to predict outcomes that are continuous. This could include predicting things like temperatures, sales amounts, or scores.
Trend Forecasting: When you are interested in understanding the trend or direction of data. For instance, if you want to forecast future sales based on historical data.
Risk Assessment: When you want to assess risk or potential, such as in the financial sector for credit scoring or the insurance industry for claim amounts.
Resource Allocation: When planning resource distribution based on historical utilization patterns, such as staffing or inventory levels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Appropriate use cases for logistic regression

A

Binary Outcomes Prediction: When the outcome you are interested in is binary, such as yes/no, pass/fail, win/lose, alive/dead. This includes scenarios like determining whether an email is spam or not, or if a credit card transaction is fraudulent.
Medical Diagnostics: In health care, to predict the presence or absence of a disease (e.g., diabetes, cancer) based on patient characteristics.
Customer Churn Analysis: When a company is interested in predicting whether a customer will churn or not, to take proactive retention measures.
Marketing Campaign Effectiveness: To predict whether a customer will respond to a campaign, which can help in targeting marketing strategies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly