<div dir="ltr">Yes, they make a lot sense. Thanks!<div><br></div><div>I wanted to ask a follow-up:</div><div><br></div><div>> LinearRegression().fit(X, y)<br></div><div>When I do this, where is everything saved? Or does it disappear after I run it?</div><div><br></div><div>Thank you!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 4, 2017 at 6:40 PM, Guillaume Lemaitre <span dir="ltr"><<a href="mailto:g.lemaitre58@gmail.com" target="_blank">g.lemaitre58@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="en-GB" style="background-color:rgb(255,255,255);line-height:initial">                                                                                      <div style="width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">Hope it helps. I answered in the original message</div><div style="width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)"><br></div><div style="width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">G</div>                                                                                                                                                                                  <table width="100%" style="background-color:white;border-spacing:0px"> <tbody><tr><td colspan="2" style="font-size:initial;text-align:initial;background-color:rgb(255,255,255)">                           <div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0in 0in;font-family:Tahoma,'BB Alpha Sans','Slate Pro';font-size:10pt">  <div><b>From: </b>C W</div><div><b>Sent: </b>Monday, 5 June 2017 00:31</div><div><b>To: </b><a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a></div><div><b>Reply To: </b>Scikit-learn user and developer mailing list</div><div><b>Subject: </b>[scikit-learn] How to best understand scikit-learn and know its modules and methods?</div></div></td></tr></tbody></table><div style="border-style:solid none none;border-top-color:rgb(186,188,209);border-top-width:1pt;font-size:initial;text-align:initial;background-color:rgb(255,255,255)"></div><br><div id="m_347770856138717285_originalContent"><div dir="ltr"><span class="">Dear scikit learn list,<div><br></div><div>I am new to scikit-learn. I am getting confused about LinearRegression.</div><div><br></div><div>For example,</div><div>from sklearn.datasets import load_boston</div><div>from sklearn.linear_model import LinearRegression</div><div>boston = load_boston()</div><div>X = boston.data</div><div>y = boston.target</div><div>model1 = LinearRegression()</div><div>model1.fit(X, y)</div><div>print(model.coef)</div><div><br></div><div>I got a few questions:</div></span><div><span class=""><div>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?</div><div><br></div></span><div>The model has been fitted (trained in place). model1 will contain all info learnt directly. In addition, the output will be a fitted model1 because fit return self. Normally, model1.fit(X,y) will print LinearRegression(...)</div></div><span class=""><div><br></div><div>2) Is there a command to see what's masked under sklearn, like sklearn.datasets, sklearn.linear_model, and all of it?</div><div><br></div></span><div>You can check the documentation API. I think that this is the best user friendly thing that you can start with. </div><span class=""><div><br></div><div>3) Why do we need load_boston() to load boston data? I thought we just imported it, so it should be ready to use.</div><div><br></div></span><div>Load_boston() is a helper function which will load the data. Importing load_boston will import the function not the data. Calling the imported function will load the data. </div><span class=""><div><br></div><div>Thank you very much!</div><div><br></div><div>Mike</div></span></div>
<br></div></div>
<br>______________________________<wbr>_________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
<br></blockquote></div><br></div>