Learn practical skills, build real-world projects, and advance your career

Introduction to Linear Regression:-Estimating yield of Apples and Oranges

Linear regression is a machine leaning algorithm based on supervised learning (we have input variables and an output variable and we use an algorithm to learn the mapping function from the input to the output).Regression is estimating the relationships between a dependent variable(output variable) and one or more independent variables(input variables).In Linear Regression we find a linear relation between independent variables and dependent variable for predicting the value of the dependent variable.

Problem Statement:
Predict the yeild of apples and oranges(dependent variables) by observing the average temperature,rainfall and humidity (independent variables) for a region.

Training data :

linear-regression-training-data

The target variables are considered the weighted sum of the input variables, offset by some constant called the bias.

This can be represented mathematically as :-

yeild_apples= w11 * temp + w12 * rainfall +w13 * humidity + b1

yeild_oranges= w21 * temp + w22 * rainfall +w23 * humidity + b2

These equations shows that the dependent variables share a linear relation between the dependent variables.