[MRG+1] DOC Simplifying margin plotting in SVM examples (#8501)#8875
[MRG+1] DOC Simplifying margin plotting in SVM examples (#8501)#8875amueller merged 3 commits intoscikit-learn:masterfrom
Conversation
examples/svm/plot_custom_kernel.py
Outdated
|
|
||
|
|
||
| def my_kernel(X, Y): | ||
| def my_kernel(X, y): |
There was a problem hiding this comment.
The y here is not the same as the y on line 20. This one should remain capitalized Y, like the kernels in the pairwise module.
There was a problem hiding this comment.
In particular, I might suggest reverting all changes to this file since it does not contribute toward the goal of this PR.
There was a problem hiding this comment.
I have made similar changes to the following:
- examples/svm/plot_svm_nonlinear.py
- examples/svm/plot_svm_margin.py
- examples/svm/plot_svm_kernels.py
Do you want me to revert these as well?
I only did this for the sake of consistency with the additions I made.
|
I would suggest so. In any case, pairwise kernels are between (X, Y), not
between (X, y): the meaning of the variables is not the same as in fit.
…On Tue, Jun 6, 2017 at 6:58 AM, Vathsala Achar ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In examples/svm/plot_custom_kernel.py
<#8875 (comment)>
:
>
-def my_kernel(X, Y):
+def my_kernel(X, y):
I have made similar changes to the following:
- examples/svm/plot_svm_nonlinear.py
- examples/svm/plot_svm_margin.py
- examples/svm/plot_svm_kernels.py
Do you want me to revert these as well?
I only did this for the sake of consistency with the additions I made.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8875 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOwUdcPuk-b_AV9plTjr2FoxGoEkoGmks5sBHoAgaJpZM4NaKY5>
.
|
|
Strictly aesthetically I think that the old plot here was much clearer, I find the wide margin and near-vertical angle confusing here. I would not spend too much time getting it to look exactly like that, but if you could get the clusters more rotated towards the corners easily by just changing the random seed or something, it'd be great. |
d8d9358 to
587f11a
Compare
* updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y
* Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y
5d24bae to
11db8aa
Compare
|
@vene I made the changes, how does this look? |
|
This LGTM |
|
LGTM as well... and maybe, one day, we'll get a helper to create the mesh... |
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors
…#8501) (scikit-learn#8875) * Simplifying margin plotting in SVM examples (scikit-learn#8501) * updated to use contour levels on decision function * separating unbalanced class now uses a red line to show the change in the decision boundary when the classes are weighted * corrected the target variable from Y to y * DOC Updates to SVM examples * Fixing flake8 issues * Altered make_blobs to move clusters to corners and be more compact * Reverted changes converting Y to y * Fixes for flake8 errors






Changes for Issue #8501
updated to use contour levels on decision function
the unbalanced class (in plot_separating_hyperplane_unbalanced.py) now uses a red line to show the change in the decision boundary when the classes are weighted
corrected the target variable from Y to y in other svm examples