Repository: scikit-learn/scikit-learn
Pull request: [MRG+2] default gamma='auto' in SVC
<!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->

#### Reference Issues/PRs

Fixes #8361 
Fixes #8535 
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->


#### What does this implement/fix? Explain your changes.

Deprecates the default SVC gamma parameter value of "auto", which is calculated as 1 / n_features, and introduces "scale", which is calculated as 1 / (n_features * X.std()).


#### Any other comments?

I couldn't fix all the doctests since I'm not sure how to run doctests using pytest (I asked on gitter, though haven't received a response), otherwise using `make test` will more time to see which docs need to be fixed.

<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->


Problem statement:
gamma="auto" in SVC
It's a bit unfortunate that we just changed the parametrization of ``SVC``'s ``gamma`` (from 0 to ``"auto"``), but I just realized that using ``1 / (n_features * X.std())`` would be a much much better default than the current ``1 / n_features``.

Not sure there's a good way to change it though.

I wonder whether we should at some point do a breaking release like matplotlib did, but that might lead to more issues than it solves... (I kind of regret that we didn't change the cv=3 to cv=5 default when doing the ``model_selection`` refactoring).

Hints from issue discussion:
Agreed on every sentence of this issue (including the last one :( ).

'auto-scale'

On 16 February 2017 at 02:18, Gael Varoquaux <notifications@github.com>
wrote:

> Agreed on every sentence of this issue (including the last one :( ).
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/scikit-learn/scikit-learn/issues/8361#issuecomment-280038733>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAEz6-tRiq9IaVfwCAxHZvKaiDNhvT7-ks5rcxc8gaJpZM4MB1or>
> .
>

> 'auto-scale'

Or maybe simple "scale". But what worries me most is yet another
deprecation cycle. The danger is the instability that it brings to
scikit-learn. But if, on average, it make things work really better...

I think this is worth it, so let's do ``scale``.
For whoever fixes this, it needs a [deprecation cycle](http://scikit-learn.org/dev/developers/contributing.html#deprecation)
I'm currently working on this.
We had a release 0.19 in which this change wasn't included (we still have `gamma='auto'` as default). Is this issue in-line to be ready to be present in the next release?
@gxyd this issue is open, so no, as you've seen #8535 is not merged yet.
> I just realized that using 1 / (n_features * X.std()) would be a much much better default than the current 1 / n_features.

I would be interested to know why is that so (i.e. why `1 / (n_features*X.std()` would be a better default)? You can refer me to some material if you have in mind for this statement.

Commit message: fix pycodestyle errors

Patch to review:
diff --git a/doc/modules/cross_validation.rst b/doc/modules/cross_validation.rst
index c68bb7ef275b0..c6bc42f6e3783 100644
--- a/doc/modules/cross_validation.rst
+++ b/doc/modules/cross_validation.rst
@@ -44,7 +44,7 @@ data for testing (evaluating) our classifier::
   >>> X_test.shape, y_test.shape
   ((60, 4), (60,))
 
-  >>> clf = svm.SVC(kernel='linear', C=1).fit(X_train, y_train)
+  >>> clf = svm.SVC(gamma='scale', kernel='linear', C=1).fit(X_train, y_train)
   >>> clf.score(X_test, y_test)                           # doctest: +ELLIPSIS
   0.96...
 
@@ -103,7 +103,7 @@ a model and computing the score 5 consecutive times (with different splits each
 time)::
 
   >>> from sklearn.model_selection import cross_val_score
-  >>> clf = svm.SVC(kernel='linear', C=1)
+  >>> clf = svm.SVC(gamma='scale', kernel='linear', C=1)
   >>> scores = cross_val_score(clf, iris.data, iris.target, cv=5)
   >>> scores                                              # doctest: +ELLIPSIS
   array([ 0.96...,  1.  ...,  0.96...,  0.96...,  1.        ])
@@ -156,7 +156,7 @@ validation iterator instead, for instance::
       ...     iris.data, iris.target, test_size=0.4, random_state=0)
       >>> scaler = preprocessing.StandardScaler().fit(X_train)
       >>> X_train_transformed = scaler.transform(X_train)
-      >>> clf = svm.SVC(C=1).fit(X_train_transformed, y_train)
+      >>> clf = svm.SVC(gamma='scale', C=1).fit(X_train_transformed, y_train)
       >>> X_test_transformed = scaler.transform(X_test)
       >>> clf.score(X_test_transformed, y_test)  # doctest: +ELLIPSIS
       0.9333...
@@ -165,7 +165,8 @@ validation iterator instead, for instance::
     estimators, providing this behavior under cross-validation::
 
       >>> from sklearn.pipeline import make_pipeline
-      >>> clf = make_pipeline(preprocessing.StandardScaler(), svm.SVC(C=1))
+      >>> clf = make_pipeline(preprocessing.StandardScaler(),
+      ...                     svm.SVC(gamma='scale', C=1))
       >>> cross_val_score(clf, iris.data, iris.target, cv=cv)
       ...                                                 # doctest: +ELLIPSIS
       array([ 0.97...,  0.93...,  0.95...])
@@ -202,7 +203,7 @@ predefined scorer names::
     >>> from sklearn.model_selection import cross_validate
     >>> from sklearn.metrics import recall_score
     >>> scoring = ['precision_macro', 'recall_macro']
-    >>> clf = svm.SVC(kernel='linear', C=1, random_state=0)
+    >>> clf = svm.SVC(gamma='scale', kernel='linear', C=1, random_state=0)
     >>> scores = cross_validate(clf, iris.data, iris.target, scoring=scoring,
     ...                         cv=5, return_train_score=False)
     >>> sorted(scores.keys())
diff --git a/doc/modules/ensemble.rst b/doc/modules/ensemble.rst
index ef46d5a3fe5f1..32f49dd77d3bf 100644
--- a/doc/modules/ensemble.rst
+++ b/doc/modules/ensemble.rst
@@ -1029,7 +1029,7 @@ Vector Machine, a Decision Tree, and a K-nearest neighbor classifier::
    >>> # Training classifiers
    >>> clf1 = DecisionTreeClassifier(max_depth=4)
    >>> clf2 = KNeighborsClassifier(n_neighbors=7)
-   >>> clf3 = SVC(kernel='rbf', probability=True)
+   >>> clf3 = SVC(gamma='scale', kernel='rbf', probability=True)
    >>> eclf = VotingClassifier(estimators=[('dt', clf1), ('knn', clf2), ('svc', clf3)], voting='soft', weights=[2,1,2])
 
    >>> clf1 = clf1.fit(X,y)
diff --git a/doc/modules/learning_curve.rst b/doc/modules/learning_curve.rst
index 71a8533583eb7..eaefdb03c3c63 100644
--- a/doc/modules/learning_curve.rst
+++ b/doc/modules/learning_curve.rst
@@ -144,7 +144,8 @@ average scores on the validation sets)::
   >>> from sklearn.svm import SVC
 
   >>> train_sizes, train_scores, valid_scores = learning_curve(
-  ...     SVC(kernel='linear'), X, y, train_sizes=[50, 80, 110], cv=5)
+  ...     SVC(gamma='scale', kernel='linear'), X, y, train_sizes=[50, 80, 110],
+  ...     cv=5)
   >>> train_sizes            # doctest: +NORMALIZE_WHITESPACE
   array([ 50, 80, 110])
   >>> train_scores           # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
diff --git a/doc/modules/metrics.rst b/doc/modules/metrics.rst
index 08779c750cf73..721313c344a82 100644
--- a/doc/modules/metrics.rst
+++ b/doc/modules/metrics.rst
@@ -171,13 +171,13 @@ It can be computed using :func:`chi2_kernel` and then passed to an
            [ 0.89...,  0.51...,  1.        ,  0.77... ],
            [ 0.58...,  0.83...,  0.77... ,  1.        ]])
 
-    >>> svm = SVC(kernel='precomputed').fit(K, y)
+    >>> svm = SVC(gamma='scale', kernel='precomputed').fit(K, y)
     >>> svm.predict(K)
     array([0, 1, 0, 1])
 
 It can also be directly used as the ``kernel`` argument::
 
-    >>> svm = SVC(kernel=chi2_kernel).fit(X, y)
+    >>> svm = SVC(gamma='scale', kernel=chi2_kernel).fit(X, y)
     >>> svm.predict(X)
     array([0, 1, 0, 1])
 
diff --git a/doc/modules/model_evaluation.rst b/doc/modules/model_evaluation.rst
index 7505ec1819554..294c76c9bca20 100644
--- a/doc/modules/model_evaluation.rst
+++ b/doc/modules/model_evaluation.rst
@@ -98,9 +98,9 @@ Usage examples:
     >>> from sklearn.model_selection import cross_val_score
     >>> iris = datasets.load_iris()
     >>> X, y = iris.data, iris.target
-    >>> clf = svm.SVC(probability=True, random_state=0)
+    >>> clf = svm.SVC(gamma='scale', probability=True, random_state=0)
     >>> cross_val_score(clf, X, y, scoring='neg_log_loss') # doctest: +ELLIPSIS
-    array([-0.07..., -0.16..., -0.06...])
+    array([-0.09999396, -0.16338728, -0.07541304])
     >>> model = svm.SVC()
     >>> cross_val_score(model, X, y, scoring='wrong_choice')
     Traceback (most recent call last):
@@ -1760,7 +1760,7 @@ Next, let's compare the accuracy of ``SVC`` and ``most_frequent``::
 
   >>> from sklearn.dummy import DummyClassifier
   >>> from sklearn.svm import SVC
-  >>> clf = SVC(kernel='linear', C=1).fit(X_train, y_train)
+  >>> clf = SVC(gamma='scale', kernel='linear', C=1).fit(X_train, y_train)
   >>> clf.score(X_test, y_test) # doctest: +ELLIPSIS
   0.63...
   >>> clf = DummyClassifier(strategy='most_frequent',random_state=0)
@@ -1772,7 +1772,7 @@ Next, let's compare the accuracy of ``SVC`` and ``most_frequent``::
 We see that ``SVC`` doesn't do much better than a dummy classifier. Now, let's
 change the kernel::
 
-  >>> clf = SVC(kernel='rbf', C=1).fit(X_train, y_train)
+  >>> clf = SVC(gamma='scale', kernel='rbf', C=1).fit(X_train, y_train)
   >>> clf.score(X_test, y_test)  # doctest: +ELLIPSIS
   0.97...
 
diff --git a/doc/modules/model_persistence.rst b/doc/modules/model_persistence.rst
index d64657717ba79..15ecf3c2d88f6 100644
--- a/doc/modules/model_persistence.rst
+++ b/doc/modules/model_persistence.rst
@@ -18,12 +18,12 @@ persistence model, namely `pickle <https://docs.python.org/2/library/pickle.html
 
   >>> from sklearn import svm
   >>> from sklearn import datasets
-  >>> clf = svm.SVC()
+  >>> clf = svm.SVC(gamma='scale')
   >>> iris = datasets.load_iris()
   >>> X, y = iris.data, iris.target
   >>> clf.fit(X, y)  # doctest: +NORMALIZE_WHITESPACE
   SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-      decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+      decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
       max_iter=-1, probability=False, random_state=None, shrinking=True,
       tol=0.001, verbose=False)
 
diff --git a/doc/modules/pipeline.rst b/doc/modules/pipeline.rst
index 24cef941a027d..376a577662be9 100644
--- a/doc/modules/pipeline.rst
+++ b/doc/modules/pipeline.rst
@@ -172,7 +172,7 @@ object::
      >>> from sklearn.datasets import load_digits
      >>> digits = load_digits()
      >>> pca1 = PCA()
-     >>> svm1 = SVC()
+     >>> svm1 = SVC(gamma='scale')
      >>> pipe = Pipeline([('reduce_dim', pca1), ('clf', svm1)])
      >>> pipe.fit(digits.data, digits.target)
      ... # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS
@@ -193,7 +193,7 @@ object::
 
      >>> cachedir = mkdtemp()
      >>> pca2 = PCA()
-     >>> svm2 = SVC()
+     >>> svm2 = SVC(gamma='scale')
      >>> cached_pipe = Pipeline([('reduce_dim', pca2), ('clf', svm2)],
      ...                        memory=cachedir)
      >>> cached_pipe.fit(digits.data, digits.target)
diff --git a/doc/modules/svm.rst b/doc/modules/svm.rst
index 8f253437690c3..b495a971b0bbe 100644
--- a/doc/modules/svm.rst
+++ b/doc/modules/svm.rst
@@ -75,10 +75,10 @@ n_features]`` holding the training samples, and an array y of class labels
     >>> from sklearn import svm
     >>> X = [[0, 0], [1, 1]]
     >>> y = [0, 1]
-    >>> clf = svm.SVC()
+    >>> clf = svm.SVC(gamma='scale')
     >>> clf.fit(X, y)  # doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-        decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+        decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
         max_iter=-1, probability=False, random_state=None, shrinking=True,
         tol=0.001, verbose=False)
 
@@ -119,10 +119,10 @@ n_classes)``::
 
     >>> X = [[0], [1], [2], [3]]
     >>> Y = [0, 1, 2, 3]
-    >>> clf = svm.SVC(decision_function_shape='ovo')
+    >>> clf = svm.SVC(gamma='scale', decision_function_shape='ovo')
     >>> clf.fit(X, Y) # doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-        decision_function_shape='ovo', degree=3, gamma='auto', kernel='rbf',
+        decision_function_shape='ovo', degree=3, gamma='scale', kernel='rbf',
         max_iter=-1, probability=False, random_state=None, shrinking=True,
         tol=0.001, verbose=False)
     >>> dec = clf.decision_function([[1]])
@@ -316,9 +316,9 @@ floating point values instead of integer values::
     >>> from sklearn import svm
     >>> X = [[0, 0], [2, 2]]
     >>> y = [0.5, 2.5]
-    >>> clf = svm.SVR()
+    >>> clf = svm.SVR(gamma='scale')
     >>> clf.fit(X, y) # doctest: +NORMALIZE_WHITESPACE
-    SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1, gamma='auto',
+    SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1, gamma='scale',
         kernel='rbf', max_iter=-1, shrinking=True, tol=0.001, verbose=False)
     >>> clf.predict([[1, 1]])
     array([ 1.5])
@@ -529,12 +529,12 @@ test vectors must be provided.
     >>> from sklearn import svm
     >>> X = np.array([[0, 0], [1, 1]])
     >>> y = [0, 1]
-    >>> clf = svm.SVC(kernel='precomputed')
+    >>> clf = svm.SVC(gamma='scale', kernel='precomputed')
     >>> # linear kernel computation
     >>> gram = np.dot(X, X.T)
     >>> clf.fit(gram, y) # doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-        decision_function_shape='ovr', degree=3, gamma='auto',
+        decision_function_shape='ovr', degree=3, gamma='scale',
         kernel='precomputed', max_iter=-1, probability=False,
         random_state=None, shrinking=True, tol=0.001, verbose=False)
     >>> # predict on training examples
diff --git a/doc/tutorial/basic/tutorial.rst b/doc/tutorial/basic/tutorial.rst
index b796b69a1f4dc..7fd5169fac5f8 100644
--- a/doc/tutorial/basic/tutorial.rst
+++ b/doc/tutorial/basic/tutorial.rst
@@ -214,12 +214,12 @@ persistence model, namely `pickle <https://docs.python.org/2/library/pickle.html
 
   >>> from sklearn import svm
   >>> from sklearn import datasets
-  >>> clf = svm.SVC()
+  >>> clf = svm.SVC(gamma='scale')
   >>> iris = datasets.load_iris()
   >>> X, y = iris.data, iris.target
   >>> clf.fit(X, y)  # doctest: +NORMALIZE_WHITESPACE
   SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-    decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+    decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
     max_iter=-1, probability=False, random_state=None, shrinking=True,
     tol=0.001, verbose=False)
 
@@ -290,10 +290,10 @@ maintained::
     >>> from sklearn import datasets
     >>> from sklearn.svm import SVC
     >>> iris = datasets.load_iris()
-    >>> clf = SVC()
+    >>> clf = SVC(gamma='scale')
     >>> clf.fit(iris.data, iris.target)  # doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-      decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+      decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
       max_iter=-1, probability=False, random_state=None, shrinking=True,
       tol=0.001, verbose=False)
 
@@ -302,7 +302,7 @@ maintained::
 
     >>> clf.fit(iris.data, iris.target_names[iris.target])  # doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-      decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+      decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
       max_iter=-1, probability=False, random_state=None, shrinking=True,
       tol=0.001, verbose=False)
 
@@ -328,10 +328,10 @@ more than once will overwrite what was learned by any previous ``fit()``::
   >>> y = rng.binomial(1, 0.5, 100)
   >>> X_test = rng.rand(5, 10)
 
-  >>> clf = SVC()
+  >>> clf = SVC(gamma='scale')
   >>> clf.set_params(kernel='linear').fit(X, y)  # doctest: +NORMALIZE_WHITESPACE
   SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-    decision_function_shape='ovr', degree=3, gamma='auto', kernel='linear',
+    decision_function_shape='ovr', degree=3, gamma='scale', kernel='linear',
     max_iter=-1, probability=False, random_state=None, shrinking=True,
     tol=0.001, verbose=False)
   >>> clf.predict(X_test)
@@ -339,14 +339,14 @@ more than once will overwrite what was learned by any previous ``fit()``::
 
   >>> clf.set_params(kernel='rbf').fit(X, y)  # doctest: +NORMALIZE_WHITESPACE
   SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-    decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+    decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
     max_iter=-1, probability=False, random_state=None, shrinking=True,
     tol=0.001, verbose=False)
   >>> clf.predict(X_test)
-  array([0, 0, 0, 1, 0])
+  array([1, 0, 1, 1, 0])
 
 Here, the default kernel ``rbf`` is first changed to ``linear`` after the
-estimator has been constructed via ``SVC()``, and changed back to ``rbf`` to
+estimator has been constructed via ``SVC(gamma='scale')``, and changed back to ``rbf`` to
 refit the estimator and to make a second prediction.
 
 Multiclass vs. multilabel fitting
@@ -363,7 +363,8 @@ the target data fit upon::
     >>> X = [[1, 2], [2, 4], [4, 5], [3, 2], [3, 1]]
     >>> y = [0, 0, 1, 1, 2]
 
-    >>> classif = OneVsRestClassifier(estimator=SVC(random_state=0))
+    >>> classif = OneVsRestClassifier(estimator=SVC(gamma='scale',
+    ...                                             random_state=0))
     >>> classif.fit(X, y).predict(X)
     array([0, 0, 1, 1, 2])
 
diff --git a/doc/tutorial/statistical_inference/model_selection.rst b/doc/tutorial/statistical_inference/model_selection.rst
index 315ca420e4d19..dbbd1d8daaa1c 100644
--- a/doc/tutorial/statistical_inference/model_selection.rst
+++ b/doc/tutorial/statistical_inference/model_selection.rst
@@ -17,7 +17,7 @@ better**.
     >>> digits = datasets.load_digits()
     >>> X_digits = digits.data
     >>> y_digits = digits.target
-    >>> svc = svm.SVC(C=1, kernel='linear')
+    >>> svc = svm.SVC(gamma='scale', C=1, kernel='linear')
     >>> svc.fit(X_digits[:-100], y_digits[:-100]).score(X_digits[-100:], y_digits[-100:])
     0.97999999999999998
 
diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst
index 6f53e9af791c5..fdbb44a251efe 100644
--- a/doc/tutorial/statistical_inference/supervised_learning.rst
+++ b/doc/tutorial/statistical_inference/supervised_learning.rst
@@ -452,12 +452,12 @@ classification --:class:`SVC` (Support Vector Classification).
 ::
 
     >>> from sklearn import svm
-    >>> svc = svm.SVC(kernel='linear')
+    >>> svc = svm.SVC(gamma='scale', kernel='linear')
     >>> svc.fit(iris_X_train, iris_y_train)    # doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
-        decision_function_shape='ovr', degree=3, gamma='auto', kernel='linear',
-        max_iter=-1, probability=False, random_state=None, shrinking=True,
-        tol=0.001, verbose=False)
+      decision_function_shape='ovr', degree=3, gamma='scale', kernel='linear',
+      max_iter=-1, probability=False, random_state=None, shrinking=True,
+      tol=0.001, verbose=False)
 
 
 .. warning:: **Normalizing data**
diff --git a/sklearn/ensemble/tests/test_bagging.py b/sklearn/ensemble/tests/test_bagging.py
index 50820d4512b5b..e461472640026 100644
--- a/sklearn/ensemble/tests/test_bagging.py
+++ b/sklearn/ensemble/tests/test_bagging.py
@@ -69,7 +69,7 @@ def test_classification():
                            Perceptron(tol=1e-3),
                            DecisionTreeClassifier(),
                            KNeighborsClassifier(),
-                           SVC()]:
+                           SVC(gamma="scale")]:
         for params in grid:
             BaggingClassifier(base_estimator=base_estimator,
                               random_state=rng,
@@ -115,7 +115,8 @@ def fit(self, X, y):
             for f in ['predict', 'predict_proba', 'predict_log_proba', 'decision_function']:
                 # Trained on sparse format
                 sparse_classifier = BaggingClassifier(
-                    base_estimator=CustomSVC(decision_function_shape='ovr'),
+                    base_estimator=CustomSVC(gamma='auto',
+                                             decision_function_shape='ovr'),
                     random_state=1,
                     **params
                 ).fit(X_train_sparse, y_train)
@@ -123,7 +124,8 @@ def fit(self, X, y):
 
                 # Trained on dense format
                 dense_classifier = BaggingClassifier(
-                    base_estimator=CustomSVC(decision_function_shape='ovr'),
+                    base_estimator=CustomSVC(gamma='auto',
+                                             decision_function_shape='ovr'),
                     random_state=1,
                     **params
                 ).fit(X_train, y_train)
@@ -151,7 +153,7 @@ def test_regression():
                            DummyRegressor(),
                            DecisionTreeRegressor(),
                            KNeighborsRegressor(),
-                           SVR()]:
+                           SVR(gamma='scale')]:
         for params in grid:
             BaggingRegressor(base_estimator=base_estimator,
                              random_state=rng,
@@ -197,7 +199,7 @@ def fit(self, X, y):
 
             # Trained on sparse format
             sparse_classifier = BaggingRegressor(
-                base_estimator=CustomSVR(),
+                base_estimator=CustomSVR(gamma='scale'),
                 random_state=1,
                 **params
             ).fit(X_train_sparse, y_train)
@@ -205,7 +207,7 @@ def fit(self, X, y):
 
             # Trained on dense format
             dense_results = BaggingRegressor(
-                base_estimator=CustomSVR(),
+                base_estimator=CustomSVR(gamma='scale'),
                 random_state=1,
                 **params
             ).fit(X_train, y_train).predict(X_test)
@@ -310,7 +312,7 @@ def test_oob_score_classification():
                                                         iris.target,
                                                         random_state=rng)
 
-    for base_estimator in [DecisionTreeClassifier(), SVC()]:
+    for base_estimator in [DecisionTreeClassifier(), SVC(gamma="scale")]:
         clf = BaggingClassifier(base_estimator=base_estimator,
                                 n_estimators=100,
                                 bootstrap=True,
@@ -440,7 +442,8 @@ def test_parallel_classification():
     assert_array_almost_equal(y1, y3)
 
     # decision_function
-    ensemble = BaggingClassifier(SVC(decision_function_shape='ovr'),
+    ensemble = BaggingClassifier(SVC(gamma='scale',
+                                     decision_function_shape='ovr'),
                                  n_jobs=3,
                                  random_state=0).fit(X_train, y_train)
 
@@ -457,7 +460,8 @@ def test_parallel_classification():
                          "".format(X_test.shape[1], X_err.shape[1]),
                          ensemble.decision_function, X_err)
 
-    ensemble = BaggingClassifier(SVC(decision_function_shape='ovr'),
+    ensemble = BaggingClassifier(SVC(gamma='scale',
+                                     decision_function_shape='ovr'),
                                  n_jobs=1,
                                  random_state=0).fit(X_train, y_train)
 
@@ -501,7 +505,7 @@ def test_gridsearch():
     parameters = {'n_estimators': (1, 2),
                   'base_estimator__C': (1, 2)}
 
-    GridSearchCV(BaggingClassifier(SVC()),
+    GridSearchCV(BaggingClassifier(SVC(gamma="scale")),
                  parameters,
                  scoring="roc_auc").fit(X, y)
 
@@ -550,7 +554,7 @@ def test_base_estimator():
 
     assert_true(isinstance(ensemble.base_estimator_, DecisionTreeRegressor))
 
-    ensemble = BaggingRegressor(SVR(),
+    ensemble = BaggingRegressor(SVR(gamma='scale'),
                                 n_jobs=3,
                                 random_state=0).fit(X_train, y_train)
     assert_true(isinstance(ensemble.base_estimator_, SVR))
diff --git a/sklearn/ensemble/tests/test_voting_classifier.py b/sklearn/ensemble/tests/test_voting_classifier.py
index 70d92132125a7..a41b35d1239fc 100644
--- a/sklearn/ensemble/tests/test_voting_classifier.py
+++ b/sklearn/ensemble/tests/test_voting_classifier.py
@@ -251,7 +251,7 @@ def test_sample_weight():
     """Tests sample_weight parameter of VotingClassifier"""
     clf1 = LogisticRegression(random_state=123)
     clf2 = RandomForestClassifier(random_state=123)
-    clf3 = SVC(probability=True, random_state=123)
+    clf3 = SVC(gamma='scale', probability=True, random_state=123)
     eclf1 = VotingClassifier(estimators=[
         ('lr', clf1), ('rf', clf2), ('svc', clf3)],
         voting='soft').fit(X, y, sample_weight=np.ones((len(y),)))
diff --git a/sklearn/ensemble/tests/test_weight_boosting.py b/sklearn/ensemble/tests/test_weight_boosting.py
index b6912de138dd6..4a8a806ed6a62 100755
--- a/sklearn/ensemble/tests/test_weight_boosting.py
+++ b/sklearn/ensemble/tests/test_weight_boosting.py
@@ -280,29 +280,27 @@ def test_error():
 def test_base_estimator():
     # Test different base estimators.
     from sklearn.ensemble import RandomForestClassifier
-    from sklearn.svm import SVC
 
     # XXX doesn't work with y_class because RF doesn't support classes_
     # Shouldn't AdaBoost run a LabelBinarizer?
     clf = AdaBoostClassifier(RandomForestClassifier())
     clf.fit(X, y_regr)
 
-    clf = AdaBoostClassifier(SVC(), algorithm="SAMME")
+    clf = AdaBoostClassifier(SVC(gamma="scale"), algorithm="SAMME")
     clf.fit(X, y_class)
 
     from sklearn.ensemble import RandomForestRegressor
-    from sklearn.svm import SVR
 
     clf = AdaBoostRegressor(RandomForestRegressor(), random_state=0)
     clf.fit(X, y_regr)
 
-    clf = AdaBoostRegressor(SVR(), random_state=0)
+    clf = AdaBoostRegressor(SVR(gamma='scale'), random_state=0)
     clf.fit(X, y_regr)
 
     # Check that an empty discrete ensemble fails in fit, not predict.
     X_fail = [[1, 1], [1, 1], [1, 1], [1, 1]]
     y_fail = ["foo", "bar", 1, 2]
-    clf = AdaBoostClassifier(SVC(), algorithm="SAMME")
+    clf = AdaBoostClassifier(SVC(gamma="scale"), algorithm="SAMME")
     assert_raises_regexp(ValueError, "worse than random",
                          clf.fit, X_fail, y_fail)
 
@@ -344,14 +342,14 @@ def fit(self, X, y, sample_weight=None):
 
         # Trained on sparse format
         sparse_classifier = AdaBoostClassifier(
-            base_estimator=CustomSVC(probability=True),
+            base_estimator=CustomSVC(gamma='scale', probability=True),
             random_state=1,
             algorithm="SAMME"
         ).fit(X_train_sparse, y_train)
 
         # Trained on dense format
         dense_classifier = AdaBoostClassifier(
-            base_estimator=CustomSVC(probability=True),
+            base_estimator=CustomSVC(gamma='scale', probability=True),
             random_state=1,
             algorithm="SAMME"
         ).fit(X_train, y_train)
@@ -438,13 +436,13 @@ def fit(self, X, y, sample_weight=None):
 
         # Trained on sparse format
         sparse_classifier = AdaBoostRegressor(
-            base_estimator=CustomSVR(),
+            base_estimator=CustomSVR(gamma='scale'),
             random_state=1
         ).fit(X_train_sparse, y_train)
 
         # Trained on dense format
         dense_classifier = dense_results = AdaBoostRegressor(
-            base_estimator=CustomSVR(),
+            base_estimator=CustomSVR(gamma='scale'),
             random_state=1
         ).fit(X_train, y_train)
 
diff --git a/sklearn/feature_selection/rfe.py b/sklearn/feature_selection/rfe.py
index 7134e33c1735a..d0beeec50203f 100644
--- a/sklearn/feature_selection/rfe.py
+++ b/sklearn/feature_selection/rfe.py
@@ -92,7 +92,7 @@ class RFE(BaseEstimator, MetaEstimatorMixin, SelectorMixin):
     >>> from sklearn.feature_selection import RFE
     >>> from sklearn.svm import SVR
     >>> X, y = make_friedman1(n_samples=50, n_features=10, random_state=0)
-    >>> estimator = SVR(kernel="linear")
+    >>> estimator = SVR(gamma='scale', kernel="linear")
     >>> selector = RFE(estimator, 5, step=1)
     >>> selector = selector.fit(X, y)
     >>> selector.support_ # doctest: +NORMALIZE_WHITESPACE
@@ -361,7 +361,7 @@ class RFECV(RFE, MetaEstimatorMixin):
     >>> from sklearn.feature_selection import RFECV
     >>> from sklearn.svm import SVR
     >>> X, y = make_friedman1(n_samples=50, n_features=10, random_state=0)
-    >>> estimator = SVR(kernel="linear")
+    >>> estimator = SVR(gamma='scale', kernel="linear")
     >>> selector = RFECV(estimator, step=1, cv=5)
     >>> selector = selector.fit(X, y)
     >>> selector.support_ # doctest: +NORMALIZE_WHITESPACE
diff --git a/sklearn/feature_selection/tests/test_rfe.py b/sklearn/feature_selection/tests/test_rfe.py
index fd1f37f6e2dd5..c8ff722fac7cc 100644
--- a/sklearn/feature_selection/tests/test_rfe.py
+++ b/sklearn/feature_selection/tests/test_rfe.py
@@ -67,7 +67,7 @@ def test_rfe_features_importance():
     rfe.fit(X, y)
     assert_equal(len(rfe.ranking_), X.shape[1])
 
-    clf_svc = SVC(kernel="linear")
+    clf_svc = SVC(gamma='scale', kernel="linear")
     rfe_svc = RFE(estimator=clf_svc, n_features_to_select=4, step=0.1)
     rfe_svc.fit(X, y)
 
@@ -83,7 +83,7 @@ def test_rfe():
     y = iris.target
 
     # dense model
-    clf = SVC(kernel="linear")
+    clf = SVC(gamma='scale', kernel="linear")
     rfe = RFE(estimator=clf, n_features_to_select=4, step=0.1)
     rfe.fit(X, y)
     X_r = rfe.transform(X)
@@ -91,7 +91,7 @@ def test_rfe():
     assert_equal(len(rfe.ranking_), X.shape[1])
 
     # sparse model
-    clf_sparse = SVC(kernel="linear")
+    clf_sparse = SVC(gamma='scale', kernel="linear")
     rfe_sparse = RFE(estimator=clf_sparse, n_features_to_select=4, step=0.1)
     rfe_sparse.fit(X_sparse, y)
     X_r_sparse = rfe_sparse.transform(X_sparse)
@@ -127,7 +127,7 @@ def test_rfecv():
     y = list(iris.target)   # regression test: list should be supported
 
     # Test using the score function
-    rfecv = RFECV(estimator=SVC(kernel="linear"), step=1, cv=5)
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=1, cv=5)
     rfecv.fit(X, y)
     # non-regression test for missing worst feature:
     assert_equal(len(rfecv.grid_scores_), X.shape[1])
@@ -138,7 +138,8 @@ def test_rfecv():
     assert_array_equal(X_r, iris.data)
 
     # same in sparse
-    rfecv_sparse = RFECV(estimator=SVC(kernel="linear"), step=1, cv=5)
+    rfecv_sparse = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=1,
+                         cv=5)
     X_sparse = sparse.csr_matrix(X)
     rfecv_sparse.fit(X_sparse, y)
     X_r_sparse = rfecv_sparse.transform(X_sparse)
@@ -146,7 +147,7 @@ def test_rfecv():
 
     # Test using a customized loss function
     scoring = make_scorer(zero_one_loss, greater_is_better=False)
-    rfecv = RFECV(estimator=SVC(kernel="linear"), step=1, cv=5,
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=1, cv=5,
                   scoring=scoring)
     ignore_warnings(rfecv.fit)(X, y)
     X_r = rfecv.transform(X)
@@ -154,7 +155,7 @@ def test_rfecv():
 
     # Test using a scorer
     scorer = get_scorer('accuracy')
-    rfecv = RFECV(estimator=SVC(kernel="linear"), step=1, cv=5,
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=1, cv=5,
                   scoring=scorer)
     rfecv.fit(X, y)
     X_r = rfecv.transform(X)
@@ -163,27 +164,29 @@ def test_rfecv():
     # Test fix on grid_scores
     def test_scorer(estimator, X, y):
         return 1.0
-    rfecv = RFECV(estimator=SVC(kernel="linear"), step=1, cv=5,
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=1, cv=5,
                   scoring=test_scorer)
     rfecv.fit(X, y)
     assert_array_equal(rfecv.grid_scores_, np.ones(len(rfecv.grid_scores_)))
 
     # Same as the first two tests, but with step=2
-    rfecv = RFECV(estimator=SVC(kernel="linear"), step=2, cv=5)
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=2, cv=5)
     rfecv.fit(X, y)
     assert_equal(len(rfecv.grid_scores_), 6)
     assert_equal(len(rfecv.ranking_), X.shape[1])
     X_r = rfecv.transform(X)
     assert_array_equal(X_r, iris.data)
 
-    rfecv_sparse = RFECV(estimator=SVC(kernel="linear"), step=2, cv=5)
+    rfecv_sparse = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=2,
+                         cv=5)
     X_sparse = sparse.csr_matrix(X)
     rfecv_sparse.fit(X_sparse, y)
     X_r_sparse = rfecv_sparse.transform(X_sparse)
     assert_array_equal(X_r_sparse.toarray(), iris.data)
 
     # Verifying that steps < 1 don't blow up.
