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/
alexsc has joined #mlpack
< alexsc> hey there. I’m trying using NCA and I would be interested in knowing 2 things… 1. how to interpret the output matrix “distance”, that is not symmetrical: in order to transform a vector “x” to the new space, shall I do x ° A or A ° x ? 2. Is there a way to achieve dimensionality reduction with this NCA implementation? would be cool to use it, for example, for 2D visualization
< alexsc> with A I meant the “distance” matrix. A is the name in the original paper
alexsc has quit [Quit: alexsc]
alexsc has joined #mlpack
alexsc has quit [Quit: alexsc]
alexsc has joined #mlpack
< alexsc> after a few more trial and error, I’d say: I haven’t really understood how to use it… now checking the test for the NCA class I see that the matrix that’s output from LearnDistance can be fed into a Gradient object… still I don’t get how to find a projection matrix for my dataset that minimizes the KNN error, using NCA
alexsc has quit [Quit: alexsc]
alexsc has joined #mlpack
whosik has joined #mlpack
alexsc has quit [Quit: alexsc]
alexsc has joined #mlpack
alexsc has quit [Quit: alexsc]
< rcurtin> alexsc: sorry for the slow response---in order to use the output matrix from NCA, it depends on whether you are working in C++ where the data is column-major, or if you have used the command-line program or Python binding
< rcurtin> in any case, your matrix A will be non-symmetric and d x d, and your data matrix will be either d x n or n x d (again depending on what language you are using), so there will be only one way to multiply it
< rcurtin> for dimensionality reduction, I don't think you can do that directly with NCA, but, you could do a two-step process where you first stretch your dataset with the output of NCA
< rcurtin> then use PCA to remove the dimensions with minimum variance
vivekp has quit [Ping timeout: 255 seconds]
alexscc has joined #mlpack
vivekp has joined #mlpack
< alexscc> back, if anybody answered please paste back… I’ll keep the connection alive now.. thank you
< alexscc> an example:
< alexscc> I’d like to know how to apply “outputMatrix” to “data” in order to make it perform better with KNN, basically how to use NCA in this test
< rcurtin> alexscc: I answered, see http://www.mlpack.org/irc/
< rcurtin> I hope it helps
< alexscc> thank you!
< alexscc> yes, I get it. also the PCA part makes sense. It’s my first day with this framework and I am having a bit of a hard time.. I’m using C++
< alexscc> I’m converting from my current representation using
< alexscc> arma::mat data(database->dimensions, database->size());; // feature vector in the columns
< alexscc> I managed to run NCA with >> NCA<LMetric<2> > nca(data, labels); // labels are one rowvector
< alexscc> my feature vector dimensions is 8, now it’s crashing on
< alexscc> SoftmaxErrorFunction<SquaredEuclideanDistance> sef(data, labels);
< alexscc> double initObj = sef.Evaluate(arma::eye<arma::mat>(database->dimensions, database->dimensions));
< alexscc> weird though… it seemed to work before.. the objective went from -405 to -2.. I’ll keep debugging this tomorrow
< rcurtin> sorry I am out right now so I can't look into this too deeply, but when I get back home I can provide a better response
< alexscc> thanks for the help, no rush
< alexscc> I’ll go offline later and check the chat log. will be back tomorrow
< rcurtin> sounds good
alexscc has quit [Quit: alexscc]
vivekp has quit [Ping timeout: 260 seconds]
vivekp has joined #mlpack
vivekp has quit [Changing host]
vivekp has joined #mlpack
vivekp has quit [Ping timeout: 240 seconds]
vivekp has joined #mlpack
vivekp has quit [Ping timeout: 240 seconds]
witness has joined #mlpack