Linear regression is an algorithm (belonging to both statistics and machine learning) that models the relationship between two or more variables by fitting a linear equation to a dataset. Independent variables are the features (input data) and dependent variables are the target (what you are trying to predict).