verne.freenode.net changed the topic of #mlpack to: http://www.mlpack.org/ -- We don't respond instantly... but we will respond. Give it a few minutes. Or hours. -- Channel logs: http://www.mlpack.org/irc/
tsathoggua has joined #mlpack
tsathoggua has quit [Client Quit]
dhruvil263 has joined #mlpack
dhruvil263 has quit [Quit: Page closed]
Mathnerd314 has quit [Ping timeout: 258 seconds]
nilay has joined #mlpack
< nilay> zoq: Hi, if the input is represented as RGB, RGB, here then it will also make a difference for when U, and V are calculated?
< nilay> and regarding the api, do i inherit the structured_forest ( we could rename this the feature_extraction class) class and write the discretize function and other functions, because the data calculated in feature_extraction will be used in all the other classes?
< zoq> nilay: U and V is independent from the data representation.
< zoq> Since the discretize function is only used in the structured tree class, I think it makes sense, to implemented the function inside the structured tree class. Also, do you think we need another class for the feature extraction, it would be fine for me to leave it inside the StrcuturedForest class.
< nilay> i think we can make separate class for feature extraction and inherit it in our main class
< nilay> otherwise in a single file there'll be too many functions
< zoq> We try to avoid inheritance: https://github.com/mlpack/mlpack/wiki/DesignGuidelines#inheritance, but what we could do here is to instantiate a feature extraction object or make the methods static.
< nilay> ok then i think we can instantiate an object and do this. writing everything in one class does not seem a good idea to me
< zoq> okay, sounds good
< nilay> zoq: what i was saying in reference to rgb2luv was that if in python codes xyz matrix data is represented as rgb, rgb, ... and in our matrix it is as rrrrr... ,gggggg, . bbb, then we cannot use how they have calculated U and V
< zoq> The difference here is that we multiply each element in channel 0 and 1 with a single scalar v(0) = xyz(0) * ... . In the coordinate transformation case, we use the dot product, which uses (r * a0 + g * a1 + b * a2) so the data representation is important.
< nilay> also i tried adapting the input so that rgb value at (0, 0) is (0.2, 0.2, 0.2) but it still didn't clear the test
< nilay> src = N.array([[[0.2, 0.2, 0.2], [0.1,0.1,0.1], [0.2,0.2,0.2]], [[0.1, 0.1, 0.1], [0.0,0.0,0.0], [0.1,0.1,0.1]], [[0.0, 0.0, 0.0], [0.1,0.1,0.1], [0.2,0.2,0.2]]], dtype = N.float64 )
< nilay> this is the adapted input
< zoq> Okay, do you get the same results for xyz as the reference code?
< nilay> no
< nilay> i compared xyz only
< zoq> is the first value correct?
< nilay> yes
< zoq> hm, okay, can you show the the updated code and the updated input?
< zoq> It might take a while for me to take a look at the code.
< nilay> i just changed the input to this and compare manually the xyz values
< nilay> haven't changed anything much
< zoq> you updated the xyz transformation xyz.slice(0)(i) = 0....?
< nilay> yes that i did
< zoq> okay
< zoq> I get back to you once I have time to look at it, sorry that I can't take a look at it right now.
< nilay> zoq: no problem, i will work on the next tasks meanwhile. :)
< zoq> nilay: Do you get the same output: https://gist.github.com/zoq/ba817112a6dffe787cd64466ad88f326
< nilay> zoq: yes
< zoq> okay, great, remember armadillo is column major: so [0.1900898 0.2 0.2177832] is the first column, [ 0.0950449 0.1 0.1088916] the second row from the python matrix is the second column of the armadillo matrix since python represents the matrix as RGBRGB, it's even harder to see that the matrix is the same.
< zoq> So, what you could to here is that you check visually that the matrix is the same, and use armadillo output as a reference.
< nilay> zoq: ok yeah, so the test was passing all this time :P
Mathnerd314 has joined #mlpack
nilay has quit [Quit: Page closed]