[scikit-learn] How to best understand scikit-learn and know its modules and methods?

C W tmrsg11 at gmail.com
Sun Jun 4 18:29:04 EDT 2017


Dear scikit learn list,

I am new to scikit-learn. I am getting confused about LinearRegression.

For example,
from sklearn.datasets import load_boston
from sklearn.linear_model import LinearRegression
boston = load_boston()
X = boston.data
y = boston.target
model1 = LinearRegression()
model1.fit(X, y)
print(model.coef)

I got a few questions:
1) When I do model1.fit(X, y), don't I have to save it? Does object model1
automatically gets trained/updated? Since I don't see any output, how do I
know what has been done to the model1?

2) Is there a command to see what's masked under sklearn, like
sklearn.datasets, sklearn.linear_model, and all of it?

3) Why do we need load_boston() to load boston data? I thought we just
imported it, so it should be ready to use.

Thank you very much!

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170604/074f63b2/attachment.html>


More information about the scikit-learn mailing list