Error with SklearnknnClassifier 'metric has to be between 'rbf', 'poly', 'sigmoid' or 'linear''
See original GitHub issueI believe there is a wrong error check in the file SklearnknnClassifier.java
if ( !metric.equals("rbf") && !metric.equals("poly")&& !metric.equals("sigmoid") && !metric.equals("linear") ){
throw new IllegalStateException(" metric has to be between 'rbf', 'poly', 'sigmoid' or 'linear'" );
}
if ( !metric.equals("uniform") && !metric.equals("distance") ){
throw new IllegalStateException(" metric has to be between 'uniform' or 'distance'" );
}
I think the first metric.equals check block is incorrect and you only want the second one. I couldn’t get the SklearnknnClassifier to work.
Also, in the docs the parameters section for KerasnnClassifier section has the wrong header (it has the header ‘SklearnsvmClassifier’). There are also some typos like dropout being labeled ‘droupout’ and ‘Toral’ instead of ‘Total.’
Thanks for creating and sharing the StackNet tool.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The difference of kernels in SVM? - Cross Validated
Polynomial ; Gaussian (RBF); Sigmoid. Because as we know that kernel is used to mapped our input space into high dimensionality feature space....
Read more >When can I use Linear SVM instead of RBF, polynomial, or a ...
As others have answer, you use a linear kernel whenever the problem is linear, i.e. linearly separable classes in classification or a linear...
Read more >How to Select Support Vector Machine Kernels - KDnuggets
Linear SVM is a parametric model, an RBF kernel SVM isn't, and the complexity of the latter grows with the size of the...
Read more >Bad results for LabelPropagation (and LabelSpreading) when ...
I expected kernels such as: sigmoid, polynomial, poly, linear, cosine (tested with various parameters) to perform reasonably good, but all of ...
Read more >Kernels and support vector machine regularization | Kaggle
A kernel is a specialized kind of similarity function. It takes two points as input, and returns their similarity as output, just as...
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 Free
Top 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
All correct .
I will fix in next release.
This should now be fixed. Feel free to re-open if there are still issues with it.