Skip to content

Broken example: examples/svm/plot_rbf_parameters.py #5408

@lesteve

Description

@lesteve
--------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/home/le243287/dev/scikit-learn/examples/svm/plot_rbf_parameters.py in <module>()
    117 scaler = StandardScaler()
    118 X = scaler.fit_transform(X)
--> 119 X_2d = scaler.fit_transform(X_2d)
    120 
    121 ##############################################################################

/home/le243287/dev/scikit-learn/sklearn/base.pyc in fit_transform(self, X, y, **fit_params)
    453         if y is None:
    454             # fit method of arity 1 (unsupervised transformation)
--> 455             return self.fit(X, **fit_params).transform(X)
    456         else:
    457             # fit method of arity 2 (supervised transformation)

/home/le243287/dev/scikit-learn/sklearn/preprocessing/data.pyc in fit(self, X, y)
    501         y: Passthrough for ``Pipeline`` compatibility.
    502         """
--> 503         return self.partial_fit(X, y)
    504 
    505     def partial_fit(self, X, y=None):

/home/le243287/dev/scikit-learn/sklearn/preprocessing/data.pyc in partial_fit(self, X, y)
    565             self.mean_, self.var_, self.n_samples_seen_ = \
    566                 _incremental_mean_and_var(X, self.mean_, self.var_,
--> 567                                           self.n_samples_seen_)
    568 
    569         if self.with_std:

/home/le243287/dev/scikit-learn/sklearn/utils/extmath.pyc in _incremental_mean_and_var(X, last_mean, last_variance, last_sample_count)
    730     updated_sample_count = last_sample_count + new_sample_count
    731 
--> 732     updated_mean = (last_sum + new_sum) / updated_sample_count
    733 
    734     if last_variance is None:

ValueError: operands could not be broadcast together with shapes (4,) (2,)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions