You should be using lm = LinearRegression()
and not lm = LinearRegression
.
You can use lm.fit?
to see the signature of the method. You would see that it is
Signature: lm.fit(self, X, y, sample_weight=None)
So your X is being assigned to self, and bos.PRICE to X, and it is complaining that y is not provided. Seeing the self there should give you an indication that the wrong method is being called.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…