Modify src/shogun/classifier/ to implement CSignal in outer loops #3590

Merged
merged 1 commit into from Jan 10, 2017

Projects

None yet

2 participants

@abhinavrai44
Contributor

Issue #3508

@abhinavrai44 abhinavrai44 Modify src/shogun/classifier/ to implement CSignal in outer loops
df26b1e
//loop till we either get everything classified right or reach max_iter
- while (!converged && iter<max_iter)
+ while (!(CSignal::cancel_computations()) && (!converged && iter<max_iter))
{
@karlnapf
karlnapf Jan 10, 2017 Member

I think we could also add an SG_INFO message for the iteration here if you want.....but seperate PR

@abhinavrai44
abhinavrai44 Jan 11, 2017 Contributor

Yeah sure, but what should the message contain ? Which variables need to be highlighted..

@karlnapf
karlnapf Jan 11, 2017 Member

Maybe just the iteration number.
If there is some residual that is checked to set the converged flag, you can also print that

@karlnapf
Member

Looks good, thanks for that. Ill merge as travis is fine
Did you try it from say python?

@karlnapf karlnapf merged commit 8d49986 into shogun-toolbox:develop Jan 10, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
default DEV build done.
Details
@abhinavrai44
Contributor

I tried the available python examples and they worked fine. One more thing some of the examples in examples/undocumented/libshogun seem to be outdated. For ex. classifier_newtontest.cpp has the include statement #include <shogun/features/Labels.h> but now Labels.h is the labels folder and also the functions associated with labels seem to have changed.

@abhinavrai44
Contributor

Also, the buildbot is giving error reports after this commit. Have I done something wrong ?

@karlnapf
Member

Yes, these examples are partly outdated, there is a blacklist in the CMakeList.txt that shows the examples that are not part of the test.

BTW feel free to port any of these examples to the new meta example systen, c.f. #3555

@karlnapf
Member

I dont think the buildbot error is your fault, but thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment