PegasosQSVC.fit¶
- PegasosQSVC.fit(X, y, sample_weight=None)[source]¶
Fit the model according to the given training data.
- Tham số
X (
ndarray
) -- Train features. For a callable kernel (an instance ofQuantumKernel
) the shape should be(n_samples, n_features)
, for a precomputed kernel the shape should be(n_samples, n_samples)
.y (
ndarray
) -- shape (n_samples), train labels . Must not contain more than two unique labels.sample_weight (
Optional
[ndarray
]) -- this parameter is not supported, passing a value raises an error.
- Kiểu trả về
- Trả về
self
, Fitted estimator.- Đưa ra
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.
when a sample_weight which is not None is passed.