You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To find out what all possible names you can have a look at src/shogun/base/class_list.cpp, after compiling shogun.
The issue with this approach is that it is easy to mistype a name, e.g. "Gaussiankernel", and after several hours of writing code these errors might happen more frequently and not so obvious to debug.
Right now you would get a message like this:
Catch these errors with SWIG, for example in src/interfaces/shogun.i and try to find out what the user actually meant. This should be written in C++, which would make it accessible to all languages.
Some pointers
A good approach would be to calculate the distance between the string the user passed and all the classes in shogun
EDIT: Or, since string distances are actually kinda useful, this can be added to shogun itself in the same way as CHammingWordDistance. Then shogun would use itself for generating error messages 😎
Intro
Instead of using directly the classes from C++, we use factories (see here). So for example in Python, instead of
we have
To find out what all possible names you can have a look at
src/shogun/base/class_list.cpp
, after compiling shogun.The issue with this approach is that it is easy to mistype a name, e.g.
"Gaussiankernel"
, and after several hours of writing code these errors might happen more frequently and not so obvious to debug.Right now you would get a message like this:
The task
Catch these errors with SWIG, for example in src/interfaces/shogun.i and try to find out what the user actually meant. This should be written in C++, which would make it accessible to all languages.
Some pointers
The text was updated successfully, but these errors were encountered: