--- Log opened Sun Jul 03 00:00:40 2011 | ||
@sonney2k | f-x, does the templating we discussed about yesterday work? | 00:09 |
---|---|---|
f-x | sonney2k: haven't done it yet.. lost track of a few things in that and decided to do SGD until I asked you about that again... | 00:10 |
f-x | can you please make it a bit more explicit? | 00:11 |
@sonney2k | f-x, what? | 00:11 |
f-x | sonney2k: your idea of doing it | 00:11 |
f-x | a templated get_vector() calling the other functions in the base class | 00:11 |
@sonney2k | f-x, you mean a templated function get_vector() etc? | 00:11 |
f-x | sonney2k: yeah | 00:12 |
@sonney2k | f-x, the idea was to have one templated function get_vector() in StreamingFile IIRC | 00:12 |
@sonney2k | this function then has special implementations for the different types | 00:12 |
f-x | sonney2k: ok | 00:13 |
@sonney2k | and within this just calls get_float64_vector etc | 00:13 |
@sonney2k | that's all | 00:13 |
f-x | so i'd specialize the <int> to call get_int_vector() from the base class? | 00:13 |
f-x | *derived | 00:13 |
@sonney2k | you do that all in the base class | 00:13 |
f-x | i mean to call the get_*_vector function which will later be implemented in the derived class | 00:14 |
@sonney2k | f-x, in the derived class you just call get_vector<T>() | 00:14 |
f-x | sonney2k: okay, let me check out the code for a bit | 00:15 |
f-x | i'll get back to you in a minute | 00:16 |
f-x | sonney2k: so let's take the case of StreamingFileFromStringFeatures and StreamingFileFromSimpleFeatures | 00:18 |
f-x | and say T is float64_t | 00:18 |
f-x | in each of them i call get_vector<float64_t>(), right? | 00:19 |
f-x | where get_vector<float64_t> is implemented in the base class, where it just calls the appropriate function (which is again supposed to be implemented in the derived class) | 00:20 |
@sonney2k | f-x, no you always call get_vector<T> | 00:21 |
f-x | sonney2k: i mean it indirectly calls get_vector<float64_t> in this case | 00:21 |
@sonney2k | because these derived classes are templated | 00:21 |
@sonney2k | yeah | 00:22 |
f-x | sonney2k: so my question is: | 00:22 |
f-x | since get_vector<T> is specialized only for type T, | 00:22 |
f-x | how will it call a different function for SimpleFeatures and StringFeatures? | 00:23 |
f-x | both have same parameters get_*_vector(T* vector, int len) | 00:23 |
f-x | but the way of getting the vector would be different for String and Simple | 00:23 |
@sonney2k | f-x, huh? | 00:24 |
@sonney2k | you don't use vector for strings | 00:24 |
@sonney2k | but SGString | 00:24 |
f-x | sonney2k: okay, so if that's the case then things would work | 00:26 |
f-x | but isn't SGString another encapsulation of (T*, int/index)? | 00:26 |
@sonney2k | that is the case yes, dense vectors for dense matrices, sparse matrices -> sparse vectors, strings strings | 00:26 |
@sonney2k | yes indeed | 00:27 |
f-x | sonney2k: so instead of using (T*, int) for dense vectors, i should switch to SGVector<T>? | 00:27 |
@sonney2k | yes | 00:28 |
@sonney2k | these should return SGVector | 00:29 |
f-x | hmm.. if we take care to keep the function signatures different, things will work | 00:30 |
f-x | but now I'm seeing why feature-oriented class division is better than the present stream-oriented stuff | 00:30 |
blackburn | hm i did nothing today | 00:31 |
@sonney2k | blackburn, a black day for shogun :D | 00:32 |
blackburn | sure | 00:32 |
blackburn | ah no I started writing article about IRLM with MDS | 00:32 |
@sonney2k | f-x, I don't see that any longer | 00:33 |
f-x | sonney2k: because if we want to read sparse vectors from an ascii file, how would we do it for different file formats? if we try to have that then we need to change the function names in StreamingAsciiFile.. (like get_svmlight_sparse_vector(SGSparseVectorEntry<T>*, int), and another get_vw_sparse_vector(SGSparseVectorEntry<T>*, int) | 00:33 |
@sonney2k | actually, I also don't see the problem when stringfeatures always return get_vector stuff | 00:34 |
@sonney2k | f-x, well it is not an asciifile then | 00:34 |
@sonney2k | it is a svmlight file | 00:34 |
f-x | sonney2k: oh | 00:34 |
f-x | so ascii just refers to the native shogun format? | 00:34 |
blackburn | is vw stands for volkswagen? :D | 00:35 |
@sonney2k | to some format ye | 00:35 |
@sonney2k | s | 00:35 |
blackburn | ok joking I know that it is vowpal wabbit | 00:35 |
* sonney2k sent his harddrive back to seagate for replacement | 00:36 | |
f-x | sonney2k: and about the problem with stringfeatures: i can't think of a proper way to define get_vector<T> in the base class | 00:36 |
blackburn | sonney2k: nice, have you backed up everything you wanted? | 00:36 |
@sonney2k | f-x, I don't see the problem - please explain | 00:36 |
@sonney2k | blackburn, at least it did copy without telling me that there are errors | 00:36 |
f-x | sonney2k: i mean now i've used get_*_vector(T*, int) and get_*_string(T*, int) | 00:37 |
@sonney2k | ok | 00:37 |
@sonney2k | but? | 00:37 |
f-x | so when i try to define get_vector<int>(), how should i define it? | 00:37 |
@sonney2k | f-x, well it just calls get_*_vector of matching type | 00:38 |
@sonney2k | it could even return a SGVector<T> for the beauty of it | 00:38 |
f-x | sonney2k: but get_*_vector refers to the reading function for dense vectors | 00:39 |
f-x | for strings it is get_*_string | 00:39 |
@sonney2k | f-x, and? | 00:39 |
@sonney2k | you also have get_*_string stuff | 00:39 |
@sonney2k | so you need to define get_string<T> in the same way of course | 00:40 |
f-x | sonney2k: ah - that's the thing i missed out! | 00:40 |
f-x | i thought one function would do all the magic | 00:41 |
@sonney2k | f-x, same for get_sparse_vector<T> | 00:41 |
@sonney2k | f-x, no | 00:41 |
@sonney2k | f-x, we used it as example only | 00:41 |
@sonney2k | the plan was to start with get_vector<T> and then do the others later | 00:41 |
blackburn | I want to change Labels | 00:42 |
@sonney2k | blackburn, ? | 00:42 |
@sonney2k | to +1 | 00:42 |
f-x | sonney2k: looking back at yesterday's discussion, it makes sense now.. took me a long time to get it properly :/ | 00:42 |
@sonney2k | :D | 00:42 |
bettyboo | :*) | 00:42 |
blackburn | I don't like it provides no functionality to sth like 3 100000 2 5453 4234 | 00:43 |
blackburn | these min_labels at gaussian naive bayes and knn are pathetic! | 00:43 |
@sonney2k | blackburn, it is user error to some extend though | 00:44 |
@sonney2k | I mean why should we have to do the work to do proper label hashing | 00:44 |
blackburn | why not? :) | 00:44 |
@sonney2k | because it takes time and effort | 00:45 |
blackburn | well computing min and max label in KNN is O(n) | 00:45 |
blackburn | hashing should be even faster | 00:45 |
@sonney2k | I don't mind if you add such functions but not enabled automagically for now | 00:45 |
@sonney2k | blackburn, are we talking about the same thing? hashing is a bit more expensive even | 00:46 |
@sonney2k | f-x, so ok - then please give it a try | 00:46 |
blackburn | hmm | 00:46 |
blackburn | well yes, may be it could be slower.. | 00:47 |
f-x | sonney2k: thanks - i'll start with that now | 00:47 |
@sonney2k | f-x, k thanks | 00:47 |
blackburn | ok i don't want to change Labels | 00:48 |
blackburn | :D | 00:48 |
blackburn | hmm what to do after mid-term - what is the question of the universe | 00:49 |
blackburn | that* | 00:49 |
@sonney2k | blackburn, I recall from that matlab toolbox that there are plenty of dimred methods around | 00:55 |
blackburn | sonney2k: I'm pretty sure we don't need all of them | 00:55 |
@sonney2k | heh :) | 00:55 |
blackburn | for sure I'll implement Hessian LLE | 00:56 |
blackburn | but there are some not-so-useful things | 00:56 |
@sonney2k | blackburn, did you optimize pca/kpca yet? | 00:58 |
blackburn | sonney2k: not yet, it is in todo too :) | 00:58 |
@sonney2k | anyway I have to go to bed again... only 1 more day and I have to be alive early in the morning at work :) | 00:58 |
@sonney2k | l8r | 00:58 |
blackburn | see ya | 00:59 |
-!- blackburn [~blackburn@188.122.238.13] has quit [Quit: Leaving.] | 01:05 | |
-!- f-x [~user@117.192.218.221] has quit [Remote host closed the connection] | 02:28 | |
-!- blackburn [~blackburn@188.122.238.13] has joined #shogun | 11:06 | |
-!- blackburn1 [~blackburn@188.122.252.251] has joined #shogun | 14:08 | |
-!- blackburn [~blackburn@188.122.238.13] has quit [Ping timeout: 244 seconds] | 14:10 | |
-!- blackburn [~blackburn@85.114.187.90] has joined #shogun | 14:50 | |
-!- blackburn1 [~blackburn@188.122.252.251] has quit [Ping timeout: 240 seconds] | 14:51 | |
-!- f-x [~user@117.192.209.232] has joined #shogun | 14:53 | |
-!- blackburn [~blackburn@85.114.187.90] has quit [Ping timeout: 255 seconds] | 14:56 | |
-!- blackburn [~blackburn@188.122.238.99] has joined #shogun | 15:01 | |
-!- blackburn1 [~blackburn@188.122.238.99] has joined #shogun | 15:25 | |
-!- blackburn [~blackburn@188.122.238.99] has quit [Ping timeout: 255 seconds] | 15:27 | |
-!- in3xes_ [~in3xes@180.149.49.227] has joined #shogun | 15:40 | |
-!- in3xes [~in3xes@180.149.49.227] has quit [Ping timeout: 240 seconds] | 15:44 | |
-!- in3xes_ is now known as in3xes | 15:46 | |
-!- srikanth [~mrsrikant@59.92.0.164] has joined #shogun | 16:00 | |
-!- blackburn1 [~blackburn@188.122.238.99] has quit [Ping timeout: 255 seconds] | 16:40 | |
-!- srikanth [~mrsrikant@59.92.0.164] has quit [Quit: Leaving] | 17:39 | |
-!- blackburn [~blackburn@188.122.238.99] has joined #shogun | 19:12 | |
-!- blackburn [~blackburn@188.122.238.99] has quit [Read error: No route to host] | 20:30 | |
-!- blackburn [~blackburn@188.122.238.99] has joined #shogun | 20:30 | |
@sonney2k | f-x, so did it work out? | 20:49 |
@sonney2k | blackburn, did you sent your weekly report yet? | 20:50 |
blackburn | sonney2k: oh sorry was fucking with arpack all day long | 20:50 |
blackburn | :D | 20:50 |
blackburn | will do it now | 20:50 |
f-x | sonney2k: yes, just did it now... and i think it works | 20:50 |
f-x | but again, one minor issue | 20:50 |
@sonney2k | I am just wondering because no one sent an email so far | 20:50 |
@sonney2k | f-x, yes? | 20:51 |
blackburn | I just forgot about it | 20:51 |
f-x | sonney2k: StreamingFileFromSimpleFeatures<T> needs to implement each of get_*_vector() and get_*_vector_and_label() | 20:51 |
f-x | i mean even if T=int, it needs to implement get_bool_vector, get_real_vector, etc | 20:52 |
f-x | and it has a CStreamingFile<T>* as member | 20:53 |
f-x | sorry | 20:53 |
f-x | CSimpleFeatures<T>* | 20:53 |
f-x | fetching examples is done using simple_features->get_feature_vector(), and this returns an SGVector<T> | 20:54 |
f-x | sonney2k: i'll point you to the code, just a sec | 20:55 |
@sonney2k | I understand | 20:55 |
@sonney2k | though that problem is also there without templates if I understand correctly | 20:56 |
@sonney2k | *argh* | 20:56 |
f-x | sonney2k: yeah it is | 20:56 |
f-x | so we need to typecast still | 20:56 |
f-x | even though it is much better than the earlier method | 20:56 |
@sonney2k | this means it will return broken things ... | 20:57 |
f-x | sonney2k: not if used properly | 20:57 |
f-x | i mean nobody should call get_int_vector when using a StreamingFileFromSimpleFeatures<float64_t> | 20:57 |
f-x | the typecast is done as without it things won't compile | 20:57 |
@sonney2k | blackburn, btw if you don't know how to spent time - there is this nice GPL'ed version of C5.0 lingering around - it would be cool to have this in shogun | 20:58 |
@sonney2k | f-x, can you throw SG_ERROR's if the T type doesn't match the get_*_vector one? | 20:58 |
@sonney2k | I mean you still need the typecast but at least it cannot be misused | 20:58 |
blackburn | sonney2k: well I'll either find some guy to do it or do it by myself but later | 20:59 |
blackburn | before mid-term I'm going to really polish ready algorithms | 20:59 |
f-x | sonney2k: i tried that, but i couldn't find an easy way for it | 20:59 |
@sonney2k | blackburn, sure sure - I just saw you doing lots of trac cleaning issues | 21:00 |
blackburn | sonney2k: most of them was kinda old | 21:00 |
blackburn | ah yes, need your opinion | 21:01 |
blackburn | I have closed some enhancement about to put lapack and blas into CMath | 21:02 |
@sonney2k | blackburn, seen that. I still don't want to require lapack / blas. It is ok to loose features but not to not being able to compile.... | 21:03 |
@sonney2k | f-x, I mean since the class is templated now you know or? | 21:04 |
f-x | sonney2k: we'll at least need some kind of helper function to do that (as far as i can see) | 21:04 |
f-x | i'm worried about complicating code.. but wait, i'll try some more | 21:04 |
@sonney2k | f-x, I mean couldn't you do implementations for get_bool_vector<bool>() and then get_bool_vector<other_type>() { SG_ERROR("type mismatch") } ? | 21:05 |
blackburn | sonney2k: exactly, but they would better install it (or they will not see my beautiful dimreduction ;) | 21:05 |
@sonney2k | blackburn, yeah - but getting this to work with osx and cygwin is a pain | 21:05 |
f-x | sonney2k: that would mean templating those functions further.. but it looks like something which can work | 21:06 |
blackburn | sonney2k: what is used in osx and windoze instead of lapack? | 21:06 |
@sonney2k | f-x, I mean you can do the correct implementation for the correct type - and then use the macro magic to throw errors for unsupported types | 21:07 |
@sonney2k | blackburn, lapack and blas :) | 21:07 |
blackburn | sonney2k: okay but what is the problem? | 21:07 |
@sonney2k | blackburn, try to compile it under osx, cygwin and you will understand the problem | 21:08 |
f-x | sonney2k: you're right.. but this macro business has already reduced readability a bit | 21:09 |
f-x | more so now since the class StreamingFileFromSimpleFeatures is templated and the .cpp file has to be merged with the .h file | 21:09 |
blackburn | sonney2k: is it a problem on our side? | 21:09 |
@sonney2k | f-x, yes I know but for just showing error messages it is ok I think | 21:09 |
@sonney2k | blackburn, only if we want windows/osx users :-) | 21:10 |
blackburn | sonney2k: I think we want :) | 21:11 |
f-x | sonney2k: ok.. i'll fiddle around with those macros to get that SG_ERROR in.. and finally this problem can be solved | 21:11 |
blackburn | weekly report! | 21:12 |
blackburn | okay done | 21:18 |
blackburn | sonney2k: how to go to header in vim? :) | 21:22 |
@sonney2k | blackburn, thanks | 21:23 |
@sonney2k | blackburn, install A.vim | 21:23 |
@sonney2k | then you just type | 21:23 |
@sonney2k | :A | 21:23 |
* sonney2k is a heavy user of that feature | 21:23 | |
blackburn | sonney2k: what about #include<cblas.h>? how to go to cblas.h? | 21:24 |
blackburn | ah I see | 21:24 |
blackburn | ih | 21:24 |
@sonney2k | ahh, just type gf | 21:24 |
blackburn | hm | 21:25 |
blackburn | sonney2k: how to go back? :D | 21:25 |
@sonney2k | ctrl+o | 21:25 |
blackburn | AWESOME | 21:25 |
@sonney2k | ctrl+i to go the other direction | 21:25 |
@sonney2k | f-x, does it work? | 21:59 |
f-x | sonney2k: sorry i haven't checked it out properly yet.. pretty sure it will work out, but i was exploring some alternatives in which templating is not necessary... some ideas are possible to implement, but they will have the overhead of checking types at runtime with each function call, which templates won't... templates win, i guess | 22:02 |
f-x | damn.. i really don't want readability to suffer more.. but if there's no other way, templating seems to be the reasonable option | 22:04 |
@sonney2k | f-x, hmmhh I thought that readability is not suffering with this approach - I guess you should write it down once and then we will see if it is that bad | 22:07 |
f-x | sonney2k: okay.. i'll write it now and then see.. | 22:08 |
CIA-32 | shogun: Sergey Lisitsyn master * rabf5a9d / (src/libshogun/lib/arpack.cpp src/libshogun/lib/arpack.h): Fixes and improvements for arpack wrapper - http://bit.ly/mAzY2k | 23:08 |
CIA-32 | shogun: Sergey Lisitsyn master * rbf05670 / src/libshogun/preprocessor/ClassicMDS.cpp : ARPACK-related fixes for ClassicMDS - http://bit.ly/jKyXIO | 23:09 |
-!- blackburn [~blackburn@188.122.238.99] has quit [Ping timeout: 255 seconds] | 23:34 | |
--- Log closed Mon Jul 04 00:00:43 2011 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!