IRC logs of #shogun for Thursday, 2018-09-13

--- 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 #shogun06:07
-!- witness [uid10044@gateway/web/irccloud.com/x-bsfajwaqmamepfls] has quit [Quit: Connection closed for inactivity]10:44
@wikinglisitsyn, around/11:44
@wiking?11:45
@wiking?11:45
lisitsynwiking: ya11:45
-!- HeikoS [~heiko@host86-151-43-178.range86-151.btcentralplus.com] has joined #shogun11:45
-!- mode/#shogun [+o HeikoS] by ChanServ11:45
@wikingwhen we do put then why the input has to be of type is_sg_base11:45
@wikingmeaning11:45
@wikingnot derivative11:45
@wiking?11:45
@wikingso if i wanna put HackerMachine that is derived from machine that should be auto casted?11:46
@wikingor?11:46
@wikingi mean i'mjust wodnering11:46
@wikingmaybe there's a specific reason why we dont want this11:46
lisitsynuhmm I am not sure what you mean11:46
@wikingok11:47
@wikingtemplate <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
@wikingvoid put(const std::string& name, T* value)11:47
@wiking{11:47
@wikingput(Tag<T*>(name), value);11:47
@wiking}11:47
@wikingso in this case11:47
lisitsynbut that's just a hack for pointers, no?11:47
@wikingif X is not sg_base11:47
@wikingthen no matter if X is a derivative of any of the sg_base11:48
@wikingafaik it'll fail11:48
lisitsynwe just expect SGObject to be pointers11:48
@wikingcompile time of course11:48
@wiking          bool, std::is_same<CMachine, T>::value ||11:48
@wiking                    std::is_same<CKernel, T>::value ||11:48
@wiking...11:48
@wikingsee what i mean?11:48
wuwei[m]hey wiking, lisitsyn11:49
lisitsynuhmmm no11:49
lisitsyn:)11:49
@wikinglisitsyn, https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/base_types.h11:49
wuwei[m]this is exactly the problem i had previously with pipeline11:49
@wikingwuwei[m], hello hello!11:49
@wikinglisitsyn, so we have these filters for the SGObject.put11:49
@wikingas sfinae11:49
@wikingnow if i wanna do .put("machine", m)11:50
@wikingbut where typeof(m) = CLibLinear11:50
@wikingthis will fail compile time11:50
@wikingright?11:50
@wikingas "machine" would expect CMachine11:50
@wikingbut the enable_if checks for same_as<CMachine, T>11:50
@wikingi.e. its either that class or nothing11:51
lisitsynwait11:51
lisitsynbut they are not filters11:51
lisitsynIIRC it is just a way to treat SGOBjects as pointers, no?11:51
@wikingi meant this https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/SGObject.h#L38911:53
@wikingbut ok i see what u mean11:53
@wikingso anyhow11:53
@wikingthe problem will be raised here11:53
lisitsynahh11:53
lisitsynok sorry I understand now11:53
@wikinghttps://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/SGObject.h#L36111:53
lisitsynso you mean we can't get LibLinear back?11:54
@wikingmore like i cannot put11:54
lisitsynno, I think pointers are castable11:54
@wikingbecause i dont care not getting back CLiblinear11:54
@wikingbut wanna be able to put that11:54
lisitsynI think this works, no?11:55
@wiking449: [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
@wiking449: terminate called after throwing an instance of 'shogun::ShogunException'11:55
@wiking449:   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
@wikingthis is on11:55
lisitsynoh ok11:55
lisitsynthen is_sg_base should work for inherited classes11:55
@wikingauto cross = wrap(machine_evaluation("CrossValidation"));11:55
lisitsynneeds some patch I guess11:55
lisitsynI see11:55
@wikingcross->put("machine", pipeline);11:55
@wikingso then it's caboooom11:56
@wikingalthough pipeline11:56
@wikingis a CMachien11:56
lisitsynthis worked because we used base classes in the examples11:56
@wikingyes yes11:56
@wikingi mean essential11:56
@wikingly11:56
lisitsynwe need to patch is_sg_base then11:56
@wikingyou would want just to use base classes11:56
@wikingbut i mean11:56
lisitsynah oh11:56
@wikingi dont see a specific reason11:56
@wikingwhy inherited classes couldn't go IN11:56
lisitsynbut we don't want to generate a lot of put's11:56
@wikingi mean you will of course only get back11:56
@wikingthe base classes11:57
lisitsynwiking: basically we should allow putting it in11:57
@wikingyes yes11:57
lisitsynbut we should cast it to the base class11:57
lisitsynbefore putting11:57
@wikingexactly11:57
@wikingthat's what i thought as well11:57
@wikingthat that should be autohandled11:57
lisitsynit is a bit of trickery but should be possible to do11:57
lisitsynwiking: this needs is_sg_base support inheritance AND instead of Tag<T> it should be Tag<sg_parent<T>::value>11:58
@wikingyes yep11:58
@wikinggotcha11:58
@wikingok will work on this11:58
lisitsyncool11:58
@wikingas wuwei[m] needs it11:58
@wikingthnx11:58
@wikingjust wanted to run by somebody11:58
@wikingbefore i make a huge mess as usual11:58
@wiking:D11:58
@wikingthnx heaps11:58
lisitsynwiking: we also need to allow to cast it back12:11
lisitsynthat's a bit more interesting12:11
lisitsynwiking: sometimes I feel we're trying to implement yet another python12:12
lisitsyn:D12:12
@wikinglisitsyn, we need to be able to cast it back?12:15
@wikingwhy?12:15
lisitsynwiking: I think that would be a nice feature to have12:16
@wikingmmm hehe12:16
@wikingyeah12:16
@wiking:D12:16
lisitsynwiking: also, I think it would be nice to be able to get int as float (if you mistyped it)12:16
@wikingyeah12:16
-!- rcurtin [~ryan@knife.lugatgt.org] has quit [Ping timeout: 244 seconds]14:34
-!- rcurtin [~ryan@knife.lugatgt.org] has joined #shogun14:35
-!- HeikoS [~heiko@host86-151-43-178.range86-151.btcentralplus.com] has quit [Ping timeout: 244 seconds]15:03
@wikinglisitsyn, https://github.com/zandaqo/iswasmfast/blob/master/lib/regression.cpp15:53
@wikingjust saying :) (let's compare this beauty with any of our lr :)15:54
lisitsynwiking: heh15:54
@wikingcrazy no? :)15:54
lisitsynwiking: well that's the simplest algorithm16:09
lisitsyn;)16:09
@wiking:>16:10
lisitsynwiking: so you'll have jeff the great in your univ16:23
lisitsyn:D16:23
@wikingyes yes16:23
@wiking:)16:23
@wikingokey people16:26
@wikingso16:27
@wikingi have a question16:27
@wikinglisitsyn,16:27
lisitsyn???16:27
lisitsynoops16:27
@wikingsay we take BinaryLabels16:27
lisitsynyes?16:27
@wikingor any other labels16:27
@wikingif i do16:27
@wikingx = SGVector(10)16:27
@wikingand then do16:27
@wikinglabels = new BinaryLabels(x)16:27
@wikingwhy do we copy content of x?16:27
@wikingbecause we do16:27
@wiking:(16:27
@wikingi just tested this16:27
@wikingall elements of x is 016:28
@wikingthen i just take it to be used in LibLinear16:28
@wikingof course if i run like that16:28
@wikingll.train()16:28
@wikingi get16:28
@wiking[ERROR] In file /Users/wiking/shogun/src/shogun/labels/BinaryLabels.cpp line 83: Binary Labels must be -1 or +1!16:28
@wikingwhich is correct16:28
@wikingbut then if set x's values to be 1 or -116:28
@wikingand rerun ll.train16:28
@wikingthe same error appears16:28
@wikingUNLESS i do a: labels = new BinaryLabels(x)16:29
@wikingwhich for me means that the x is being copied16:29
@wikingand i really dont understand why16:29
lisitsynehh? :D16:30
@wikingheheh check pm16:32
@wikingfor the fun part16:32
@wiking:)16:32
@wikinghttps://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/labels/BinaryLabels.cpp#L26-L4816:32
@wikinglisitsyn, i mean this16:33
@wiking:S16:33
lisitsyntbh I have no idea16:35
@wikinghehe ok coo16:46
@wikingl16:46
@wikingme neither16:47
@wiking:D16:47
-!- HeikoS [~heiko@eduroam-int-pat-8-100.ucl.ac.uk] has joined #shogun17:31
-!- mode/#shogun [+o HeikoS] by ChanServ17: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 #shogun19:08
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:adf4:8dac:e66a:2204] has joined #shogun20:51
-!- mode/#shogun [+o HeikoS] by ChanServ20: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!