<div dir="auto">You should instantiate LogisticRegression() before fitting. </div><div dir="auto"><br></div><div dir="auto">logreg = LogisticRegression().fit(Xnp,ynp)</div><div dir="auto"><br></div><div dir="auto">[]’s </div><div dir="auto"><br></div><div dir="auto">Maykon Schots </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em dom., 1 de nov. de 2020 às 23:41, The Helmbolds via scikit-learn <<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:bookman old style,new york,times,serif;font-size:16px" dir="ltr">What parentheses?</div><div style="font-family:bookman old style,new york,times,serif;font-size:16px" dir="ltr">Enclosing what?</div></div><div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px">"You won't find the right answers if you don't ask the right questions!" (Robert Helmbold, 2013)</div><div style="font-family:bookman old style,new york,times,serif;font-size:16px">
</div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px">
</div><div id="m_102218421165142925yahoo_quoted_4887310850">
<div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#26282a">
<div>
On Sunday, November 1, 2020, 02:58:46 PM MST, Guillaume Lemaître <<a href="mailto:g.lemaitre58@gmail.com" target="_blank">g.lemaitre58@gmail.com</a>> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="m_102218421165142925yiv1943027152"><div><div dir="ltr">You forgot the parentheses to instantiate the object LogisticRegression<br clear="none"></div><br clear="none"><div><div id="m_102218421165142925yiv1943027152yqt20735"><div dir="ltr">On Sun, 1 Nov 2020 at 22:55, The Helmbolds via scikit-learn <<a href="mailto:scikit-learn@python.org" rel="nofollow" shape="rect" target="_blank">scikit-learn@python.org</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><div style="padding:0px;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255)"><div style="padding:0.4em;text-align:left;color:rgb(0,0,0);line-height:1.21em" dir="ltr"><pre style="margin:0px;padding:1px 0px;border-radius:0px;border:0px none;color:black;line-height:inherit;overflow:auto;font-family:monospace;font-size:inherit;vertical-align:baseline;display:block;white-space:pre-wrap;background-color:transparent">Here's my ynp and Xnp arrays:
Print ynp
[0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 1 0 0 1
1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0
1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1
1 1 1 1 1 1 1 1 1 1 1 1]
Shape of ynp = 160
Print Xnp
[-3.00000000e+00 -2.95000000e+00 -2.90000000e+00 -2.85000000e+00
-2.80000000e+00 -2.75000000e+00 -2.70000000e+00 -2.65000000e+00
-2.60000000e+00 -2.55000000e+00 -2.50000000e+00 -2.45000000e+00
-2.40000000e+00 -2.35000000e+00 -2.30000000e+00 -2.25000000e+00
-2.20000000e+00 -2.15000000e+00 -2.10000000e+00 -2.05000000e+00
-2.00000000e+00 -1.95000000e+00 -1.90000000e+00 -1.85000000e+00
-1.80000000e+00 -1.75000000e+00 -1.70000000e+00 -1.65000000e+00
-1.60000000e+00 -1.55000000e+00 -1.50000000e+00 -1.45000000e+00
-1.40000000e+00 -1.35000000e+00 -1.30000000e+00 -1.25000000e+00
-1.20000000e+00 -1.15000000e+00 -1.10000000e+00 -1.05000000e+00
-1.00000000e+00 -9.50000000e-01 -9.00000000e-01 -8.50000000e-01
-8.00000000e-01 -7.50000000e-01 -7.00000000e-01 -6.50000000e-01
-6.00000000e-01 -5.50000000e-01 -5.00000000e-01 -4.50000000e-01
-4.00000000e-01 -3.50000000e-01 -3.00000000e-01 -2.50000000e-01
-2.00000000e-01 -1.50000000e-01 -1.00000000e-01 -5.00000000e-02
-2.28983499e-15 5.00000000e-02 1.00000000e-01 1.50000000e-01
2.00000000e-01 2.50000000e-01 3.00000000e-01 3.50000000e-01
4.00000000e-01 4.50000000e-01 5.00000000e-01 5.50000000e-01
6.00000000e-01 6.50000000e-01 7.00000000e-01 7.50000000e-01
8.00000000e-01 8.50000000e-01 9.00000000e-01 9.50000000e-01
1.00000000e+00 1.05000000e+00 1.10000000e+00 1.15000000e+00
1.20000000e+00 1.25000000e+00 1.30000000e+00 1.35000000e+00
1.40000000e+00 1.45000000e+00 1.50000000e+00 1.55000000e+00
1.60000000e+00 1.65000000e+00 1.70000000e+00 1.75000000e+00
1.80000000e+00 1.85000000e+00 1.90000000e+00 1.95000000e+00
2.00000000e+00 2.05000000e+00 2.10000000e+00 2.15000000e+00
2.20000000e+00 2.25000000e+00 2.30000000e+00 2.35000000e+00
2.40000000e+00 2.45000000e+00 2.50000000e+00 2.55000000e+00
2.60000000e+00 2.65000000e+00 2.70000000e+00 2.75000000e+00
2.80000000e+00 2.85000000e+00 2.90000000e+00 2.95000000e+00
3.00000000e+00 3.05000000e+00 3.10000000e+00 3.15000000e+00
3.20000000e+00 3.25000000e+00 3.30000000e+00 3.35000000e+00
3.40000000e+00 3.45000000e+00 3.50000000e+00 3.55000000e+00
3.60000000e+00 3.65000000e+00 3.70000000e+00 3.75000000e+00
3.80000000e+00 3.85000000e+00 3.90000000e+00 3.95000000e+00
4.00000000e+00 4.05000000e+00 4.10000000e+00 4.15000000e+00
4.20000000e+00 4.25000000e+00 4.30000000e+00 4.35000000e+00
4.40000000e+00 4.45000000e+00 4.50000000e+00 4.55000000e+00
4.60000000e+00 4.65000000e+00 4.70000000e+00 4.75000000e+00
4.80000000e+00 4.85000000e+00 4.90000000e+00 4.95000000e+00]
Shape of Xnp = 160
Press ENTER to continue =
Now Call Logistic Regression
</pre></div></div><div style="padding:0px;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255)"><div style="margin:0px;padding:0px 0.4em;text-align:right;line-height:1.21em;font-family:monospace;min-width:15ex"></div><div style="padding:0.4em;text-align:left;color:rgb(0,0,0);line-height:1.21em"><pre style="margin:0px;padding:1px 0px;border-radius:0px;border:0px none;color:black;line-height:inherit;overflow:auto;font-family:monospace;font-size:inherit;vertical-align:baseline;display:block;white-space:pre-wrap;background-color:transparent"><span style="color:rgb(178,43,49);font-weight:bold">---------------------------------------------------------------------------</span>
<span style="color:rgb(178,43,49);font-weight:bold">TypeError</span> Traceback (most recent call last)
<span style="color:rgb(0,116,39);font-weight:bold"><ipython-input-3-300811cacc0b></span> in <span style="color:rgb(96,198,200)"><module></span>
<span style="color:rgb(0,162,80)"> 103</span>
<span style="color:rgb(0,162,80)"> 104</span> aprint<span style="color:rgb(178,125,18);font-weight:bold">(</span><span style="color:rgb(0,101,202);font-weight:bold">"Now Call Logistic Regression"</span><span style="color:rgb(178,125,18);font-weight:bold">)</span>
<span style="color:rgb(0,116,39);font-weight:bold">--> 105</span><span style="color:rgb(178,125,18);font-weight:bold"> </span>logreg <span style="color:rgb(178,125,18);font-weight:bold">=</span> LogisticRegression<span style="color:rgb(178,125,18);font-weight:bold">.</span>fit<span style="color:rgb(178,125,18);font-weight:bold">(</span>Xnp<span style="color:rgb(178,125,18);font-weight:bold">,</span> ynp<span style="color:rgb(178,125,18);font-weight:bold">)</span>
<span style="color:rgb(0,162,80)"> 106</span> aprint<span style="color:rgb(178,125,18);font-weight:bold">(</span><span style="color:rgb(0,101,202);font-weight:bold">"Print logreg output"</span><span style="color:rgb(178,125,18);font-weight:bold">)</span>
<span style="color:rgb(0,162,80)"> 107</span> print<span style="color:rgb(178,125,18);font-weight:bold">(</span>logreg<span style="color:rgb(178,125,18);font-weight:bold">)</span>
<font style="background-color:rgb(253,239,43)"><span style="color:rgb(178,43,49);font-weight:bold">TypeError</span>: fit() missing 1 required positional argument: 'y'
</font></pre></div></div></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><font style="background-color:rgb(253,239,43)"></font><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px" dir="ltr">Eh!?!?</div><div style="font-family:bookman old style,new york,times,serif;font-size:16px" dir="ltr"><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px" dir="ltr">What happened<b><i>???</i></b> </div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><br clear="none"></div><div style="font-family:bookman old style,new york,times,serif;font-size:16px">"You won't find the right answers if you don't ask the right questions!" (Robert Helmbold, 2013)</div></div>_______________________________________________<br clear="none">
scikit-learn mailing list<br clear="none">
<a href="mailto:scikit-learn@python.org" rel="nofollow" shape="rect" target="_blank">scikit-learn@python.org</a><br clear="none">
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="nofollow" shape="rect" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br clear="none">
</blockquote></div></div><br clear="all"><br clear="none">-- <br clear="none"><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span></span><div><div>Guillaume Lemaitre<br clear="none"></div></div><div><span>Scikit-learn @ Inria Foundation</span><br clear="none"><a href="https://glemaitre.github.io/" rel="nofollow" shape="rect" target="_blank">https://glemaitre.github.io/</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div id="m_102218421165142925yqt34240">_______________________________________________<br clear="none">scikit-learn mailing list<br clear="none"><a href="mailto:scikit-learn@python.org" shape="rect" target="_blank">scikit-learn@python.org</a><br clear="none"><a href="https://mail.python.org/mailman/listinfo/scikit-learn" shape="rect" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br clear="none"></div></div>
</div>
</div></div>_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Schots</div>