언어
English
Bengali
French
Hindi
Italian
Japanese
Korean
Malayalam
Russian
Spanish
Tamil
Turkish
Vietnamese



PegasosQSVC.fit

PegasosQSVC.fit(X, y, sample_weight=None)[소스]

Fit the model according to the given training data.

매개변수:
  • X (np.ndarray) – Train features. For a callable kernel (an instance of BaseKernel) the shape should be (n_samples, n_features), for a precomputed kernel the shape should be (n_samples, n_samples).

  • y (np.ndarray) – shape (n_samples), train labels . Must not contain more than two unique labels.

  • sample_weight (np.ndarray | None) – this parameter is not supported, passing a value raises an error.

반환 형식:

PegasosQSVC

반환:

self, Fitted estimator.

예외 발생:
  • ValueError

    • X and/or y have the wrong shape. - X and y have incompatible dimensions. - y includes more than two unique labels. - Pre-computed kernel matrix has the wrong shape and/or dimension.

  • NotImplementedError

    • when a sample_weight which is not None is passed.