--- Log opened Thu Sep 13 00:00:35 2018 | ||
-!- HeikoS [~heiko@host86-151-43-178.range86-151.btcentralplus.com] has quit [Ping timeout: 252 seconds] | 01:43 | |
-!- witness [uid10044@gateway/web/irccloud.com/x-bsfajwaqmamepfls] has joined #shogun | 06:07 | |
-!- witness [uid10044@gateway/web/irccloud.com/x-bsfajwaqmamepfls] has quit [Quit: Connection closed for inactivity] | 10:44 | |
@wiking | lisitsyn, around/ | 11:44 |
---|---|---|
@wiking | ? | 11:45 |
@wiking | ? | 11:45 |
lisitsyn | wiking: ya | 11:45 |
-!- HeikoS [~heiko@host86-151-43-178.range86-151.btcentralplus.com] has joined #shogun | 11:45 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 11:45 | |
@wiking | when we do put then why the input has to be of type is_sg_base | 11:45 |
@wiking | meaning | 11:45 |
@wiking | not derivative | 11:45 |
@wiking | ? | 11:45 |
@wiking | so if i wanna put HackerMachine that is derived from machine that should be auto casted? | 11:46 |
@wiking | or? | 11:46 |
@wiking | i mean i'mjust wodnering | 11:46 |
@wiking | maybe there's a specific reason why we dont want this | 11:46 |
lisitsyn | uhmm I am not sure what you mean | 11:46 |
@wiking | ok | 11:47 |
@wiking | template <class T, | 11:47 |
@wiking | class X = typename std::enable_if<is_sg_base<T>::value>::type, | 11:47 |
@wiking | class Z = void> | 11:47 |
@wiking | void put(const std::string& name, T* value) | 11:47 |
@wiking | { | 11:47 |
@wiking | put(Tag<T*>(name), value); | 11:47 |
@wiking | } | 11:47 |
@wiking | so in this case | 11:47 |
lisitsyn | but that's just a hack for pointers, no? | 11:47 |
@wiking | if X is not sg_base | 11:47 |
@wiking | then no matter if X is a derivative of any of the sg_base | 11:48 |
@wiking | afaik it'll fail | 11:48 |
lisitsyn | we just expect SGObject to be pointers | 11:48 |
@wiking | compile time of course | 11:48 |
@wiking | bool, std::is_same<CMachine, T>::value || | 11:48 |
@wiking | std::is_same<CKernel, T>::value || | 11:48 |
@wiking | ... | 11:48 |
@wiking | see what i mean? | 11:48 |
wuwei[m] | hey wiking, lisitsyn | 11:49 |
lisitsyn | uhmmm no | 11:49 |
lisitsyn | :) | 11:49 |
@wiking | lisitsyn, https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/base_types.h | 11:49 |
wuwei[m] | this is exactly the problem i had previously with pipeline | 11:49 |
@wiking | wuwei[m], hello hello! | 11:49 |
@wiking | lisitsyn, so we have these filters for the SGObject.put | 11:49 |
@wiking | as sfinae | 11:49 |
@wiking | now if i wanna do .put("machine", m) | 11:50 |
@wiking | but where typeof(m) = CLibLinear | 11:50 |
@wiking | this will fail compile time | 11:50 |
@wiking | right? | 11:50 |
@wiking | as "machine" would expect CMachine | 11:50 |
@wiking | but the enable_if checks for same_as<CMachine, T> | 11:50 |
@wiking | i.e. its either that class or nothing | 11:51 |
lisitsyn | wait | 11:51 |
lisitsyn | but they are not filters | 11:51 |
lisitsyn | IIRC it is just a way to treat SGOBjects as pointers, no? | 11:51 |
@wiking | i meant this https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/SGObject.h#L389 | 11:53 |
@wiking | but ok i see what u mean | 11:53 |
@wiking | so anyhow | 11:53 |
@wiking | the problem will be raised here | 11:53 |
lisitsyn | ahh | 11:53 |
lisitsyn | ok sorry I understand now | 11:53 |
@wiking | https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/SGObject.h#L361 | 11:53 |
lisitsyn | so you mean we can't get LibLinear back? | 11:54 |
@wiking | more like i cannot put | 11:54 |
lisitsyn | no, I think pointers are castable | 11:54 |
@wiking | because i dont care not getting back CLiblinear | 11:54 |
@wiking | but wanna be able to put that | 11:54 |
lisitsyn | I think this works, no? | 11:55 |
@wiking | 449: [ERROR] In file /home/wiking/shogun/src/shogun/base/SGObject.h line 369: Cannot put parameter CrossValidation::machine of type shogun::CMachine*, incompatible provided type shogun::CPipeline*. | 11:55 |
@wiking | 449: terminate called after throwing an instance of 'shogun::ShogunException' | 11:55 |
@wiking | 449: what(): [ERROR] In file /home/wiking/shogun/src/shogun/base/SGObject.h line 369: Cannot put parameter CrossValidation::machine of type shogun::CMachine*, incompatible provided type shogun::CPipeline*. | 11:55 |
@wiking | :) | 11:55 |
@wiking | this is on | 11:55 |
lisitsyn | oh ok | 11:55 |
lisitsyn | then is_sg_base should work for inherited classes | 11:55 |
@wiking | auto cross = wrap(machine_evaluation("CrossValidation")); | 11:55 |
lisitsyn | needs some patch I guess | 11:55 |
lisitsyn | I see | 11:55 |
@wiking | cross->put("machine", pipeline); | 11:55 |
@wiking | so then it's caboooom | 11:56 |
@wiking | although pipeline | 11:56 |
@wiking | is a CMachien | 11:56 |
lisitsyn | this worked because we used base classes in the examples | 11:56 |
@wiking | yes yes | 11:56 |
@wiking | i mean essential | 11:56 |
@wiking | ly | 11:56 |
lisitsyn | we need to patch is_sg_base then | 11:56 |
@wiking | you would want just to use base classes | 11:56 |
@wiking | but i mean | 11:56 |
lisitsyn | ah oh | 11:56 |
@wiking | i dont see a specific reason | 11:56 |
@wiking | why inherited classes couldn't go IN | 11:56 |
lisitsyn | but we don't want to generate a lot of put's | 11:56 |
@wiking | i mean you will of course only get back | 11:56 |
@wiking | the base classes | 11:57 |
lisitsyn | wiking: basically we should allow putting it in | 11:57 |
@wiking | yes yes | 11:57 |
lisitsyn | but we should cast it to the base class | 11:57 |
lisitsyn | before putting | 11:57 |
@wiking | exactly | 11:57 |
@wiking | that's what i thought as well | 11:57 |
@wiking | that that should be autohandled | 11:57 |
lisitsyn | it is a bit of trickery but should be possible to do | 11:57 |
lisitsyn | wiking: this needs is_sg_base support inheritance AND instead of Tag<T> it should be Tag<sg_parent<T>::value> | 11:58 |
@wiking | yes yep | 11:58 |
@wiking | gotcha | 11:58 |
@wiking | ok will work on this | 11:58 |
lisitsyn | cool | 11:58 |
@wiking | as wuwei[m] needs it | 11:58 |
@wiking | thnx | 11:58 |
@wiking | just wanted to run by somebody | 11:58 |
@wiking | before i make a huge mess as usual | 11:58 |
@wiking | :D | 11:58 |
@wiking | thnx heaps | 11:58 |
lisitsyn | wiking: we also need to allow to cast it back | 12:11 |
lisitsyn | that's a bit more interesting | 12:11 |
lisitsyn | wiking: sometimes I feel we're trying to implement yet another python | 12:12 |
lisitsyn | :D | 12:12 |
@wiking | lisitsyn, we need to be able to cast it back? | 12:15 |
@wiking | why? | 12:15 |
lisitsyn | wiking: I think that would be a nice feature to have | 12:16 |
@wiking | mmm hehe | 12:16 |
@wiking | yeah | 12:16 |
@wiking | :D | 12:16 |
lisitsyn | wiking: also, I think it would be nice to be able to get int as float (if you mistyped it) | 12:16 |
@wiking | yeah | 12:16 |
-!- rcurtin [~ryan@knife.lugatgt.org] has quit [Ping timeout: 244 seconds] | 14:34 | |
-!- rcurtin [~ryan@knife.lugatgt.org] has joined #shogun | 14:35 | |
-!- HeikoS [~heiko@host86-151-43-178.range86-151.btcentralplus.com] has quit [Ping timeout: 244 seconds] | 15:03 | |
@wiking | lisitsyn, https://github.com/zandaqo/iswasmfast/blob/master/lib/regression.cpp | 15:53 |
@wiking | just saying :) (let's compare this beauty with any of our lr :) | 15:54 |
lisitsyn | wiking: heh | 15:54 |
@wiking | crazy no? :) | 15:54 |
lisitsyn | wiking: well that's the simplest algorithm | 16:09 |
lisitsyn | ;) | 16:09 |
@wiking | :> | 16:10 |
lisitsyn | wiking: so you'll have jeff the great in your univ | 16:23 |
lisitsyn | :D | 16:23 |
@wiking | yes yes | 16:23 |
@wiking | :) | 16:23 |
@wiking | okey people | 16:26 |
@wiking | so | 16:27 |
@wiking | i have a question | 16:27 |
@wiking | lisitsyn, | 16:27 |
lisitsyn | ??? | 16:27 |
lisitsyn | oops | 16:27 |
@wiking | say we take BinaryLabels | 16:27 |
lisitsyn | yes? | 16:27 |
@wiking | or any other labels | 16:27 |
@wiking | if i do | 16:27 |
@wiking | x = SGVector(10) | 16:27 |
@wiking | and then do | 16:27 |
@wiking | labels = new BinaryLabels(x) | 16:27 |
@wiking | why do we copy content of x? | 16:27 |
@wiking | because we do | 16:27 |
@wiking | :( | 16:27 |
@wiking | i just tested this | 16:27 |
@wiking | all elements of x is 0 | 16:28 |
@wiking | then i just take it to be used in LibLinear | 16:28 |
@wiking | of course if i run like that | 16:28 |
@wiking | ll.train() | 16:28 |
@wiking | i get | 16:28 |
@wiking | [ERROR] In file /Users/wiking/shogun/src/shogun/labels/BinaryLabels.cpp line 83: Binary Labels must be -1 or +1! | 16:28 |
@wiking | which is correct | 16:28 |
@wiking | but then if set x's values to be 1 or -1 | 16:28 |
@wiking | and rerun ll.train | 16:28 |
@wiking | the same error appears | 16:28 |
@wiking | UNLESS i do a: labels = new BinaryLabels(x) | 16:29 |
@wiking | which for me means that the x is being copied | 16:29 |
@wiking | and i really dont understand why | 16:29 |
lisitsyn | ehh? :D | 16:30 |
@wiking | heheh check pm | 16:32 |
@wiking | for the fun part | 16:32 |
@wiking | :) | 16:32 |
@wiking | https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/labels/BinaryLabels.cpp#L26-L48 | 16:32 |
@wiking | lisitsyn, i mean this | 16:33 |
@wiking | :S | 16:33 |
lisitsyn | tbh I have no idea | 16:35 |
@wiking | hehe ok coo | 16:46 |
@wiking | l | 16:46 |
@wiking | me neither | 16:47 |
@wiking | :D | 16:47 |
-!- HeikoS [~heiko@eduroam-int-pat-8-100.ucl.ac.uk] has joined #shogun | 17:31 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 17:32 | |
-!- HeikoS [~heiko@eduroam-int-pat-8-100.ucl.ac.uk] has quit [Ping timeout: 240 seconds] | 18:11 | |
-!- witness [uid10044@gateway/web/irccloud.com/x-oiksdhyjpxlkxmim] has joined #shogun | 19:08 | |
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:adf4:8dac:e66a:2204] has joined #shogun | 20:51 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 20:51 | |
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:adf4:8dac:e66a:2204] has quit [Ping timeout: 252 seconds] | 21:20 | |
--- Log closed Fri Sep 14 00:00:36 2018 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!