Regression is a supervised learning activity by which we seek to identify the
link that exists between input and output data of an experiment starting from
a sequence of inputs and the corresponding observations of the outputs. If we
attempt to find this link as a linear function, then we apply linear regression.
Suppose that the input data is x1 , • • • , xn and the corresponding output
sequence is y1 , . . . , yn and we seek to determine the linear function f (x) = ax+b
such that values yi are as close as possible to axi + b for 1 ≤ i ≤ n. This is
achieved by minimizing the total square error given by: