question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with SklearnknnClassifier 'metric has to be between 'rbf', 'poly', 'sigmoid' or 'linear''

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kaz-Anovacommented, Sep 10, 2017

All correct .

I will fix in next release.

0reactions
kaz-Anovacommented, Nov 2, 2017

This should now be fixed. Feel free to re-open if there are still issues with it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found