Ensure check_estimators works with SVC(kernel='precomputed')
See original GitHub issueRelated to #9443.
We need to ensure that check_estimator works with estimators that have the _pairwise
attribute set. The easiest way to do that would be to have it run on SVC(kernel='precomputed')
. That needs to work.
This should probably live in test_estimator_checks.py
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
scikit-learn SVC with custom precomputed kernel matrix uses ...
svm.SVC learner. My custom kernel consists in multiplying every element of the kernel matrix except the main diagonal by a fixed constant (the...
Read more >sklearn.svm.SVC — scikit-learn 1.2.0 documentation
Specifies the kernel type to be used in the algorithm. If none is given, 'rbf' will be used. If a callable is given...
Read more >scikit-learn/test_svm.py at main - GitHub
test a precomputed kernel with the iris dataset. # and check parameters against a linear SVC. clf = svm.SVC(kernel="precomputed"). clf2 = svm.
Read more >Speeding up linear SVM with precomputed kernel - Peeta Li
Sklearn svm.SVC(kernel = "linear") is really slow. This posts shows a trick for speeding up this process by precomputing the gram matrix of ......
Read more >in self._compute_kernel(X) raise ValueError("X.shape[0 ...
You should check whats wrong with your original gauss_kernel that it ... SVC(kernel="precomputed", verbose=2, C=2.0, probability=True) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GKjohns, #9443 is about testing the estimators. This is about testing our framework for testing estimators.
@AishwaryaRK it’s still unresolved, but @GKjohns might want to fix it.
I don’t like the idea of contrasting pairwise with classifier/clustering/etc. I think altering the tests to provide a precomputed data matrix makes sense… but I’m not sure how to do so neatly. Could you have a go at doing that and submit a PR to see what it looks like in practice?