# inbuilt python module for regression of multivariate

I am working on the following problem:

In linear regression, I have used the python sklearn.linear_model LinearRegression
by calling fit
In that, the fit function takes two arrays the first array is independent and the second
is the dependent variable. In the current case, there are two independent variables
and one dependent variable. And we have to minimize the residual squares.
Is there a way to use the Sklearn LinearRegression here?
I am reading an image like this:

  from sklearn.linear_model import LinearRegression
reg = LinearRegression()
reg.fit()
Not sure what do I call fit with.
This is the image I am using :
enter code here


• Yes, since the LinearRegression implementation in sklearn uses Ordinary Least Squares to optimize the parameters. Have you already tried fitting it on your data? Jul 28, 2021 at 14:41
• how to threshold an image using this plane? Is there a pythonic way to do it? Jul 28, 2021 at 16:56