Background of GLM
While linear models are practical for modeling real-world phenomena because of their simplicity in training and model application, they assume a normal distribution in the dependent (target) variable and a linear impact of the independent (predictor) variables on the dependent variable.
For generalized linear models, the dependent variable is related to the predictor variables through a link function. Moreover, the dependent variable in a generalized linear model can have a non-normal distribution, such as Poisson.
The GLM algorithm finds the best-fitting model in a specified number of iterations. In calculating the best fit, the error is represented by the sum of squares of the differences between the predicted value and the actual value of the dependent variable.