Generalized Linear Models
Acquire knowledge on generalized linear models for regression and classification through interactive code.
Generalized linear model for regression
A regression model that is linear in parameters , and might not necessarily be linear in the input features , is known as a generalized linear model for regression.
Note: A generalized linear model is linear in transformed features , and is typically nonlinear in the input features .
Nonlinear transformations in regression
Suppose we want to predict the total marks a student will obtain in an exam based on the number of hours they studied and the number of times they attended class. We collected data on 20 students and recorded the number of hours they studied, the number of times they attended class, and their obtained marks.
To build a linear regression model, we can start with a simple linear equation of the form:
Here, is the obtained marks, is the number of hours studied, and is the number of times attended class.
However, we might find that the relationship between the input features and the marks obtained isn’t quite linear. For example, the effect of the number of times attended class on obtained marks might ...