How to create a linear regression dataset with sklearn and make predictions on it
In the past few posts I have been focusing on how to make classification datasets, such as half moons, blobs, circles, and other types of classification datasets. My most recent post on creating datasets, classification datasets in particular, can be found here:- https://medium.com/mlearning-ai/how-to-make-a-classification-dataset-and-predict-on-it-in-python-feaea3844052
In this post, however, I am going to discuss how to make a simple regression dataset.
Regression analysis is one of the most important fields of statistics and machine learning. Regression searches for relationships among variables. In regression analysis, some phenomenon of interest must be considered, and it must have a number of observations. Each observation must have two or more features, and one feature must be dependent on the others in order to try to establish a relationship among them.
Regression problems have one continuous and unbounded dependent variable. The inputs, however, can be continuous, discrete, or even categorical. Regression is needed to determine how some phenomenon influences another, or how several variables are related.
Linear regression is probably one of the most important and widely used regression techniques. It is a very simple…