Skip to content

Commit

Permalink
[MRG] Examples fixes (scikit-learn#11539)
Browse files Browse the repository at this point in the history
* fix contours in gpc xor example

* use LinearSVC in plot_column_transformer
  • Loading branch information
amueller authored and agramfort committed Jul 16, 2018
1 parent d986354 commit b0e91e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/compose/plot_column_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from sklearn.metrics import classification_report
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.svm import SVC
from sklearn.svm import LinearSVC


class TextStats(BaseEstimator, TransformerMixin):
Expand Down Expand Up @@ -117,7 +117,7 @@ def transform(self, posts):
)),

# Use a SVC classifier on the combined features
('svc', SVC(kernel='linear')),
('svc', LinearSVC()),
])

# limit the list of categories to make running this example faster.
Expand Down
4 changes: 2 additions & 2 deletions examples/gaussian_process/plot_gpc_xor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
image = plt.imshow(Z, interpolation='nearest',
extent=(xx.min(), xx.max(), yy.min(), yy.max()),
aspect='auto', origin='lower', cmap=plt.cm.PuOr_r)
contours = plt.contour(xx, yy, Z, levels=[0], linewidths=2,
linetypes='--')
contours = plt.contour(xx, yy, Z, levels=[0.5], linewidths=2,
colors=['k'])
plt.scatter(X[:, 0], X[:, 1], s=30, c=Y, cmap=plt.cm.Paired,
edgecolors=(0, 0, 0))
plt.xticks(())
Expand Down

0 comments on commit b0e91e4

Please sign in to comment.