--- Log opened Tue Aug 30 00:00:27 2016 | ||
CaBa | i'm having some difficulties running evaluations... | 01:05 |
---|---|---|
CaBa | https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/evaluation/ROCEvaluation.cpp#L79 | 01:05 |
CaBa | this check in ROCEvaluation.cpp:79 fails for me in some cases, rather randomly | 01:05 |
CaBa | it uses CLabel::get_value() to collect the binary labels | 01:06 |
CaBa | however, this junk for me | 01:06 |
CaBa | as in this mwe: https://gitlab.unique-internet.de/snippets/5 | 01:06 |
CaBa | can somebody give me a hint here? | 01:06 |
CaBa | (the values are mostly positive in most my test cases, seems random memory though...) | 01:09 |
shogun-buildbot | build #63 of memleak - valgrind is complete: Failure [failed memory check] Build details are at http://buildbot.shogun-toolbox.org/builders/memleak%20-%20valgrind/builds/63 blamelist: Viktor Gal <vigsterkr@gmail.com> | 05:52 |
shogun-buildbot | build #1061 of nightly_none is complete: Failure [failed compile] Build details are at http://buildbot.shogun-toolbox.org/builders/nightly_none/builds/1061 blamelist: Viktor Gal <vigsterkr@gmail.com> | 06:00 |
shogun-buildbot | build #1190 of nightly_default is complete: Failure [failed test notebooks] Build details are at http://buildbot.shogun-toolbox.org/builders/nightly_default/builds/1190 blamelist: Viktor Gal <vigsterkr@gmail.com> | 06:39 |
-!- sanuj [~sanuj@59.97.245.250] has joined #shogun | 07:19 | |
sanuj | i just passed gsoc final evaluation \o/ | 07:20 |
sanuj | lisitsyn, there? | 07:27 |
sanuj | lisitsyn, i have a question related to plugins | 09:48 |
lisitsyn | partially | 09:56 |
sanuj | we do: MetaClass<base_class> clazz = manifest.class_by_name<base_class>("class"); | 09:57 |
sanuj | when loading plugins | 09:57 |
sanuj | what if there is a method in "class" which is not present in "base_class" | 09:57 |
sanuj | say: method() | 09:57 |
sanuj | Some<base_class> clazz_obj = clazz.instance(); | 09:58 |
sanuj | clazz_obj->method() | 09:58 |
sanuj | will give error | 09:58 |
sanuj | but why are we treating it as an object of "base_class"? | 09:58 |
sanuj | lisitsyn, ^ | 09:59 |
lisitsyn | obviously you can't call what is absent in base_class | 09:59 |
lisitsyn | :) | 09:59 |
sanuj | lisitsyn, so everything should be present in base class? | 10:00 |
sanuj | i was pluginizing MCLDA | 10:00 |
sanuj | got this error | 10:00 |
lisitsyn | well then it chould be Some<Classifier> | 10:00 |
sanuj | it was Some<CNativeMulticlassMachine> | 10:01 |
sanuj | i changed it to | 10:01 |
sanuj | Some<CMCLDA> | 10:01 |
sanuj | and everything worked as expected | 10:01 |
sanuj | so do we need to do this base class complication? | 10:01 |
lisitsyn | ehmm | 10:01 |
lisitsyn | well you've got to have all the methods | 10:02 |
lisitsyn | in the class you're referring through | 10:02 |
sanuj | lisitsyn, but it will create many constraints for someone writing a plugin for shogun | 10:02 |
lisitsyn | yeah somehow | 10:03 |
sanuj | so the problem here is | 10:03 |
sanuj | CMCLDA has set_features() | 10:03 |
sanuj | and CNativeMulticlassMachine doesn't | 10:04 |
sanuj | and if someone makes objects by the plugin way, no parameters can be passed in the constructor as well, for now. | 10:04 |
lisitsyn | yes that's all clear | 10:06 |
lisitsyn | we'd have to limit something to be generic | 10:06 |
sanuj | okay | 10:06 |
sanuj | lisitsyn, so i'll move set_features to CNativeMulticlassMachine | 10:07 |
lisitsyn | I think set_features is present in some of its base classes | 10:07 |
sanuj | yeah, let me see | 10:07 |
sanuj | lisitsyn, i have created a dir "plugins" in shogun's root | 10:08 |
sanuj | the inheritance is like this | 10:11 |
sanuj | CMCLDA > CNativeMulticlassMachine > CMulticlassMachine > CBaseMulticlassMachine > CMachine > CSGObject | 10:12 |
-!- sanuj [~sanuj@59.97.245.250] has quit [Ping timeout: 252 seconds] | 10:16 | |
-!- sanuj [~sanuj@117.203.14.172] has joined #shogun | 10:29 | |
@wiking | CaBa: hey | 11:13 |
@wiking | CaBa: ping me when you are around | 11:14 |
CaBa | wiking: ping | 11:26 |
@wiking | ok can you repeat the problem you are facing? | 11:26 |
CaBa | wiking: often in roc eval this [1] check fails for me | 11:27 |
CaBa | [1] https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/evaluation/ROCEvaluation.cpp#L88 | 11:27 |
@wiking | you dont have negatives? | 11:27 |
CaBa | i have almost balanced classes and use stratified x-val with 10 folds | 11:28 |
CaBa | i don't believe that | 11:28 |
CaBa | and i don't understand how this check can work with get_value() | 11:28 |
CaBa | because when i get_value() on my labels, i don't see my labels and also the sign of what i get doesn't represent my labels | 11:28 |
@wiking | eh | 11:29 |
@wiking | then something is wrong there ) | 11:29 |
CaBa | is CBinaryLabel::get_value() [inherited from CLabel] supposed to get me the same as CBinaryLabel::get_label() [not defined in CLabel]? | 11:30 |
@wiking | noup | 11:31 |
@wiking | they are different | 11:31 |
CaBa | wiking: what's get_value() for? | 11:33 |
@wiking | yeah this is a common misconception | 11:34 |
CaBa | wiking: somewhere in the docs i came across the term "confidence"? | 11:36 |
@wiking | yep it's the confidence value (get_value) | 11:37 |
CaBa | wiking: as in "how sure" you are about a label? | 11:38 |
@wiking | y | 11:38 |
CaBa | wiking: why does ROCEvaluation check that in order to determine the number of pos / neg labels then? | 11:39 |
@wiking | but this is being used afaik for regression label as well | 11:40 |
@wiking | see | 11:41 |
@wiking | undocumented/libshogun/labels_binary_fit_sigmoid.cpp | 11:41 |
@wiking | undocumented/libshogun/classifier_libsvm_probabilities.cpp | 11:41 |
@wiking | rather the latter one | 11:42 |
CaBa | wiking: ok. confidence. but why is get_value() used in the evaluation classes? | 11:44 |
-!- sanuj [~sanuj@117.203.14.172] has quit [Ping timeout: 255 seconds] | 11:45 | |
CaBa | wiking: maybe i shouldn't be trying to understand shogun, i'm sure the bug is somewhere on my side, i mean all the label and eval code wasn't touched in years, i probably works :P | 11:59 |
CaBa | wiking: i'm just curious to understand how all this is meant to work | 12:00 |
@wiking | sorry man i've got down with some tasks i have to finish | 12:31 |
@wiking | will try to get back to you asap | 12:31 |
@wiking | :) | 12:31 |
@wiking | these are super valid questions | 12:31 |
@wiking | that i should all add to FAQ | 12:31 |
@wiking | :)))) | 12:32 |
CaBa | hehe | 12:32 |
CaBa | ok, cool, let me know when you have time | 12:32 |
@wiking | btw lisitsyn Saurabh7 CaBa and all the others here | 12:32 |
@wiking | i guess the best for the FAQ would be on the wiki page of the project | 12:32 |
@wiking | not like now at the doxygen page | 12:33 |
@wiking | or? | 12:33 |
CaBa | you mean github wiki? | 12:33 |
@wiking | http://www.shogun-toolbox.org/doc/en/latest/faq.html | 12:33 |
@wiking | yep | 12:33 |
CaBa | i'd opt for github, yes | 12:34 |
CaBa | wiking: interesting. CContingencyTableEvaluation casts the labels to CBinaryLabels and uses get_label() - ROCEvaluation asserts LT_BINARY but doesn't cast and doesn't use get_label() | 12:51 |
@wiking | CaBa, ok i've started this http://github.com/shogun-toolbox/shogun/wiki/FAQ | 13:13 |
Saurabh7 | CaBa: uhm , if theres an assert for binary, get_labels() should be used i guess :) | 13:27 |
Saurabh7 | ah the other one was changed to get_label here https://github.com/shogun-toolbox/shogun/commit/3ed97f5610477da1da39103f86e0a767d0628b13 | 13:28 |
CaBa | Saurabh7: hm. unfortunately with no reason in the commit message | 13:43 |
CaBa | Saurabh7: get_confidence() is the predecessor of get_value()? | 13:44 |
Saurabh7 | yep should be | 13:44 |
CaBa | Saurabh7: so what do you think about roceval? is that a bug? | 13:44 |
Saurabh7 | yeah, looks like it, couldbe easily verified with a test case | 13:47 |
CaBa | Saurabh7: well existing testcases don't seem to capture that? | 14:03 |
-!- sanuj [~sanuj@59.97.247.24] has joined #shogun | 15:19 | |
-!- sanuj [~sanuj@59.97.247.24] has quit [Ping timeout: 265 seconds] | 15:41 | |
-!- sanuj [~sanuj@117.220.48.180] has joined #shogun | 15:53 | |
CaBa | OK, i added the cast to CBinaryLabel and used get_label() instead of get_value() | 16:00 |
CaBa | https://github.com/shogun-toolbox/shogun/compare/develop...lkuchenb:fix/rocEvalBinaryLabels | 16:00 |
CaBa | Now I also get results that look more normal | 16:00 |
CaBa | wiking / Saurabh7 maybe somebody could take a look at this | 16:01 |
-!- sanuj [~sanuj@117.220.48.180] has quit [Ping timeout: 265 seconds] | 16:07 | |
CaBa | btw | 16:40 |
CaBa | ==3446== Conditional jump or move depends on uninitialised value(s) | 16:40 |
CaBa | ==3446== at 0x73575CE: shogun::CROCEvaluation::evaluate_roc(shogun::CLabels*, shogun::CLabels*) (ROCEvaluation.cpp:79) | 16:40 |
CaBa | ==3446== by 0x73570BC: shogun::CROCEvaluation::evaluate(shogun::CLabels*, shogun::CLabels*) (ROCEvaluation.cpp:22) | 16:41 |
CaBa | valgrind also reported access to uninitialized values before the patch | 16:41 |
@wiking | CaBa, why did you move it into evaluate_roc_binary | 16:56 |
@wiking | ? | 16:56 |
@wiking | i mean why just not patch the original function? :) | 16:56 |
-!- sanuj [~sanuj@117.220.48.180] has joined #shogun | 17:05 | |
CaBa | wiking: was just a quick way to integrate the cast without renaming any variables | 17:08 |
@wiking | :) | 17:08 |
CaBa | wiking: any clue whether this is the right way to go? | 17:12 |
@wiking | mmm you could have done an explicit cast | 17:13 |
@wiking | as | 17:13 |
@wiking | (or static_cast) | 17:13 |
@wiking | as | 17:13 |
@wiking | ASSERT(predicted->get_label_type()==LT_BINARY) | 17:14 |
@wiking | so it's for sure a BinaryLabels class | 17:14 |
CaBa | wiking: hm? the assert is still there | 17:15 |
CaBa | wiking: https://github.com/shogun-toolbox/shogun/compare/develop...lkuchenb:fix/rocEvalBinaryLabels#diff-2c552fe2477b2349ad25afef8024b7f1R127 | 17:15 |
CaBa | wiking: the assert was there also before. it was just never casted. | 17:15 |
@wiking | that's wha ti mean | 17:16 |
@wiking | since you had that assert | 17:16 |
@wiking | you could have just done | 17:16 |
@wiking | (BinaryLabels*) | 17:16 |
CaBa | wiking: that's what happens right now. first ASSERT, then the cast. i'm lost ;) | 17:17 |
@wiking | mmm | 17:17 |
@wiking | ok so i literally | 17:18 |
@wiking | do not understand why | 17:18 |
@wiking | evaluate_roc_binary | 17:18 |
CaBa | wiking: i just oriented myself at the other (working) evaluation: | 17:19 |
CaBa | https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/evaluation/ContingencyTableEvaluation.cpp#L26 | 17:19 |
CaBa | wiking: there is also a helper function call for the more specific label type | 17:19 |
CaBa | compute_scores() | 17:19 |
CaBa | so i kinda took that approach to ROCEvaluation. but i don't mind one function / two functions. i was more wondering if you think this really was the issue here (CLabel::get_value() vs. CBinarlyLabel::get_label()), because i find it hard to believe that ROC evaluation didn't work for years... | 17:21 |
@wiking | hehhhaheheh | 17:21 |
@wiking | you would be surprised | 17:21 |
@wiking | aobut many things | 17:21 |
CaBa | 😱 | 17:21 |
@wiking | :> | 17:37 |
@wiking | ctcp | 17:37 |
lisitsyn | BAZD | 17:37 |
@wiking | yes bazdmeg | 17:37 |
@wiking | :) | 17:37 |
CaBa | wiking: you prefer this in one function? is there a way to confim that this is actually correct? | 17:42 |
@wiking | CaBa, currently looking into the code :) | 17:42 |
@wiking | trying to figure out wtf | 17:42 |
@wiking | :) | 17:42 |
CaBa | wiking: ah. thanks. | 17:42 |
@wiking | CaBa, what's the model you are using actually? | 18:18 |
CaBa | wiking: hm? | 18:59 |
@wiking | well i guess you are doing this with a given model | 18:59 |
CaBa | wiking: RealFeatures + GaussianKernel + LibSVM | 19:00 |
@wiking | k | 19:00 |
@wiking | CaBa, will u send a pr? :) | 19:07 |
CaBa | wiking: sure. figured anything out? | 19:10 |
CaBa | wiking: i'll clean that up first | 19:19 |
CaBa | sanuj: ping | 19:30 |
CaBa | what's the deal with MultitaskROCEvaluation? | 19:31 |
CaBa | wiking: you got a PR. i made a new fix, now i understand your confusion - i hadn't seen that evaluate() was already a wrapper for evaluate_roc() ;-) i was acting under the assumption that evaluate_roc() was the public interface. | 19:44 |
CaBa | wiking: i also changed MultitaskROCEvaluation.cpp which failed to build after the fix. | 19:45 |
CaBa | (doesn't fail to build now) | 19:45 |
-!- sanuj [~sanuj@117.220.48.180] has quit [Remote host closed the connection] | 22:01 | |
CaBa | Saurabh7: *ping* | 23:42 |
-!- OXPHOS [92bd15c7@gateway/web/freenode/ip.146.189.21.199] has joined #shogun | 23:44 | |
CaBa | hi OXPHOS | 23:57 |
--- Log closed Wed Aug 31 00:00:28 2016 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!