-    rfecv_sparse = RFECV(estimator=SVC(kernel="linear"), step=.2, cv=5)
+    rfecv_sparse = RFECV(estimator=SVC(gamma='scale', kernel="linear"),
+                         step=.2, cv=5)
     X_sparse = sparse.csr_matrix(X)
     rfecv_sparse.fit(X_sparse, y)
     X_r_sparse = rfecv_sparse.transform(X_sparse)
@@ -215,7 +218,8 @@ def test_rfecv_verbose_output():
     X = np.c_[iris.data, generator.normal(size=(len(iris.data), 6))]
     y = list(iris.target)
 
-    rfecv = RFECV(estimator=SVC(kernel="linear"), step=1, cv=5, verbose=1)
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=1, cv=5,
+                  verbose=1)
     rfecv.fit(X, y)
 
     verbose_output = sys.stdout
@@ -224,7 +228,7 @@ def test_rfecv_verbose_output():
 
 
 def test_rfe_estimator_tags():
-    rfe = RFE(SVC(kernel='linear'))
+    rfe = RFE(SVC(gamma='scale', kernel='linear'))
     assert_equal(rfe._estimator_type, "classifier")
     # make sure that cross-validation is stratified
     iris = load_iris()
@@ -236,7 +240,7 @@ def test_rfe_min_step():
     n_features = 10
     X, y = make_friedman1(n_samples=50, n_features=n_features, random_state=0)
     n_samples, n_features = X.shape
-    estimator = SVR(kernel="linear")
+    estimator = SVR(gamma='scale', kernel="linear")
 
     # Test when floor(step * n_features) <= 0
     selector = RFE(estimator, step=0.01)
@@ -280,7 +284,7 @@ def formula2(n_features, n_features_to_select, step):
         generator = check_random_state(43)
         X = generator.normal(size=(100, n_features))
         y = generator.rand(100).round()
-        rfe = RFE(estimator=SVC(kernel="linear"),
+        rfe = RFE(estimator=SVC(gamma='scale', kernel="linear"),
                   n_features_to_select=n_features_to_select, step=step)
         rfe.fit(X, y)
         # this number also equals to the maximum of ranking_
@@ -305,7 +309,8 @@ def formula2(n_features, n_features_to_select, step):
         generator = check_random_state(43)
         X = generator.normal(size=(100, n_features))
         y = generator.rand(100).round()
-        rfecv = RFECV(estimator=SVC(kernel="linear"), step=step, cv=5)
+        rfecv = RFECV(estimator=SVC(gamma='scale', kernel="linear"), step=step,
+                      cv=5)
         rfecv.fit(X, y)
 
         assert_equal(rfecv.grid_scores_.shape[0],
@@ -320,7 +325,7 @@ def test_rfe_cv_n_jobs():
     X = np.c_[iris.data, generator.normal(size=(len(iris.data), 6))]
     y = iris.target
 
-    rfecv = RFECV(estimator=SVC(kernel='linear'))
+    rfecv = RFECV(estimator=SVC(gamma='scale', kernel='linear'))
     rfecv.fit(X, y)
     rfecv_ranking = rfecv.ranking_
     rfecv_grid_scores = rfecv.grid_scores_
diff --git a/sklearn/grid_search.py b/sklearn/grid_search.py
index 76cdaa7cb1de5..fb8fd2da2d0cd 100644
--- a/sklearn/grid_search.py
+++ b/sklearn/grid_search.py
@@ -740,7 +740,7 @@ class GridSearchCV(BaseSearchCV):
     >>> from sklearn import svm, grid_search, datasets
     >>> iris = datasets.load_iris()
     >>> parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]}
-    >>> svr = svm.SVC()
+    >>> svr = svm.SVC(gamma="scale")
     >>> clf = grid_search.GridSearchCV(svr, parameters)
     >>> clf.fit(iris.data, iris.target)
     ...                             # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
diff --git a/sklearn/metrics/tests/test_classification.py b/sklearn/metrics/tests/test_classification.py
index c1952ddbbc7de..0601e1bc145a3 100644
--- a/sklearn/metrics/tests/test_classification.py
+++ b/sklearn/metrics/tests/test_classification.py
@@ -84,7 +84,8 @@ def make_prediction(dataset=None, binary=False):
     X = np.c_[X, rng.randn(n_samples, 200 * n_features)]
 
     # run classifier, get class probabilities and label predictions
-    clf = svm.SVC(kernel='linear', probability=True, random_state=0)
+    clf = svm.SVC(gamma='scale', kernel='linear', probability=True,
+                  random_state=0)
     probas_pred = clf.fit(X[:half], y[:half]).predict_proba(X[half:])
 
     if binary:
diff --git a/sklearn/metrics/tests/test_ranking.py b/sklearn/metrics/tests/test_ranking.py
index a17935ae7de17..b95deb441cd6d 100644
--- a/sklearn/metrics/tests/test_ranking.py
+++ b/sklearn/metrics/tests/test_ranking.py
@@ -68,7 +68,8 @@ def make_prediction(dataset=None, binary=False):
     X = np.c_[X, rng.randn(n_samples, 200 * n_features)]
 
     # run classifier, get class probabilities and label predictions
-    clf = svm.SVC(kernel='linear', probability=True, random_state=0)
+    clf = svm.SVC(gamma='scale', kernel='linear', probability=True,
+                  random_state=0)
     probas_pred = clf.fit(X[:half], y[:half]).predict_proba(X[half:])
 
     if binary:
diff --git a/sklearn/model_selection/_search.py b/sklearn/model_selection/_search.py
index 9ab6b9df88ab5..11241f17f280d 100644
--- a/sklearn/model_selection/_search.py
+++ b/sklearn/model_selection/_search.py
@@ -935,8 +935,8 @@ class GridSearchCV(BaseSearchCV):
     >>> from sklearn.model_selection import GridSearchCV
     >>> iris = datasets.load_iris()
     >>> parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]}
-    >>> svc = svm.SVC()
-    >>> clf = GridSearchCV(svc, parameters)
+    >>> svr = svm.SVC(gamma="scale")
+    >>> clf = GridSearchCV(svr, parameters)
     >>> clf.fit(iris.data, iris.target)
     ...                             # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     GridSearchCV(cv=None, error_score=...,
diff --git a/sklearn/model_selection/tests/test_search.py b/sklearn/model_selection/tests/test_search.py
index 87093699a5c38..66348dd46733f 100644
--- a/sklearn/model_selection/tests/test_search.py
+++ b/sklearn/model_selection/tests/test_search.py
@@ -452,7 +452,7 @@ def test_grid_search_one_grid_point():
     X_, y_ = make_classification(n_samples=200, n_features=100, random_state=0)
     param_dict = {"C": [1.0], "kernel": ["rbf"], "gamma": [0.1]}
 
-    clf = SVC()
+    clf = SVC(gamma="scale")
     cv = GridSearchCV(clf, param_dict)
     cv.fit(X_, y_)
 
@@ -476,7 +476,7 @@ def test_grid_search_when_param_grid_includes_range():
 
 def test_grid_search_bad_param_grid():
     param_dict = {"C": 1.0}
-    clf = SVC()
+    clf = SVC(gamma="scale")
     assert_raise_message(
         ValueError,
         "Parameter values for parameter (C) need to be a sequence"
@@ -484,14 +484,14 @@ def test_grid_search_bad_param_grid():
         GridSearchCV, clf, param_dict)
 
     param_dict = {"C": []}
-    clf = SVC()
+    clf = SVC(gamma="scale")
     assert_raise_message(
         ValueError,
         "Parameter values for parameter (C) need to be a non-empty sequence.",
         GridSearchCV, clf, param_dict)
 
     param_dict = {"C": "1,2,3"}
-    clf = SVC()
+    clf = SVC(gamma="scale")
     assert_raise_message(
         ValueError,
         "Parameter values for parameter (C) need to be a sequence"
@@ -499,7 +499,7 @@ def test_grid_search_bad_param_grid():
         GridSearchCV, clf, param_dict)
 
     param_dict = {"C": np.ones(6).reshape(3, 2)}
-    clf = SVC()
+    clf = SVC(gamma="scale")
     assert_raises(ValueError, GridSearchCV, clf, param_dict)
 
 
@@ -568,7 +568,7 @@ def test_grid_search_precomputed_kernel():
     K_train = np.dot(X_[:180], X_[:180].T)
     y_train = y_[:180]
 
-    clf = SVC(kernel='precomputed')
+    clf = SVC(gamma='scale', kernel='precomputed')
     cv = GridSearchCV(clf, {'C': [0.1, 1.0]})
     cv.fit(K_train, y_train)
 
@@ -814,6 +814,12 @@ def test_grid_search_cv_results():
     n_grid_points = 6
     params = [dict(kernel=['rbf', ], C=[1, 10], gamma=[0.1, 1]),
               dict(kernel=['poly', ], degree=[1, 2])]
+    grid_search = GridSearchCV(SVC(gamma="scale"), cv=n_splits, iid=False,
+                               param_grid=params)
+    grid_search.fit(X, y)
+    grid_search_iid = GridSearchCV(SVC(gamma="scale"), cv=n_splits, iid=True,
+                                   param_grid=params)
+    grid_search_iid.fit(X, y)
 
     param_keys = ('param_C', 'param_degree', 'param_gamma', 'param_kernel')
     score_keys = ('mean_test_score', 'mean_train_score',
@@ -828,7 +834,8 @@ def test_grid_search_cv_results():
     n_candidates = n_grid_points
 
     for iid in (False, True):
-        search = GridSearchCV(SVC(), cv=n_splits, iid=iid, param_grid=params)
+        search = GridSearchCV(SVC(gamma='scale'), cv=n_splits, iid=iid,
+                              param_grid=params)
         search.fit(X, y)
         assert_equal(iid, search.iid)
         cv_results = search.cv_results_
@@ -863,6 +870,16 @@ def test_random_search_cv_results():
 
     n_splits = 3
     n_search_iter = 30
+    params = dict(C=expon(scale=10), gamma=expon(scale=0.1))
+    random_search = RandomizedSearchCV(SVC(gamma="scale"),
+                                       n_iter=n_search_iter, cv=n_splits,
+                                       iid=False, param_distributions=params)
+    random_search.fit(X, y)
+    random_search_iid = RandomizedSearchCV(SVC(gamma="scale"),
+                                           n_iter=n_search_iter,
+                                           cv=n_splits, iid=True,
+                                           param_distributions=params)
+    random_search_iid.fit(X, y)
 
     params = dict(C=expon(scale=10), gamma=expon(scale=0.1))
     param_keys = ('param_C', 'param_gamma')
@@ -878,8 +895,9 @@ def test_random_search_cv_results():
     n_cand = n_search_iter
 
     for iid in (False, True):
-        search = RandomizedSearchCV(SVC(), n_iter=n_search_iter, cv=n_splits,
-                                    iid=iid, param_distributions=params)
+        search = RandomizedSearchCV(SVC(gamma='scale'), n_iter=n_search_iter,
+                                    cv=n_splits, iid=iid,
+                                    param_distributions=params)
         search.fit(X, y)
         assert_equal(iid, search.iid)
         cv_results = search.cv_results_
@@ -908,8 +926,9 @@ def test_search_iid_param():
     # create "cv" for splits
     cv = [[mask, ~mask], [~mask, mask]]
     # once with iid=True (default)
-    grid_search = GridSearchCV(SVC(), param_grid={'C': [1, 10]}, cv=cv)
-    random_search = RandomizedSearchCV(SVC(), n_iter=2,
+    grid_search = GridSearchCV(SVC(gamma="scale"), param_grid={'C': [1, 10]},
+                               cv=cv)
+    random_search = RandomizedSearchCV(SVC(gamma="scale"), n_iter=2,
                                        param_distributions={'C': [1, 10]},
                                        cv=cv)
     for search in (grid_search, random_search):
@@ -945,7 +964,8 @@ def test_search_iid_param():
         assert_almost_equal(test_mean, expected_test_mean)
         assert_almost_equal(test_std, expected_test_std)
         assert_array_almost_equal(test_cv_scores,
-                                  cross_val_score(SVC(C=1), X, y, cv=cv))
+                                  cross_val_score(SVC(gamma='scale', C=1), X,
+                                                  y, cv=cv))
 
         # For the train scores, we do not take a weighted mean irrespective of
         # i.i.d. or not
@@ -953,10 +973,10 @@ def test_search_iid_param():
         assert_almost_equal(train_std, 0)
 
     # once with iid=False
-    grid_search = GridSearchCV(SVC(),
+    grid_search = GridSearchCV(SVC(gamma="scale"),
                                param_grid={'C': [1, 10]},
                                cv=cv, iid=False)
-    random_search = RandomizedSearchCV(SVC(), n_iter=2,
+    random_search = RandomizedSearchCV(SVC(gamma="scale"), n_iter=2,
                                        param_distributions={'C': [1, 10]},
                                        cv=cv, iid=False)
 
@@ -1001,9 +1021,9 @@ def test_grid_search_cv_results_multimetric():
         for scoring in ({'accuracy': make_scorer(accuracy_score),
                          'recall': make_scorer(recall_score)},
                         'accuracy', 'recall'):
-            grid_search = GridSearchCV(SVC(), cv=n_splits, iid=iid,
-                                       param_grid=params, scoring=scoring,
-                                       refit=False)
+            grid_search = GridSearchCV(SVC(gamma='scale'), cv=n_splits,
+                                       iid=iid, param_grid=params,
+                                       scoring=scoring, refit=False)
             grid_search.fit(X, y)
             assert_equal(grid_search.iid, iid)
             grid_searches.append(grid_search)
@@ -1027,7 +1047,7 @@ def test_random_search_cv_results_multimetric():
                 # If True, for multi-metric pass refit='accuracy'
                 if refit:
                     refit = 'accuracy' if isinstance(scoring, tuple) else refit
-                clf = SVC(probability=True, random_state=42)
+                clf = SVC(gamma='scale', probability=True, random_state=42)
                 random_search = RandomizedSearchCV(clf, n_iter=n_search_iter,
                                                    cv=n_splits, iid=iid,
                                                    param_distributions=params,
@@ -1098,8 +1118,8 @@ def test_search_cv_results_rank_tie_breaking():
     # which would result in a tie of their mean cv-scores
     param_grid = {'C': [1, 1.001, 0.001]}
 
-    grid_search = GridSearchCV(SVC(), param_grid=param_grid)
-    random_search = RandomizedSearchCV(SVC(), n_iter=3,
+    grid_search = GridSearchCV(SVC(gamma="scale"), param_grid=param_grid)
+    random_search = RandomizedSearchCV(SVC(gamma="scale"), n_iter=3,
                                        param_distributions=param_grid)
 
     for search in (grid_search, random_search):
@@ -1285,7 +1305,7 @@ def test_predict_proba_disabled():
     # Test predict_proba when disabled on estimator.
     X = np.arange(20).reshape(5, -1)
     y = [0, 0, 1, 1, 1]
-    clf = SVC(probability=False)
+    clf = SVC(gamma='scale', probability=False)
     gs = GridSearchCV(clf, {}, cv=2).fit(X, y)
     assert_false(hasattr(gs, "predict_proba"))
 
@@ -1531,18 +1551,18 @@ def test_deprecated_grid_search_iid():
     depr_message = ("The default of the `iid` parameter will change from True "
                     "to False in version 0.22")
     X, y = make_blobs(n_samples=54, random_state=0, centers=2)
-    grid = GridSearchCV(SVC(), param_grid={'C': [1]}, cv=3)
+    grid = GridSearchCV(SVC(gamma='scale'), param_grid={'C': [1]}, cv=3)
     # no warning with equally sized test sets
     assert_no_warnings(grid.fit, X, y)
 
-    grid = GridSearchCV(SVC(), param_grid={'C': [1]}, cv=5)
+    grid = GridSearchCV(SVC(gamma='scale'), param_grid={'C': [1]}, cv=5)
     # warning because 54 % 5 != 0
     assert_warns_message(DeprecationWarning, depr_message, grid.fit, X, y)
 
-    grid = GridSearchCV(SVC(), param_grid={'C': [1]}, cv=2)
+    grid = GridSearchCV(SVC(gamma='scale'), param_grid={'C': [1]}, cv=2)
     # warning because stratification into two classes and 27 % 2 != 0
     assert_warns_message(DeprecationWarning, depr_message, grid.fit, X, y)
 
-    grid = GridSearchCV(SVC(), param_grid={'C': [1]}, cv=KFold(2))
+    grid = GridSearchCV(SVC(gamma='scale'), param_grid={'C': [1]}, cv=KFold(2))
     # no warning because no stratification and 54 % 2 == 0
     assert_no_warnings(grid.fit, X, y)
diff --git a/sklearn/model_selection/tests/test_validation.py b/sklearn/model_selection/tests/test_validation.py
index ad49385100491..fb3b72691800a 100644
--- a/sklearn/model_selection/tests/test_validation.py
+++ b/sklearn/model_selection/tests/test_validation.py
@@ -333,10 +333,10 @@ def test_cross_validate_invalid_scoring_param():
 
     # Multiclass Scorers that return multiple values are not supported yet
     assert_raises_regex(ValueError, "scoring must return a number, got",
-                        cross_validate, SVC(), X, y,
+                        cross_validate, SVC(gamma='scale'), X, y,
                         scoring=multivalued_scorer)
     assert_raises_regex(ValueError, "scoring must return a number, got",
-                        cross_validate, SVC(), X, y,
+                        cross_validate, SVC(gamma='scale'), X, y,
                         scoring={"foo": multivalued_scorer})
 
     assert_raises_regex(ValueError, "'mse' is not a valid scoring value.",
@@ -526,7 +526,7 @@ def test_cross_val_score_pandas():
 
 def test_cross_val_score_mask():
     # test that cross_val_score works with boolean masks
-    svm = SVC(kernel="linear")
+    svm = SVC(gamma='scale', kernel="linear")
     iris = load_iris()
     X, y = iris.data, iris.target
     kfold = KFold(5)
@@ -545,17 +545,17 @@ def test_cross_val_score_mask():
 
 def test_cross_val_score_precomputed():
     # test for svm with precomputed kernel
-    svm = SVC(kernel="precomputed")
+    svm = SVC(gamma='scale', kernel="precomputed")
     iris = load_iris()
     X, y = iris.data, iris.target
     linear_kernel = np.dot(X, X.T)
     score_precomputed = cross_val_score(svm, linear_kernel, y)
-    svm = SVC(kernel="linear")
+    svm = SVC(gamma='scale', kernel="linear")
     score_linear = cross_val_score(svm, X, y)
     assert_array_almost_equal(score_precomputed, score_linear)
 
     # test with callable
-    svm = SVC(kernel=lambda x, y: np.dot(x, y.T))
+    svm = SVC(gamma='scale', kernel=lambda x, y: np.dot(x, y.T))
     score_callable = cross_val_score(svm, X, y)
     assert_array_almost_equal(score_precomputed, score_callable)
 
@@ -626,7 +626,7 @@ class BrokenEstimator:
 
 def test_cross_val_score_with_score_func_classification():
     iris = load_iris()
-    clf = SVC(kernel='linear')
+    clf = SVC(gamma='scale', kernel='linear')
 
     # Default score (should be the accuracy score)
     scores = cross_val_score(clf, iris.data, iris.target, cv=5)
@@ -676,7 +676,7 @@ def test_permutation_score():
     X = iris.data
     X_sparse = coo_matrix(X)
     y = iris.target
-    svm = SVC(kernel='linear')
+    svm = SVC(gamma='scale', kernel='linear')
     cv = StratifiedKFold(2)
 
     score, scores, pvalue = permutation_test_score(
@@ -691,7 +691,7 @@ def test_permutation_score():
     assert_true(pvalue_group == pvalue)
 
     # check that we obtain the same results with a sparse representation
-    svm_sparse = SVC(kernel='linear')
+    svm_sparse = SVC(gamma='scale', kernel='linear')
     cv_sparse = StratifiedKFold(2)
     score_group, _, pvalue_group = permutation_test_score(
         svm_sparse, X_sparse, y, n_permutations=30, cv=cv_sparse,
@@ -840,7 +840,7 @@ def test_cross_val_predict_decision_function_shape():
                          method='decision_function', cv=KFold(2))
 
     X, y = load_digits(return_X_y=True)
-    est = SVC(kernel='linear', decision_function_shape='ovo')
+    est = SVC(gamma='scale', kernel='linear', decision_function_shape='ovo')
 
     preds = cross_val_predict(est,
                               X, y,
@@ -1201,8 +1201,9 @@ def test_validation_curve_cv_splits_consistency():
     n_splits = 5
     X, y = make_classification(n_samples=100, random_state=0)
 
-    scores1 = validation_curve(SVC(kernel='linear', random_state=0), X, y,
-                               'C', [0.1, 0.1, 0.2, 0.2],
+    scores1 = validation_curve(SVC(gamma='scale', kernel='linear',
+                                   random_state=0),
+                               X, y, 'C', [0.1, 0.1, 0.2, 0.2],
                                cv=OneTimeSplitter(n_splits=n_splits,
                                                   n_samples=n_samples))
     # The OneTimeSplitter is a non-re-entrant cv splitter. Unless, the
@@ -1212,8 +1213,9 @@ def test_validation_curve_cv_splits_consistency():
     assert_array_almost_equal(*np.vsplit(np.hstack(scores1)[(0, 2, 1, 3), :],
                                          2))
 
-    scores2 = validation_curve(SVC(kernel='linear', random_state=0), X, y,
-                               'C', [0.1, 0.1, 0.2, 0.2],
+    scores2 = validation_curve(SVC(gamma='scale', kernel='linear',
+                                   random_state=0),
+                               X, y, 'C', [0.1, 0.1, 0.2, 0.2],
                                cv=KFold(n_splits=n_splits, shuffle=True))
 
     # For scores2, compare the 1st and 2nd parameter's scores
@@ -1222,8 +1224,9 @@ def test_validation_curve_cv_splits_consistency():
     assert_array_almost_equal(*np.vsplit(np.hstack(scores2)[(0, 2, 1, 3), :],
                                          2))
 
-    scores3 = validation_curve(SVC(kernel='linear', random_state=0), X, y,
-                               'C', [0.1, 0.1, 0.2, 0.2],
+    scores3 = validation_curve(SVC(gamma='scale', kernel='linear',
+                                   random_state=0),
+                               X, y, 'C', [0.1, 0.1, 0.2, 0.2],
                                cv=KFold(n_splits=n_splits))
 
     # OneTimeSplitter is basically unshuffled KFold(n_splits=5). Sanity check.
@@ -1252,7 +1255,7 @@ def test_cross_val_predict_sparse_prediction():
                                           random_state=1)
     X_sparse = csr_matrix(X)
     y_sparse = csr_matrix(y)
-    classif = OneVsRestClassifier(SVC(kernel='linear'))
+    classif = OneVsRestClassifier(SVC(gamma='scale', kernel='linear'))
     preds = cross_val_predict(classif, X, y, cv=10)
     preds_sparse = cross_val_predict(classif, X_sparse, y_sparse, cv=10)
     preds_sparse = preds_sparse.toarray()
diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py
index 796de4d5543ba..36875d007a6f8 100644
--- a/sklearn/pipeline.py
+++ b/sklearn/pipeline.py
@@ -80,7 +80,7 @@ class Pipeline(_BaseComposition):
     ...     n_informative=5, n_redundant=0, random_state=42)
     >>> # ANOVA SVM-C
     >>> anova_filter = SelectKBest(f_regression, k=5)
-    >>> clf = svm.SVC(kernel='linear')
+    >>> clf = svm.SVC(gamma='scale', kernel='linear')
     >>> anova_svm = Pipeline([('anova', anova_filter), ('svc', clf)])
     >>> # You can set the parameters using the names issued
     >>> # For instance, fit using a k of 10 in the SelectKBest
diff --git a/sklearn/preprocessing/tests/test_data.py b/sklearn/preprocessing/tests/test_data.py
index abb17142efc77..7d32d159d9d0e 100644
--- a/sklearn/preprocessing/tests/test_data.py
+++ b/sklearn/preprocessing/tests/test_data.py
@@ -1751,7 +1751,8 @@ def test_cv_pipeline_precomputed():
     y_true = np.ones((4,))
     K = X.dot(X.T)
     kcent = KernelCenterer()
-    pipeline = Pipeline([("kernel_centerer", kcent), ("svr", SVR())])
+    pipeline = Pipeline([("kernel_centerer", kcent), ("svr",
+                        SVR(gamma='scale'))])
 
     # did the pipeline set the _pairwise attribute?
     assert_true(pipeline._pairwise)
diff --git a/sklearn/svm/base.py b/sklearn/svm/base.py
index 0634803d6d454..d1965032de3d4 100644
--- a/sklearn/svm/base.py
+++ b/sklearn/svm/base.py
@@ -169,7 +169,23 @@ def fit(self, X, y, sample_weight=None):
                              "boolean masks (use `indices=True` in CV)."
                              % (sample_weight.shape, X.shape))
 
-        if self.gamma == 'auto':
+        if self.gamma == 'scale':
+            if isinstance(X, sp.csr_matrix):
+                # std = sqrt(E[X^2] - E[X]^2)
+                X_std = np.sqrt((X.multiply(X)).mean() - (X.mean())**2)
+            else:
+                X_std = X.std()
+            if X_std != 0:
+                self._gamma = 1.0 / (X.shape[1] * X_std)
+            else:
+                self._gamma = 1.0
+        elif self.gamma == 'auto' or self.gamma == 'auto_deprecated':
+            if self.gamma == 'auto_deprecated':
+                warnings.warn("The default gamma parameter value 'auto', "
+                              "calculated as 1 / n_features, will change to "
+                              "'scale' calculated as "
+                              "1 / (n_features * X.std()) in version 0.22.",
+                              DeprecationWarning)
             self._gamma = 1.0 / X.shape[1]
         else:
             self._gamma = self.gamma
diff --git a/sklearn/svm/classes.py b/sklearn/svm/classes.py
index 223dbbc0aea50..952fa3eb1788a 100644
--- a/sklearn/svm/classes.py
+++ b/sklearn/svm/classes.py
@@ -448,12 +448,12 @@ class SVC(BaseSVC):
         Penalty parameter C of the error term.
 
     kernel : string, optional (default='rbf')
-         Specifies the kernel type to be used in the algorithm.
-         It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
-         a callable.
-         If none is given, 'rbf' will be used. If a callable is given it is
-         used to pre-compute the kernel matrix from data matrices; that matrix
-         should be an array of shape ``(n_samples, n_samples)``.
+        Specifies the kernel type to be used in the algorithm.
+        It must be one of 'linear', 'poly', 'rbf', 'sigmoid', 'precomputed' or
+        a callable.
+        If none is given, 'rbf' will be used. If a callable is given it is
+        used to pre-compute the kernel matrix from data matrices; that matrix
+        should be an array of shape ``(n_samples, n_samples)``.
 
     degree : int, optional (default=3)
         Degree of the polynomial kernel function ('poly').
@@ -461,7 +461,14 @@ class SVC(BaseSVC):
 
     gamma : float, optional (default='auto')
         Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
-        If gamma is 'auto' then 1/n_features will be used instead.
+
+        Current default is 'auto' which uses 1 / n_features,
+        if gamma='scale' is passed then it uses 1 / (n_features * X.std())
+        features. The current default of gamma, 'auto', will change to 'scale'
+        in version 0.22.
+
+        .. versionchanged:: 0.20
+           Default parameter value will change to 'scale' in version 0.22.
 
     coef0 : float, optional (default=0.0)
         Independent term in kernel function.
@@ -552,7 +559,7 @@ class SVC(BaseSVC):
     >>> X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
     >>> y = np.array([1, 1, 2, 2])
     >>> from sklearn.svm import SVC
-    >>> clf = SVC()
+    >>> clf = SVC(gamma='auto')
     >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
     SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
         decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
@@ -575,7 +582,7 @@ class SVC(BaseSVC):
 
     _impl = 'c_svc'
 
-    def __init__(self, C=1.0, kernel='rbf', degree=3, gamma='auto',
+    def __init__(self, C=1.0, kernel='rbf', degree=3, gamma='auto_deprecated',
                  coef0=0.0, shrinking=True, probability=False,
                  tol=1e-3, cache_size=200, class_weight=None,
                  verbose=False, max_iter=-1, decision_function_shape='ovr',
@@ -620,7 +627,14 @@ class NuSVC(BaseSVC):
 
     gamma : float, optional (default='auto')
         Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
-        If gamma is 'auto' then 1/n_features will be used instead.
+
+        Current default is 'auto' which uses 1 / n_features,
+        if gamma='scale' is passed then it uses 1 / (n_features * X.std())
+        features. The current default of gamma, 'auto', will change to 'scale'
+        in version 0.22.
+
+        .. versionchanged:: 0.20
+           Default parameter value will change to 'scale' in version 0.22.
 
     coef0 : float, optional (default=0.0)
         Independent term in kernel function.
@@ -710,10 +724,10 @@ class NuSVC(BaseSVC):
     >>> X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
     >>> y = np.array([1, 1, 2, 2])
     >>> from sklearn.svm import NuSVC
-    >>> clf = NuSVC()
+    >>> clf = NuSVC(gamma='scale')
     >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
     NuSVC(cache_size=200, class_weight=None, coef0=0.0,
-          decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
+          decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
           max_iter=-1, nu=0.5, probability=False, random_state=None,
           shrinking=True, tol=0.001, verbose=False)
     >>> print(clf.predict([[-0.8, -1]]))
@@ -731,9 +745,9 @@ class NuSVC(BaseSVC):
 
     _impl = 'nu_svc'
 
-    def __init__(self, nu=0.5, kernel='rbf', degree=3, gamma='auto', coef0=0.0,
-                 shrinking=True, probability=False, tol=1e-3, cache_size=200,
-                 class_weight=None, verbose=False, max_iter=-1,
+    def __init__(self, nu=0.5, kernel='rbf', degree=3, gamma='auto_deprecated',
+                 coef0=0.0, shrinking=True, probability=False, tol=1e-3,
+                 cache_size=200, class_weight=None, verbose=False, max_iter=-1,
                  decision_function_shape='ovr', random_state=None):
 
         super(NuSVC, self).__init__(
@@ -778,7 +792,14 @@ class SVR(BaseLibSVM, RegressorMixin):
 
     gamma : float, optional (default='auto')
         Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
-        If gamma is 'auto' then 1/n_features will be used instead.
+
+        Current default is 'auto' which uses 1 / n_features,
+        if gamma='scale' is passed then it uses 1 / (n_features * X.std())
+        features. The current default of gamma, 'auto', will change to 'scale'
+        in version 0.22.
+
+        .. versionchanged:: 0.20
+           Default parameter value will change to 'scale' in version 0.22.
 
     coef0 : float, optional (default=0.0)
         Independent term in kernel function.
@@ -833,9 +854,9 @@ class SVR(BaseLibSVM, RegressorMixin):
     >>> np.random.seed(0)
     >>> y = np.random.randn(n_samples)
     >>> X = np.random.randn(n_samples, n_features)
-    >>> clf = SVR(C=1.0, epsilon=0.2)
+    >>> clf = SVR(gamma='scale', C=1.0, epsilon=0.2)
     >>> clf.fit(X, y) #doctest: +NORMALIZE_WHITESPACE
-    SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.2, gamma='auto',
+    SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.2, gamma='scale',
         kernel='rbf', max_iter=-1, shrinking=True, tol=0.001, verbose=False)
 
     See also
@@ -851,8 +872,8 @@ class SVR(BaseLibSVM, RegressorMixin):
 
     _impl = 'epsilon_svr'
 
-    def __init__(self, kernel='rbf', degree=3, gamma='auto', coef0=0.0,
-                 tol=1e-3, C=1.0, epsilon=0.1, shrinking=True,
+    def __init__(self, kernel='rbf', degree=3, gamma='auto_deprecated',
+                 coef0=0.0, tol=1e-3, C=1.0, epsilon=0.1, shrinking=True,
                  cache_size=200, verbose=False, max_iter=-1):
 
         super(SVR, self).__init__(
@@ -896,7 +917,14 @@ class NuSVR(BaseLibSVM, RegressorMixin):
 
     gamma : float, optional (default='auto')
         Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
-        If gamma is 'auto' then 1/n_features will be used instead.
+
+        Current default is 'auto' which uses 1 / n_features,
+        if gamma='scale' is passed then it uses 1 / (n_features * X.std())
+        features. The current default of gamma, 'auto', will change to 'scale'
+        in version 0.22.
+
+        .. versionchanged:: 0.20
+           Default parameter value will change to 'scale' in version 0.22.
 
     coef0 : float, optional (default=0.0)
         Independent term in kernel function.
@@ -948,9 +976,9 @@ class NuSVR(BaseLibSVM, RegressorMixin):
     >>> np.random.seed(0)
     >>> y = np.random.randn(n_samples)
     >>> X = np.random.randn(n_samples, n_features)
-    >>> clf = NuSVR(C=1.0, nu=0.1)
+    >>> clf = NuSVR(gamma='scale', C=1.0, nu=0.1)
     >>> clf.fit(X, y)  #doctest: +NORMALIZE_WHITESPACE
-    NuSVR(C=1.0, cache_size=200, coef0=0.0, degree=3, gamma='auto',
+    NuSVR(C=1.0, cache_size=200, coef0=0.0, degree=3, gamma='scale',
           kernel='rbf', max_iter=-1, nu=0.1, shrinking=True, tol=0.001,
           verbose=False)
 
@@ -967,8 +995,8 @@ class NuSVR(BaseLibSVM, RegressorMixin):
     _impl = 'nu_svr'
 
     def __init__(self, nu=0.5, C=1.0, kernel='rbf', degree=3,
-                 gamma='auto', coef0=0.0, shrinking=True, tol=1e-3,
-                 cache_size=200, verbose=False, max_iter=-1):
+                 gamma='auto_deprecated', coef0=0.0, shrinking=True,
+                 tol=1e-3, cache_size=200, verbose=False, max_iter=-1):
 
         super(NuSVR, self).__init__(
             kernel=kernel, degree=degree, gamma=gamma, coef0=coef0,
@@ -1007,7 +1035,14 @@ class OneClassSVM(BaseLibSVM):
 
     gamma : float, optional (default='auto')
         Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
-        If gamma is 'auto' then 1/n_features will be used instead.
+
+        Current default is 'auto' which uses 1 / n_features,
+        if gamma='scale' is passed then it uses 1 / (n_features * X.std())
+        features. The current default of gamma, 'auto', will change to 'scale'
+        in version 0.22.
+
+        .. versionchanged:: 0.20
+           Default parameter value will change to 'scale' in version 0.22.
 
     coef0 : float, optional (default=0.0)
         Independent term in kernel function.
@@ -1062,8 +1097,8 @@ class OneClassSVM(BaseLibSVM):
 
     _impl = 'one_class'
 
-    def __init__(self, kernel='rbf', degree=3, gamma='auto', coef0=0.0,
-                 tol=1e-3, nu=0.5, shrinking=True, cache_size=200,
+    def __init__(self, kernel='rbf', degree=3, gamma='auto_deprecated',
+                 coef0=0.0, tol=1e-3, nu=0.5, shrinking=True, cache_size=200,
                  verbose=False, max_iter=-1, random_state=None):
 
         super(OneClassSVM, self).__init__(
diff --git a/sklearn/svm/tests/test_sparse.py b/sklearn/svm/tests/test_sparse.py
index 56ea0b9eaf280..58f209e1d30f5 100644
--- a/sklearn/svm/tests/test_sparse.py
+++ b/sklearn/svm/tests/test_sparse.py
@@ -83,10 +83,10 @@ def test_svc():
     kernels = ["linear", "poly", "rbf", "sigmoid"]
     for dataset in datasets:
         for kernel in kernels:
-            clf = svm.SVC(kernel=kernel, probability=True, random_state=0,
-                          decision_function_shape='ovo')
-            sp_clf = svm.SVC(kernel=kernel, probability=True, random_state=0,
-                             decision_function_shape='ovo')
+            clf = svm.SVC(gamma='scale', kernel=kernel, probability=True,
+                          random_state=0, decision_function_shape='ovo')
+            sp_clf = svm.SVC(gamma='scale', kernel=kernel, probability=True,
+                             random_state=0, decision_function_shape='ovo')
             check_svm_model_equal(clf, sp_clf, *dataset)
 
 
@@ -99,9 +99,9 @@ def test_unsorted_indices():
     X_test = sparse.csr_matrix(digits.data[50:100])
 
     X_sparse = sparse.csr_matrix(X)
-    coef_dense = svm.SVC(kernel='linear', probability=True,
+    coef_dense = svm.SVC(gamma='scale', kernel='linear', probability=True,
                          random_state=0).fit(X, y).coef_
-    sparse_svc = svm.SVC(kernel='linear', probability=True,
+    sparse_svc = svm.SVC(gamma='scale', kernel='linear', probability=True,
                          random_state=0).fit(X_sparse, y)
     coef_sorted = sparse_svc.coef_
     # make sure dense and sparse SVM give the same result
@@ -114,7 +114,7 @@ def test_unsorted_indices():
     assert_false(X_sparse_unsorted.has_sorted_indices)
     assert_false(X_test_unsorted.has_sorted_indices)
 
-    unsorted_svc = svm.SVC(kernel='linear', probability=True,
+    unsorted_svc = svm.SVC(gamma='scale', kernel='linear', probability=True,
                            random_state=0).fit(X_sparse_unsorted, y)
     coef_unsorted = unsorted_svc.coef_
     # make sure unsorted indices give same result
@@ -126,16 +126,17 @@ def test_unsorted_indices():
 def test_svc_with_custom_kernel():
     def kfunc(x, y):
         return safe_sparse_dot(x, y.T)
-    clf_lin = svm.SVC(kernel='linear').fit(X_sp, Y)
-    clf_mylin = svm.SVC(kernel=kfunc).fit(X_sp, Y)
+    clf_lin = svm.SVC(gamma='scale', kernel='linear').fit(X_sp, Y)
+    clf_mylin = svm.SVC(gamma='scale', kernel=kfunc).fit(X_sp, Y)
     assert_array_equal(clf_lin.predict(X_sp), clf_mylin.predict(X_sp))
 
 
 def test_svc_iris():
     # Test the sparse SVC with the iris dataset
     for k in ('linear', 'poly', 'rbf'):
-        sp_clf = svm.SVC(kernel=k).fit(iris.data, iris.target)
-        clf = svm.SVC(kernel=k).fit(iris.data.toarray(), iris.target)
+        sp_clf = svm.SVC(gamma='scale', kernel=k).fit(iris.data, iris.target)
+        clf = svm.SVC(gamma='scale', kernel=k).fit(iris.data.toarray(),
+                                                   iris.target)
 
         assert_array_almost_equal(clf.support_vectors_,
                                   sp_clf.support_vectors_.toarray())
@@ -153,7 +154,8 @@ def test_sparse_decision_function():
     # returns the same as the one in libsvm
 
     # multi class:
-    svc = svm.SVC(kernel='linear', C=0.1, decision_function_shape='ovo')
+    svc = svm.SVC(gamma='scale', kernel='linear', C=0.1,
+                  decision_function_shape='ovo')
     clf = svc.fit(iris.data, iris.target)
 
     dec = safe_sparse_dot(iris.data, clf.coef_.T) + clf.intercept_
@@ -175,16 +177,16 @@ def test_sparse_decision_function():
 def test_error():
     # Test that it gives proper exception on deficient input
     # impossible value of C
-    assert_raises(ValueError, svm.SVC(C=-1).fit, X, Y)
+    assert_raises(ValueError, svm.SVC(gamma='scale', C=-1).fit, X, Y)
 
     # impossible value of nu
-    clf = svm.NuSVC(nu=0.0)
+    clf = svm.NuSVC(gamma='scale', nu=0.0)
     assert_raises(ValueError, clf.fit, X_sp, Y)
 
     Y2 = Y[:-1]  # wrong dimensions for labels
     assert_raises(ValueError, clf.fit, X_sp, Y2)
 
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     clf.fit(X_sp, Y)
     assert_array_equal(clf.predict(T), true_result)
 
@@ -241,7 +243,7 @@ def test_weight():
     X_ = sparse.csr_matrix(X_)
     for clf in (linear_model.LogisticRegression(),
                 svm.LinearSVC(random_state=0),
-                svm.SVC()):
+                svm.SVC(gamma="scale")):
         clf.set_params(class_weight={0: 5})
         clf.fit(X_[:180], y_[:180])
         y_pred = clf.predict(X_[180:])
@@ -250,7 +252,7 @@ def test_weight():
 
 def test_sample_weights():
     # Test weights on individual samples
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     clf.fit(X_sp, Y)
     assert_array_equal(clf.predict([X[2]]), [1.])
 
@@ -276,8 +278,8 @@ def test_sparse_oneclasssvm():
     kernels = ["linear", "poly", "rbf", "sigmoid"]
     for dataset in datasets:
         for kernel in kernels:
-            clf = svm.OneClassSVM(kernel=kernel)
-            sp_clf = svm.OneClassSVM(kernel=kernel)
+            clf = svm.OneClassSVM(gamma='scale', kernel=kernel)
+            sp_clf = svm.OneClassSVM(gamma='scale', kernel=kernel)
             check_svm_model_equal(clf, sp_clf, *dataset)
 
 
@@ -303,8 +305,9 @@ def test_sparse_realdata():
          3., 0., 0., 2., 2., 1., 3., 1., 1., 0., 1., 2., 1.,
          1., 3.])
 
-    clf = svm.SVC(kernel='linear').fit(X.toarray(), y)
-    sp_clf = svm.SVC(kernel='linear').fit(sparse.coo_matrix(X), y)
+    clf = svm.SVC(gamma='scale', kernel='linear').fit(X.toarray(), y)
+    sp_clf = svm.SVC(gamma='scale',
+                     kernel='linear').fit(sparse.coo_matrix(X), y)
 
     assert_array_equal(clf.support_vectors_, sp_clf.support_vectors_.toarray())
     assert_array_equal(clf.dual_coef_, sp_clf.dual_coef_.toarray())
@@ -313,15 +316,15 @@ def test_sparse_realdata():
 def test_sparse_svc_clone_with_callable_kernel():
     # Test that the "dense_fit" is called even though we use sparse input
     # meaning that everything works fine.
-    a = svm.SVC(C=1, kernel=lambda x, y: x * y.T, probability=True,
-                random_state=0)
+    a = svm.SVC(gamma='scale', C=1, kernel=lambda x, y: x * y.T,
+                probability=True, random_state=0)
     b = base.clone(a)
 
     b.fit(X_sp, Y)
     pred = b.predict(X_sp)
     b.predict_proba(X_sp)
 
-    dense_svm = svm.SVC(C=1, kernel=lambda x, y: np.dot(x, y.T),
+    dense_svm = svm.SVC(gamma='scale', C=1, kernel=lambda x, y: np.dot(x, y.T),
                         probability=True, random_state=0)
     pred_dense = dense_svm.fit(X, Y).predict(X)
     assert_array_equal(pred_dense, pred)
@@ -329,17 +332,17 @@ def test_sparse_svc_clone_with_callable_kernel():
 
 
 def test_timeout():
-    sp = svm.SVC(C=1, kernel=lambda x, y: x * y.T, probability=True,
-                 random_state=0, max_iter=1)
+    sp = svm.SVC(gamma='scale', C=1, kernel=lambda x, y: x * y.T,
+                 probability=True, random_state=0, max_iter=1)
 
     assert_warns(ConvergenceWarning, sp.fit, X_sp, Y)
 
 
 def test_consistent_proba():
-    a = svm.SVC(probability=True, max_iter=1, random_state=0)
+    a = svm.SVC(gamma='scale', probability=True, max_iter=1, random_state=0)
     with ignore_warnings(category=ConvergenceWarning):
         proba_1 = a.fit(X, Y).predict_proba(X)
-    a = svm.SVC(probability=True, max_iter=1, random_state=0)
+    a = svm.SVC(gamma='scale', probability=True, max_iter=1, random_state=0)
     with ignore_warnings(category=ConvergenceWarning):
         proba_2 = a.fit(X, Y).predict_proba(X)
     assert_array_almost_equal(proba_1, proba_2)
diff --git a/sklearn/svm/tests/test_svm.py b/sklearn/svm/tests/test_svm.py
index daf35f82a39e5..3a16727aba5d6 100644
--- a/sklearn/svm/tests/test_svm.py
+++ b/sklearn/svm/tests/test_svm.py
@@ -20,6 +20,7 @@
 from sklearn.utils.testing import assert_raises_regexp, assert_warns
 from sklearn.utils.testing import assert_warns_message, assert_raise_message
 from sklearn.utils.testing import ignore_warnings, assert_raises
+from sklearn.utils.testing import assert_no_warnings
 from sklearn.exceptions import ConvergenceWarning
 from sklearn.exceptions import NotFittedError
 from sklearn.multiclass import OneVsRestClassifier
@@ -41,7 +42,7 @@
 
 def test_libsvm_parameters():
     # Test parameters on classes that make use of libsvm.
-    clf = svm.SVC(kernel='linear').fit(X, Y)
+    clf = svm.SVC(gamma='scale', kernel='linear').fit(X, Y)
     assert_array_equal(clf.dual_coef_, [[-0.25, .25]])
     assert_array_equal(clf.support_, [1, 3])
     assert_array_equal(clf.support_vectors_, (X[1], X[3]))
@@ -54,7 +55,7 @@ def test_libsvm_iris():
 
     # shuffle the dataset so that labels are not ordered
     for k in ('linear', 'rbf'):
-        clf = svm.SVC(kernel=k).fit(iris.data, iris.target)
+        clf = svm.SVC(gamma='scale', kernel=k).fit(iris.data, iris.target)
         assert_greater(np.mean(clf.predict(iris.data) == iris.target), 0.9)
         assert_true(hasattr(clf, "coef_") == (k == 'linear'))
 
@@ -89,7 +90,7 @@ def test_libsvm_iris():
 def test_precomputed():
     # SVC with a precomputed kernel.
     # We test it with a toy dataset and with iris.
-    clf = svm.SVC(kernel='precomputed')
+    clf = svm.SVC(gamma='scale', kernel='precomputed')
     # Gram matrix for train data (square matrix)
     # (we use just a linear kernel)
     K = np.dot(X, np.array(X).T)
@@ -119,7 +120,7 @@ def test_precomputed():
     # matrix. kernel is just a linear kernel
 
     kfunc = lambda x, y: np.dot(x, y.T)
-    clf = svm.SVC(kernel=kfunc)
+    clf = svm.SVC(gamma='scale', kernel=kfunc)
     clf.fit(X, Y)
     pred = clf.predict(T)
 
@@ -130,8 +131,8 @@ def test_precomputed():
 
     # test a precomputed kernel with the iris dataset
     # and check parameters against a linear SVC
-    clf = svm.SVC(kernel='precomputed')
-    clf2 = svm.SVC(kernel='linear')
+    clf = svm.SVC(gamma='scale', kernel='precomputed')
+    clf2 = svm.SVC(gamma='scale', kernel='linear')
     K = np.dot(iris.data, iris.data.T)
     clf.fit(K, iris.target)
     clf2.fit(iris.data, iris.target)
@@ -151,7 +152,7 @@ def test_precomputed():
     pred = clf.predict(K)
     assert_almost_equal(np.mean(pred == iris.target), .99, decimal=2)
 
-    clf = svm.SVC(kernel=kfunc)
+    clf = svm.SVC(gamma='scale', kernel=kfunc)
     clf.fit(iris.data, iris.target)
     assert_almost_equal(np.mean(pred == iris.target), .99, decimal=2)
 
@@ -160,9 +161,9 @@ def test_svr():
     # Test Support Vector Regression
 
     diabetes = datasets.load_diabetes()
-    for clf in (svm.NuSVR(kernel='linear', nu=.4, C=1.0),
-                svm.NuSVR(kernel='linear', nu=.4, C=10.),
-                svm.SVR(kernel='linear', C=10.),
+    for clf in (svm.NuSVR(gamma='scale', kernel='linear', nu=.4, C=1.0),
+                svm.NuSVR(gamma='scale', kernel='linear', nu=.4, C=10.),
+                svm.SVR(gamma='scale', kernel='linear', C=10.),
                 svm.LinearSVR(C=10.),
                 svm.LinearSVR(C=10.),
                 ):
@@ -171,7 +172,7 @@ def test_svr():
 
     # non-regression test; previously, BaseLibSVM would check that
     # len(np.unique(y)) < 2, which must only be done for SVC
-    svm.SVR().fit(diabetes.data, np.ones(len(diabetes.data)))
+    svm.SVR(gamma='scale').fit(diabetes.data, np.ones(len(diabetes.data)))
     svm.LinearSVR().fit(diabetes.data, np.ones(len(diabetes.data)))
 
 
@@ -182,7 +183,8 @@ def test_linearsvr():
     lsvr = svm.LinearSVR(C=1e3).fit(diabetes.data, diabetes.target)
     score1 = lsvr.score(diabetes.data, diabetes.target)
 
-    svr = svm.SVR(kernel='linear', C=1e3).fit(diabetes.data, diabetes.target)
+    svr = svm.SVR(gamma='scale', kernel='linear', C=1e3).fit(diabetes.data,
+                                                             diabetes.target)
     score2 = svr.score(diabetes.data, diabetes.target)
 
     assert_allclose(np.linalg.norm(lsvr.coef_),
@@ -230,22 +232,22 @@ def test_svr_errors():
     y = [0.0, 0.5]
 
     # Bad kernel
-    clf = svm.SVR(kernel=lambda x, y: np.array([[1.0]]))
+    clf = svm.SVR(gamma='scale', kernel=lambda x, y: np.array([[1.0]]))
     clf.fit(X, y)
     assert_raises(ValueError, clf.predict, X)
 
 
 def test_oneclass():
     # Test OneClassSVM
-    clf = svm.OneClassSVM()
+    clf = svm.OneClassSVM(gamma='scale')
     clf.fit(X)
     pred = clf.predict(T)
 
     assert_array_equal(pred, [-1, -1, -1])
     assert_equal(pred.dtype, np.dtype('intp'))
-    assert_array_almost_equal(clf.intercept_, [-1.008], decimal=3)
+    assert_array_almost_equal(clf.intercept_, [-1.117], decimal=3)
     assert_array_almost_equal(clf.dual_coef_,
-                              [[0.632, 0.233, 0.633, 0.234, 0.632, 0.633]],
+                              [[0.681, 0.139, 0.68, 0.14, 0.68, 0.68]],
                               decimal=3)
     assert_raises(AttributeError, lambda: clf.coef_)
 
@@ -287,7 +289,7 @@ def test_tweak_params():
     # of C/Python copying in the libsvm bindings.
     # The success of this test ensures that the mapping between libsvm and
     # the python classifier is complete.
-    clf = svm.SVC(kernel='linear', C=1.0)
+    clf = svm.SVC(gamma='scale', kernel='linear', C=1.0)
     clf.fit(X, Y)
     assert_array_equal(clf.dual_coef_, [[-.25, .25]])
     assert_array_equal(clf.predict([[-.1, -.1]]), [1])
@@ -299,8 +301,9 @@ def test_probability():
     # Predict probabilities using SVC
     # This uses cross validation, so we use a slightly bigger testing set.
 
-    for clf in (svm.SVC(probability=True, random_state=0, C=1.0),
-                svm.NuSVC(probability=True, random_state=0)):
+    for clf in (svm.SVC(gamma='scale', probability=True, random_state=0,
+                C=1.0), svm.NuSVC(gamma='scale', probability=True,
+                                  random_state=0)):
         clf.fit(iris.data, iris.target)
 
         prob_predict = clf.predict_proba(iris.data)
@@ -318,7 +321,7 @@ def test_decision_function():
     # Sanity check, test that decision_function implemented in python
     # returns the same as the one in libsvm
     # multi class:
-    clf = svm.SVC(kernel='linear', C=0.1,
+    clf = svm.SVC(gamma='scale', kernel='linear', C=0.1,
                   decision_function_shape='ovo').fit(iris.data, iris.target)
 
     dec = np.dot(iris.data, clf.coef_.T) + clf.intercept_
@@ -349,7 +352,7 @@ def test_decision_function_shape():
     # check that decision_function_shape='ovr' gives
     # correct shape and is consistent with predict
 
-    clf = svm.SVC(kernel='linear', C=0.1,
+    clf = svm.SVC(gamma='scale', kernel='linear', C=0.1,
                   decision_function_shape='ovr').fit(iris.data, iris.target)
     dec = clf.decision_function(iris.data)
     assert_equal(dec.shape, (len(iris.data), 3))
@@ -359,14 +362,14 @@ def test_decision_function_shape():
     X, y = make_blobs(n_samples=80, centers=5, random_state=0)
     X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)
 
-    clf = svm.SVC(kernel='linear', C=0.1,
+    clf = svm.SVC(gamma='scale', kernel='linear', C=0.1,
                   decision_function_shape='ovr').fit(X_train, y_train)
     dec = clf.decision_function(X_test)
     assert_equal(dec.shape, (len(X_test), 5))
     assert_array_equal(clf.predict(X_test), np.argmax(dec, axis=1))
 
     # check shape of ovo_decition_function=True
-    clf = svm.SVC(kernel='linear', C=0.1,
+    clf = svm.SVC(gamma='scale', kernel='linear', C=0.1,
                   decision_function_shape='ovo').fit(X_train, y_train)
     dec = clf.decision_function(X_train)
     assert_equal(dec.shape, (len(X_train), 10))
@@ -381,7 +384,7 @@ def test_svr_predict():
     y = iris.target
 
     # linear kernel
-    reg = svm.SVR(kernel='linear', C=0.1).fit(X, y)
+    reg = svm.SVR(gamma='scale', kernel='linear', C=0.1).fit(X, y)
 
     dec = np.dot(X, reg.coef_.T) + reg.intercept_
     assert_array_almost_equal(dec.ravel(), reg.predict(X).ravel())
@@ -396,7 +399,7 @@ def test_svr_predict():
 
 def test_weight():
     # Test class weights
-    clf = svm.SVC(class_weight={1: 0.1})
+    clf = svm.SVC(gamma='scale', class_weight={1: 0.1})
     # we give a small weights to class 1
     clf.fit(X, Y)
     # so all predicted values belong to class 2
@@ -406,7 +409,7 @@ def test_weight():
                                  weights=[0.833, 0.167], random_state=2)
 
     for clf in (linear_model.LogisticRegression(),
-                svm.LinearSVC(random_state=0), svm.SVC()):
+                svm.LinearSVC(random_state=0), svm.SVC(gamma="scale")):
         clf.set_params(class_weight={0: .1, 1: 10})
         clf.fit(X_[:100], y_[:100])
         y_pred = clf.predict(X_[100:])
@@ -416,7 +419,7 @@ def test_weight():
 def test_sample_weights():
     # Test weights on individual samples
     # TODO: check on NuSVR, OneClass, etc.
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     clf.fit(X, Y)
     assert_array_equal(clf.predict([X[2]]), [1.])
 
@@ -425,7 +428,7 @@ def test_sample_weights():
     assert_array_equal(clf.predict([X[2]]), [2.])
 
     # test that rescaling all samples is the same as changing C
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     clf.fit(X, Y)
     dual_coef_no_weight = clf.dual_coef_
     clf.set_params(C=100)
@@ -449,8 +452,8 @@ def test_auto_weight():
     class_weights = compute_class_weight('balanced', classes, y[unbalanced])
     assert_true(np.argmax(class_weights) == 2)
 
-    for clf in (svm.SVC(kernel='linear'), svm.LinearSVC(random_state=0),
-                LogisticRegression()):
+    for clf in (svm.SVC(gamma='scale', kernel='linear'),
+                svm.LinearSVC(random_state=0), LogisticRegression()):
         # check that score is better when class='balanced' is set.
         y_pred = clf.fit(X[unbalanced], y[unbalanced]).predict(X)
         clf.set_params(class_weight='balanced')
@@ -463,17 +466,17 @@ def test_auto_weight():
 def test_bad_input():
     # Test that it gives proper exception on deficient input
     # impossible value of C
-    assert_raises(ValueError, svm.SVC(C=-1).fit, X, Y)
+    assert_raises(ValueError, svm.SVC(gamma='scale', C=-1).fit, X, Y)
 
     # impossible value of nu
-    clf = svm.NuSVC(nu=0.0)
+    clf = svm.NuSVC(gamma='scale', nu=0.0)
     assert_raises(ValueError, clf.fit, X, Y)
 
     Y2 = Y[:-1]  # wrong dimensions for labels
     assert_raises(ValueError, clf.fit, X, Y2)
 
     # Test with arrays that are non-contiguous.
-    for clf in (svm.SVC(), svm.LinearSVC(random_state=0)):
+    for clf in (svm.SVC(gamma="scale"), svm.LinearSVC(random_state=0)):
         Xf = np.asfortranarray(X)
         assert_false(Xf.flags['C_CONTIGUOUS'])
         yf = np.ascontiguousarray(np.tile(Y, (2, 1)).T)
@@ -484,22 +487,22 @@ def test_bad_input():
         assert_array_equal(clf.predict(T), true_result)
 
     # error for precomputed kernelsx
-    clf = svm.SVC(kernel='precomputed')
+    clf = svm.SVC(gamma='scale', kernel='precomputed')
     assert_raises(ValueError, clf.fit, X, Y)
 
     # sample_weight bad dimensions
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     assert_raises(ValueError, clf.fit, X, Y, sample_weight=range(len(X) - 1))
 
     # predict with sparse input when trained with dense
-    clf = svm.SVC().fit(X, Y)
+    clf = svm.SVC(gamma="scale").fit(X, Y)
     assert_raises(ValueError, clf.predict, sparse.lil_matrix(X))
 
     Xt = np.array(X).T
     clf.fit(np.dot(X, Xt), Y)
     assert_raises(ValueError, clf.predict, X)
 
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     clf.fit(X, Y)
     assert_raises(ValueError, clf.predict, Xt)
 
@@ -508,28 +511,28 @@ def test_unicode_kernel():
     # Test that a unicode kernel name does not cause a TypeError on clf.fit
     if six.PY2:
         # Test unicode (same as str on python3)
-        clf = svm.SVC(kernel=unicode('linear'))
+        clf = svm.SVC(gamma='scale', kernel=unicode('linear'))
         clf.fit(X, Y)
 
         # Test ascii bytes (str is bytes in python2)
-        clf = svm.SVC(kernel=str('linear'))
+        clf = svm.SVC(gamma='scale', kernel=str('linear'))
         clf.fit(X, Y)
     else:
         # Test unicode (str is unicode in python3)
-        clf = svm.SVC(kernel=str('linear'))
+        clf = svm.SVC(gamma='scale', kernel=str('linear'))
         clf.fit(X, Y)
 
         # Test ascii bytes (same as str on python2)
-        clf = svm.SVC(kernel=bytes('linear', 'ascii'))
+        clf = svm.SVC(gamma='scale', kernel=bytes('linear', 'ascii'))
         clf.fit(X, Y)
 
     # Test default behavior on both versions
-    clf = svm.SVC(kernel='linear')
+    clf = svm.SVC(gamma='scale', kernel='linear')
     clf.fit(X, Y)
 
 
 def test_sparse_precomputed():
-    clf = svm.SVC(kernel='precomputed')
+    clf = svm.SVC(gamma='scale', kernel='precomputed')
     sparse_gram = sparse.csr_matrix([[1, 0], [0, 1]])
     try:
         clf.fit(sparse_gram, [0, 1])
@@ -777,11 +780,11 @@ def test_liblinear_set_coef():
 def test_immutable_coef_property():
     # Check that primal coef modification are not silently ignored
     svms = [
-        svm.SVC(kernel='linear').fit(iris.data, iris.target),
-        svm.NuSVC(kernel='linear').fit(iris.data, iris.target),
-        svm.SVR(kernel='linear').fit(iris.data, iris.target),
-        svm.NuSVR(kernel='linear').fit(iris.data, iris.target),
-        svm.OneClassSVM(kernel='linear').fit(iris.data),
+        svm.SVC(gamma='scale', kernel='linear').fit(iris.data, iris.target),
+        svm.NuSVC(gamma='scale', kernel='linear').fit(iris.data, iris.target),
+        svm.SVR(gamma='scale', kernel='linear').fit(iris.data, iris.target),
+        svm.NuSVR(gamma='scale', kernel='linear').fit(iris.data, iris.target),
+        svm.OneClassSVM(gamma='scale', kernel='linear').fit(iris.data),
     ]
     for clf in svms:
         assert_raises(AttributeError, clf.__setattr__, 'coef_', np.arange(3))
@@ -806,15 +809,15 @@ def test_linearsvc_verbose():
 def test_svc_clone_with_callable_kernel():
     # create SVM with callable linear kernel, check that results are the same
     # as with built-in linear kernel
-    svm_callable = svm.SVC(kernel=lambda x, y: np.dot(x, y.T),
+    svm_callable = svm.SVC(gamma='scale', kernel=lambda x, y: np.dot(x, y.T),
                            probability=True, random_state=0,
                            decision_function_shape='ovr')
     # clone for checking clonability with lambda functions..
     svm_cloned = base.clone(svm_callable)
     svm_cloned.fit(iris.data, iris.target)
 
-    svm_builtin = svm.SVC(kernel='linear', probability=True, random_state=0,
-                          decision_function_shape='ovr')
+    svm_builtin = svm.SVC(gamma='scale', kernel='linear', probability=True,
+                          random_state=0, decision_function_shape='ovr')
     svm_builtin.fit(iris.data, iris.target)
 
     assert_array_almost_equal(svm_cloned.dual_coef_,
@@ -832,7 +835,7 @@ def test_svc_clone_with_callable_kernel():
 
 
 def test_svc_bad_kernel():
-    svc = svm.SVC(kernel=lambda x, y: x)
+    svc = svm.SVC(gamma='scale', kernel=lambda x, y: x)
     assert_raises(ValueError, svc.fit, X, Y)
 
 
@@ -845,11 +848,11 @@ def test_timeout():
 def test_unfitted():
     X = "foo!"  # input validation not required when SVM not fitted
 
-    clf = svm.SVC()
+    clf = svm.SVC(gamma="scale")
     assert_raises_regexp(Exception, r".*\bSVC\b.*\bnot\b.*\bfitted\b",
                          clf.predict, X)
 
-    clf = svm.NuSVR()
+    clf = svm.NuSVR(gamma='scale')
     assert_raises_regexp(Exception, r".*\bNuSVR\b.*\bnot\b.*\bfitted\b",
                          clf.predict, X)
 
@@ -878,7 +881,8 @@ def test_svr_coef_sign():
     X = np.random.RandomState(21).randn(10, 3)
     y = np.random.RandomState(12).randn(10)
 
-    for svr in [svm.SVR(kernel='linear'), svm.NuSVR(kernel='linear'),
+    for svr in [svm.SVR(gamma='scale', kernel='linear'),
+                svm.NuSVR(gamma='scale', kernel='linear'),
                 svm.LinearSVR()]:
         svr.fit(X, y)
         assert_array_almost_equal(svr.predict(X),
@@ -908,12 +912,12 @@ def test_hasattr_predict_proba():
     # Method must be (un)available before or after fit, switched by
     # `probability` param
 
-    G = svm.SVC(probability=True)
+    G = svm.SVC(gamma='scale', probability=True)
     assert_true(hasattr(G, 'predict_proba'))
     G.fit(iris.data, iris.target)
     assert_true(hasattr(G, 'predict_proba'))
 
-    G = svm.SVC(probability=False)
+    G = svm.SVC(gamma='scale', probability=False)
     assert_false(hasattr(G, 'predict_proba'))
     G.fit(iris.data, iris.target)
     assert_false(hasattr(G, 'predict_proba'))
@@ -930,7 +934,7 @@ def test_decision_function_shape_two_class():
     for n_classes in [2, 3]:
         X, y = make_blobs(centers=n_classes, random_state=0)
         for estimator in [svm.SVC, svm.NuSVC]:
-            clf = OneVsRestClassifier(estimator(
+            clf = OneVsRestClassifier(estimator(gamma='scale',
                 decision_function_shape="ovr")).fit(X, y)
             assert_equal(len(clf.predict(X)), len(y))
 
@@ -953,7 +957,8 @@ def test_ovr_decision_function():
 
     y_test = [0] * 2 + [1] * 2 + [2] * 2 + [3] * 2
 
-    clf = svm.SVC(kernel='linear', decision_function_shape='ovr')
+    clf = svm.SVC(gamma='scale', kernel='linear',
+                  decision_function_shape='ovr')
     clf.fit(X_train, y_train)
 
     y_pred = clf.predict(X_test)
@@ -975,3 +980,22 @@ def test_ovr_decision_function():
     # Test if the first point has lower decision value on every quadrant
     # compared to the second point
     assert_true(np.all(pred_class_deci_val[:, 0] < pred_class_deci_val[:, 1]))
+
+
+def test_gamma_auto():
+    X, y = [[0.0], [1.0]], [0, 1]
+
+    msg = ("The default gamma parameter value 'auto', calculated as "
+           "1 / n_features, will change to 'scale' calculated as "
+           "1 / (n_features * X.std()) in version 0.22.")
+
+    assert_warns_message(DeprecationWarning, msg,
+                         svm.SVC().fit, X, y)
+
+
+def test_gamma_scale():
+    X, y = [[0.], [1.]], [0, 1]
+
+    clf = svm.SVC(gamma='scale')
+    assert_no_warnings(clf.fit, X, y)
+    assert_equal(clf._gamma, 2.)
diff --git a/sklearn/tests/test_base.py b/sklearn/tests/test_base.py
index 4620dcbd03604..e04233a64b079 100644
--- a/sklearn/tests/test_base.py
+++ b/sklearn/tests/test_base.py
@@ -207,7 +207,7 @@ def test_get_params():
 
 
 def test_is_classifier():
-    svc = SVC()
+    svc = SVC(gamma="scale")
     assert_true(is_classifier(svc))
     assert_true(is_classifier(GridSearchCV(svc, {'C': [0.1, 1]})))
     assert_true(is_classifier(Pipeline([('svc', svc)])))
@@ -217,7 +217,7 @@ def test_is_classifier():
 
 def test_set_params():
     # test nested estimator parameter setting
-    clf = Pipeline([("svc", SVC())])
+    clf = Pipeline([("svc", SVC(gamma="scale"))])
     # non-existing parameter in svc
     assert_raises(ValueError, clf.set_params, svc__stupid_param=True)
     # non-existing parameter of pipeline
@@ -250,7 +250,7 @@ def test_set_params_updates_valid_params():
     # Check that set_params tries to set SVC().C, not
     # DecisionTreeClassifier().C
     gscv = GridSearchCV(DecisionTreeClassifier(), {})
-    gscv.set_params(estimator=SVC(), estimator__C=42.0)
+    gscv.set_params(estimator=SVC(gamma='scale'), estimator__C=42.0)
     assert gscv.estimator.C == 42.0
 
 
diff --git a/sklearn/tests/test_cross_validation.py b/sklearn/tests/test_cross_validation.py
index 4d756bdaa0cf8..432ac283c440d 100644
--- a/sklearn/tests/test_cross_validation.py
+++ b/sklearn/tests/test_cross_validation.py
@@ -700,7 +700,7 @@ def test_cross_val_score_pandas():
 
 def test_cross_val_score_mask():
     # test that cross_val_score works with boolean masks
-    svm = SVC(kernel="linear")
+    svm = SVC(gamma='scale', kernel="linear")
     iris = load_iris()
     X, y = iris.data, iris.target
     cv_indices = cval.KFold(len(y), 5)
@@ -719,12 +719,12 @@ def test_cross_val_score_mask():
 
 def test_cross_val_score_precomputed():
     # test for svm with precomputed kernel
-    svm = SVC(kernel="precomputed")
+    svm = SVC(gamma='scale', kernel="precomputed")
     iris = load_iris()
     X, y = iris.data, iris.target
     linear_kernel = np.dot(X, X.T)
     score_precomputed = cval.cross_val_score(svm, linear_kernel, y)
-    svm = SVC(kernel="linear")
+    svm = SVC(gamma='scale', kernel="linear")
     score_linear = cval.cross_val_score(svm, X, y)
     assert_array_equal(score_precomputed, score_linear)
 
@@ -878,7 +878,7 @@ def train_test_split_mock_pandas():
 
 def test_cross_val_score_with_score_func_classification():
     iris = load_iris()
-    clf = SVC(kernel='linear')
+    clf = SVC(gamma='scale', kernel='linear')
 
     # Default score (should be the accuracy score)
     scores = cval.cross_val_score(clf, iris.data, iris.target, cv=5)
@@ -928,7 +928,7 @@ def test_permutation_score():
     X = iris.data
     X_sparse = coo_matrix(X)
     y = iris.target
-    svm = SVC(kernel='linear')
+    svm = SVC(gamma='scale', kernel='linear')
     cv = cval.StratifiedKFold(y, 2)
 
     score, scores, pvalue = cval.permutation_test_score(
@@ -943,7 +943,7 @@ def test_permutation_score():
     assert_true(pvalue_label == pvalue)
 
     # check that we obtain the same results with a sparse representation
-    svm_sparse = SVC(kernel='linear')
+    svm_sparse = SVC(gamma='scale', kernel='linear')
     cv_sparse = cval.StratifiedKFold(y, 2)
     score_label, _, pvalue_label = cval.permutation_test_score(
         svm_sparse, X_sparse, y, n_permutations=30, cv=cv_sparse,
@@ -1036,8 +1036,8 @@ def test_shufflesplit_reproducible():
 
 
 def test_safe_split_with_precomputed_kernel():
-    clf = SVC()
-    clfp = SVC(kernel="precomputed")
+    clf = SVC(gamma="scale")
+    clfp = SVC(gamma='scale', kernel="precomputed")
 
     iris = load_iris()
     X, y = iris.data, iris.target
@@ -1245,7 +1245,7 @@ def test_cross_val_predict_sparse_prediction():
                                           random_state=1)
     X_sparse = csr_matrix(X)
     y_sparse = csr_matrix(y)
-    classif = OneVsRestClassifier(SVC(kernel='linear'))
+    classif = OneVsRestClassifier(SVC(gamma='scale', kernel='linear'))
     preds = cval.cross_val_predict(classif, X, y, cv=10)
     preds_sparse = cval.cross_val_predict(classif, X_sparse, y_sparse, cv=10)
     preds_sparse = preds_sparse.toarray()
diff --git a/sklearn/tests/test_grid_search.py b/sklearn/tests/test_grid_search.py
index f3c003e8c5be5..3771d390579f9 100644
--- a/sklearn/tests/test_grid_search.py
+++ b/sklearn/tests/test_grid_search.py
@@ -275,7 +275,7 @@ def test_grid_search_iid():
     mask[np.where(y == 2)[0][::2]] = 0
     # this leads to perfect classification on one fold and a score of 1/3 on
     # the other
-    svm = SVC(kernel='linear')
+    svm = SVC(gamma='scale', kernel='linear')
     # create "cv" for splits
     cv = [[mask, ~mask], [~mask, mask]]
     # once with iid=True (default)
@@ -306,7 +306,7 @@ def test_grid_search_one_grid_point():
     X_, y_ = make_classification(n_samples=200, n_features=100, random_state=0)
     param_dict = {"C": [1.0], "kernel": ["rbf"], "gamma": [0.1]}
 
-    clf = SVC()
+    clf = SVC(gamma="scale")
     cv = GridSearchCV(clf, param_dict)
     cv.fit(X_, y_)
 
@@ -318,15 +318,15 @@ def test_grid_search_one_grid_point():
 
 def test_grid_search_bad_param_grid():
     param_dict = {"C": 1.0}
-    clf = SVC()
+    clf = SVC(gamma='scale')
     assert_raises(ValueError, GridSearchCV, clf, param_dict)
 
     param_dict = {"C": []}
-    clf = SVC()
+    clf = SVC(gamma='scale')
     assert_raises(ValueError, GridSearchCV, clf, param_dict)
 
     param_dict = {"C": np.ones(6).reshape(3, 2)}
-    clf = SVC()
+    clf = SVC(gamma='scale')
     assert_raises(ValueError, GridSearchCV, clf, param_dict)
 
 
@@ -395,7 +395,7 @@ def test_grid_search_precomputed_kernel():
     K_train = np.dot(X_[:180], X_[:180].T)
     y_train = y_[:180]
 
-    clf = SVC(kernel='precomputed')
+    clf = SVC(gamma='scale', kernel='precomputed')
     cv = GridSearchCV(clf, {'C': [0.1, 1.0]})
     cv.fit(K_train, y_train)
 
@@ -578,8 +578,9 @@ def test_randomized_search_grid_scores():
                   gamma=expon(scale=0.1))
     n_cv_iter = 3
     n_search_iter = 30
-    search = RandomizedSearchCV(SVC(), n_iter=n_search_iter, cv=n_cv_iter,
-                                param_distributions=params, iid=False)
+    search = RandomizedSearchCV(SVC(gamma="scale"), n_iter=n_search_iter,
+                                cv=n_cv_iter, param_distributions=params,
+                                iid=False)
     search.fit(X, y)
     assert_equal(len(search.grid_scores_), n_search_iter)
 
@@ -688,7 +689,7 @@ def test_predict_proba_disabled():
     # Test predict_proba when disabled on estimator.
     X = np.arange(20).reshape(5, -1)
     y = [0, 0, 1, 1, 1]
-    clf = SVC(probability=False)
+    clf = SVC(gamma='scale', probability=False)
     gs = GridSearchCV(clf, {}, cv=2).fit(X, y)
     assert_false(hasattr(gs, "predict_proba"))
 
diff --git a/sklearn/tests/test_multiclass.py b/sklearn/tests/test_multiclass.py
index 45222a1c12a68..80b1a945850a7 100644
--- a/sklearn/tests/test_multiclass.py
+++ b/sklearn/tests/test_multiclass.py
@@ -179,7 +179,8 @@ def test_ovr_fit_predict_sparse():
         assert_array_equal(pred, Y_pred_sprs.toarray())
 
         # Test decision_function
-        clf_sprs = OneVsRestClassifier(svm.SVC()).fit(X_train, sparse(Y_train))
+        clf = svm.SVC(gamma="scale")
+        clf_sprs = OneVsRestClassifier(clf).fit(X_train, sparse(Y_train))
         dec_pred = (clf_sprs.decision_function(X_test) > 0).astype(int)
         assert_array_equal(dec_pred, clf_sprs.predict(X_test).toarray())
 
@@ -274,7 +275,7 @@ def conduct_test(base_clf, test_predict_proba=False):
                      Ridge(), ElasticNet()):
         conduct_test(base_clf)
 
-    for base_clf in (MultinomialNB(), SVC(probability=True),
+    for base_clf in (MultinomialNB(), SVC(gamma='scale', probability=True),
                      LogisticRegression()):
         conduct_test(base_clf, test_predict_proba=True)
 
@@ -298,7 +299,7 @@ def test_ovr_multilabel():
 
 
 def test_ovr_fit_predict_svc():
-    ovr = OneVsRestClassifier(svm.SVC())
+    ovr = OneVsRestClassifier(svm.SVC(gamma="scale"))
     ovr.fit(iris.data, iris.target)
     assert_equal(len(ovr.estimators_), 3)
     assert_greater(ovr.score(iris.data, iris.target), .9)
@@ -343,18 +344,20 @@ def test_ovr_multilabel_predict_proba():
         clf = OneVsRestClassifier(base_clf).fit(X_train, Y_train)
 
         # Decision function only estimator.
-        decision_only = OneVsRestClassifier(svm.SVR()).fit(X_train, Y_train)
+        decision_only = OneVsRestClassifier(svm.SVR(gamma='scale')
+                                            ).fit(X_train, Y_train)
         assert_false(hasattr(decision_only, 'predict_proba'))
 
         # Estimator with predict_proba disabled, depending on parameters.
-        decision_only = OneVsRestClassifier(svm.SVC(probability=False))
+        decision_only = OneVsRestClassifier(svm.SVC(gamma='scale',
+                                                    probability=False))
         assert_false(hasattr(decision_only, 'predict_proba'))
         decision_only.fit(X_train, Y_train)
         assert_false(hasattr(decision_only, 'predict_proba'))
         assert_true(hasattr(decision_only, 'decision_function'))
 
         # Estimator which can get predict_proba enabled after fitting
-        gs = GridSearchCV(svm.SVC(probability=False),
+        gs = GridSearchCV(svm.SVC(gamma='scale', probability=False),
                           param_grid={'probability': [True]})
         proba_after_fit = OneVsRestClassifier(gs)
         assert_false(hasattr(proba_after_fit, 'predict_proba'))
@@ -378,7 +381,8 @@ def test_ovr_single_label_predict_proba():
     clf = OneVsRestClassifier(base_clf).fit(X_train, Y_train)
 
     # Decision function only estimator.
-    decision_only = OneVsRestClassifier(svm.SVR()).fit(X_train, Y_train)
+    decision_only = OneVsRestClassifier(svm.SVR(gamma='scale')
+                                        ).fit(X_train, Y_train)
     assert_false(hasattr(decision_only, 'predict_proba'))
 
     Y_pred = clf.predict(X_test)
@@ -401,7 +405,7 @@ def test_ovr_multilabel_decision_function():
                                                    random_state=0)
     X_train, Y_train = X[:80], Y[:80]
     X_test = X[80:]
-    clf = OneVsRestClassifier(svm.SVC()).fit(X_train, Y_train)
+    clf = OneVsRestClassifier(svm.SVC(gamma="scale")).fit(X_train, Y_train)
     assert_array_equal((clf.decision_function(X_test) > 0).astype(int),
                        clf.predict(X_test))
 
@@ -412,7 +416,7 @@ def test_ovr_single_label_decision_function():
                                         random_state=0)
     X_train, Y_train = X[:80], Y[:80]
     X_test = X[80:]
-    clf = OneVsRestClassifier(svm.SVC()).fit(X_train, Y_train)
+    clf = OneVsRestClassifier(svm.SVC(gamma="scale")).fit(X_train, Y_train)
     assert_array_equal(clf.decision_function(X_test).ravel() > 0,
                        clf.predict(X_test))
 
@@ -439,7 +443,8 @@ def test_ovr_pipeline():
 
 
 def test_ovr_coef_():
-    for base_classifier in [SVC(kernel='linear', random_state=0),
+    for base_classifier in [SVC(gamma='scale', kernel='linear',
+                                random_state=0),
                             LinearSVC(random_state=0)]:
         # SVC has sparse coef with sparse input data
 
@@ -710,7 +715,7 @@ def test_ecoc_float_y():
 
 
 def test_pairwise_indices():
-    clf_precomputed = svm.SVC(kernel='precomputed')
+    clf_precomputed = svm.SVC(gamma='scale', kernel='precomputed')
     X, y = iris.data, iris.target
 
     ovr_false = OneVsOneClassifier(clf_precomputed)
@@ -727,7 +732,7 @@ def test_pairwise_indices():
 
 def test_pairwise_attribute():
     clf_precomputed = svm.SVC(kernel='precomputed')
-    clf_notprecomputed = svm.SVC()
+    clf_notprecomputed = svm.SVC(gamma="scale")
 
     for MultiClassClassifier in [OneVsRestClassifier, OneVsOneClassifier]:
         ovr_false = MultiClassClassifier(clf_notprecomputed)
@@ -738,8 +743,8 @@ def test_pairwise_attribute():
 
 
 def test_pairwise_cross_val_score():
-    clf_precomputed = svm.SVC(kernel='precomputed')
-    clf_notprecomputed = svm.SVC(kernel='linear')
+    clf_precomputed = svm.SVC(gamma='scale', kernel='precomputed')
+    clf_notprecomputed = svm.SVC(gamma='scale', kernel='linear')
 
     X, y = iris.data, iris.target
 
diff --git a/sklearn/tests/test_pipeline.py b/sklearn/tests/test_pipeline.py
index ab2108ed690f2..ea97b731a65b5 100644
--- a/sklearn/tests/test_pipeline.py
+++ b/sklearn/tests/test_pipeline.py
@@ -168,7 +168,7 @@ def test_pipeline_init():
     repr(pipe)
 
     # Test with two objects
-    clf = SVC()
+    clf = SVC(gamma="scale")
     filter1 = SelectKBest(f_classif)
     pipe = Pipeline([('anova', filter1), ('svc', clf)])
 
@@ -307,7 +307,7 @@ def test_pipeline_methods_pca_svm():
     X = iris.data
     y = iris.target
     # Test with PCA + SVC
-    clf = SVC(probability=True, random_state=0)
+    clf = SVC(gamma='scale', probability=True, random_state=0)
     pca = PCA(svd_solver='full', n_components='mle', whiten=True)
     pipe = Pipeline([('pca', pca), ('svc', clf)])
     pipe.fit(X, y)
@@ -326,7 +326,8 @@ def test_pipeline_methods_preprocessing_svm():
     n_classes = len(np.unique(y))
     scaler = StandardScaler()
     pca = PCA(n_components=2, svd_solver='randomized', whiten=True)
-    clf = SVC(probability=True, random_state=0, decision_function_shape='ovr')
+    clf = SVC(gamma='scale', probability=True, random_state=0,
+              decision_function_shape='ovr')
 
     for preprocessing in [scaler, pca]:
         pipe = Pipeline([('preprocess', preprocessing), ('svc', clf)])
@@ -882,8 +883,8 @@ def test_pipeline_wrong_memory():
     y = iris.target
     # Define memory as an integer
     memory = 1
-    cached_pipe = Pipeline([('transf', DummyTransf()), ('svc', SVC())],
-                           memory=memory)
+    cached_pipe = Pipeline([('transf', DummyTransf()),
+                            ('svc', SVC(gamma="scale"))], memory=memory)
     assert_raises_regex(ValueError, "'memory' should be None, a string or"
                         " have the same interface as "
                         "sklearn.externals.joblib.Memory."
@@ -921,7 +922,7 @@ def test_pipeline_memory():
     try:
         memory = Memory(cachedir=cachedir, verbose=10)
         # Test with Transformer + SVC
-        clf = SVC(probability=True, random_state=0)
+        clf = SVC(gamma='scale', probability=True, random_state=0)
         transf = DummyTransf()
         pipe = Pipeline([('transf', clone(transf)), ('svc', clf)])
         cached_pipe = Pipeline([('transf', transf), ('svc', clf)],
@@ -955,7 +956,7 @@ def test_pipeline_memory():
         assert_equal(ts, cached_pipe.named_steps['transf'].timestamp_)
         # Create a new pipeline with cloned estimators
         # Check that even changing the name step does not affect the cache hit
-        clf_2 = SVC(probability=True, random_state=0)
+        clf_2 = SVC(gamma='scale', probability=True, random_state=0)
         transf_2 = DummyTransf()
         cached_pipe_2 = Pipeline([('transf_2', transf_2), ('svc', clf_2)],
                                  memory=memory)
@@ -978,9 +979,9 @@ def test_pipeline_memory():
 def test_make_pipeline_memory():
     cachedir = mkdtemp()
     memory = Memory(cachedir=cachedir)
-    pipeline = make_pipeline(DummyTransf(), SVC(), memory=memory)
+    pipeline = make_pipeline(DummyTransf(), SVC(gamma='scale'), memory=memory)
     assert_true(pipeline.memory is memory)
-    pipeline = make_pipeline(DummyTransf(), SVC())
+    pipeline = make_pipeline(DummyTransf(), SVC(gamma='scale'))
     assert_true(pipeline.memory is None)
 
     shutil.rmtree(cachedir)
diff --git a/sklearn/utils/tests/test_multiclass.py b/sklearn/utils/tests/test_multiclass.py
index 8dbe2ff615563..455fd7f5ba630 100644
--- a/sklearn/utils/tests/test_multiclass.py
+++ b/sklearn/utils/tests/test_multiclass.py
@@ -362,7 +362,7 @@ def test_class_distribution():
 
 
 def test_safe_split_with_precomputed_kernel():
-    clf = SVC()
+    clf = SVC(gamma="scale")
     clfp = SVC(kernel="precomputed")
 
     iris = datasets.load_iris()
diff --git a/sklearn/utils/tests/test_validation.py b/sklearn/utils/tests/test_validation.py
index 9e02c4c5610ab..14da7c45e37d8 100644
--- a/sklearn/utils/tests/test_validation.py
+++ b/sklearn/utils/tests/test_validation.py
@@ -523,7 +523,7 @@ def test_check_is_fitted():
     assert_raises(TypeError, check_is_fitted, "SVR", "support_")
 
     ard = ARDRegression()
-    svr = SVR()
+    svr = SVR(gamma='scale')
 
     try:
         assert_raises(NotFittedError, check_is_fitted, ard, "coef_")
diff --git a/sklearn/utils/validation.py b/sklearn/utils/validation.py
index b3538a7925892..9c00001b5ce17 100644
--- a/sklearn/utils/validation.py
+++ b/sklearn/utils/validation.py
@@ -688,7 +688,7 @@ def has_fit_parameter(estimator, parameter):
     Examples
     --------
     >>> from sklearn.svm import SVC
-    >>> has_fit_parameter(SVC(), "sample_weight")
+    >>> has_fit_parameter(SVC(gamma='scale'), "sample_weight")
     True
 
     """


Code review comments:
diff_hunk: @@ -975,3 +980,22 @@ def test_ovr_decision_function():
     # Test if the first point has lower decision value on every quadrant
     # compared to the second point
     assert_true(np.all(pred_class_deci_val[:, 0] < pred_class_deci_val[:, 1]))
+
+
+def test_gamma_auto():
+    X, y = [[0.0], [1.0]], [0, 1]
+
+    msg = ("The default gamma parameter value 'auto', calculated as "
path: sklearn/svm/tests/test_svm.py
text: @user1:
I think this would be clearer as "The default value of gamma will change from 'auto' to 'scale' in version X to account better for unscaled features". The user can read the docs.

@author:
Done.

@user1:
Actually it might be good to add "Set gamma explicitly to 'auto' or 'scale' to avoid this warning."

diff_hunk: @@ -814,6 +814,12 @@ def test_grid_search_cv_results():
     n_grid_points = 6
     params = [dict(kernel=['rbf', ], C=[1, 10], gamma=[0.1, 1]),
               dict(kernel=['poly', ], degree=[1, 2])]
+    grid_search = GridSearchCV(SVC(gamma="scale"), cv=n_splits, iid=False,
+                               param_grid=params)
+    grid_search.fit(X, y)
+    grid_search_iid = GridSearchCV(SVC(gamma="scale"), cv=n_splits, iid=True,
path: sklearn/model_selection/tests/test_search.py
text: @user1:
You don't need gamma='scale' here and below where gamma is being searched over: the SVC will never be fit with gamma='auto_deprecated'
  

@author:
I don't understand as to why this changes isn't needed. If we don't use `gamma='scale'` here explicitly, then this will raise a warning, which isn't desired considering https://github.com/scikit-learn/scikit-learn/pull/10331#issuecomment-353168653.