Skip to content

[MRG+2] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. - #7730

Merged
TomDLT merged 5 commits into
scikit-learn:masterfrom
Deborah-Digges:patch-1
Oct 25, 2016
Merged

TomDLT merged 5 commits into
scikit-learn:masterfrom
Deborah-Digges:patch-1

Conversation

@Deborah-Digges

Copy link
Copy Markdown
Contributor

Reference Issue

No issue exists for this change currently

What does this implement/fix? Explain your changes.

This is a small fix to documentation, correcting the name of a function.

Any other comments?

The function 1 / (1 + np.exp(-x)) is the logistic function.
The logit function is the inverse of the logistic function : log(x/(1-x)). I've corrected this in one of the examples.

@Deborah-Digges Deborah-Digges changed the title Small correction of logit->logistic [MRG] Small correction of logit->logistic Oct 23, 2016
@raghavrv

Copy link
Copy Markdown
Member

It's indeed a logistic function. Thanks @Deborah-Digges!

Could you also add some labels to the plot (set different colors for the linear regression and logistic regression)? :)

@raghavrv raghavrv added this to the 0.18.1 milestone Oct 23, 2016
@raghavrv

Copy link
Copy Markdown
Member

(I'm adding this to 0.18.1 milestone)

@Deborah-Digges

Copy link
Copy Markdown
Contributor Author

Sure @raghavrv !
Would you like me to open a separate PR for it?

@raghavrv

Copy link
Copy Markdown
Member

You could do that in this PR itself. Add an additional commit and push :)

@Deborah-Digges

Copy link
Copy Markdown
Contributor Author

Sure. 👍
I'll update this PR soon. Thank you:)

@Deborah-Digges

Deborah-Digges commented Oct 24, 2016 •

Copy link
Copy Markdown
Contributor Author

screen shot 2016-10-24 at 9 46 14 pm

- Used different colors for logistic and linear plots - Added legend - Added ticks to the Axes

@raghavrv Please do review.

Comment thread examples/linear_model/plot_logistic.py Outdated
plt.ylim(-.25, 1.25)
plt.xlim(-4, 10)

plt.legend(('Logistic Curve', 'Least Squares Line'), loc="lower right",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you label these as

  • Logistic Regression model and
  • Linear Regression model

@raghavrv

Copy link
Copy Markdown
Member

Besides the comment, this looks good to me... Thanks!

@Deborah-Digges

Copy link
Copy Markdown
Contributor Author

@raghavrv done 👍

@raghavrv raghavrv changed the title [MRG] Small correction of logit->logistic [MRG] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. Oct 24, 2016
@raghavrv raghavrv changed the title [MRG] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. [MRG + 1] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. Oct 24, 2016
@raghavrv

Copy link
Copy Markdown
Member

@agramfort @TomDLT A second look please?

@TomDLT

TomDLT commented Oct 24, 2016

Copy link
Copy Markdown
Member

LGTM, waiting for continuous integration then I'll merge

@TomDLT TomDLT changed the title [MRG + 1] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. [MRG+2] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. Oct 24, 2016
@amueller

Copy link
Copy Markdown
Member

travis fails pep8.

Deborah-Digges and others added 5 commits October 25, 2016 09:29
The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`
@Deborah-Digges

Copy link
Copy Markdown
Contributor Author

@raghavrv @TomDLT @amueller I've fixed the pep8 errors.

All checks seem to be passing now 👍

@TomDLT
TomDLT merged commit 3c18735 into scikit-learn:master Oct 25, 2016
@TomDLT

TomDLT commented Oct 25, 2016

Copy link
Copy Markdown
Member

thanks @Deborah-Digges 😃

amueller pushed a commit to amueller/scikit-learn that referenced this pull request Oct 25, 2016
…ements to the plot. (scikit-learn#7730)

* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
amueller pushed a commit to amueller/scikit-learn that referenced this pull request Oct 27, 2016
…ements to the plot. (scikit-learn#7730)

* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
…ements to the plot. (scikit-learn#7730)

* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
…ements to the plot. (scikit-learn#7730)

* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…ements to the plot. (scikit-learn#7730)

* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…ements to the plot. (scikit-learn#7730)

* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants