ChanServ changed the topic of #mlpack to: "mlpack: a fast, flexible machine learning library :: We don't always respond instantly, but we will respond; please be patient :: Logs at http://www.mlpack.org/irc/
xiaohong has joined #mlpack
xiaohong_ has joined #mlpack
xiaohong has quit [Ping timeout: 245 seconds]
xiaohong_ has quit [Ping timeout: 276 seconds]
xiaohong has joined #mlpack
xiaohong has quit [Remote host closed the connection]
xiaohong has joined #mlpack
xiaohong_ has joined #mlpack
xiaohong has quit [Ping timeout: 250 seconds]
xiaohong has joined #mlpack
xiaohong_ has quit [Ping timeout: 272 seconds]
xiaohong has quit [Remote host closed the connection]
xiaohong has joined #mlpack
xiaohong has quit [Remote host closed the connection]
< KimSangYeon-DGU>
favre49: This is my brief understanding the numpy code that you linked
< KimSangYeon-DGU>
favre49: At line 153, `asf` is an identity matrix with 2 dimension (column of F, column of F)
< KimSangYeon-DGU>
At line 154, non diagonal element of 'asf' will be replaced by 1e6
< KimSangYeon-DGU>
At line 166, 'None' means 'Add new axis with 1', so asf[:,None,:] means that create a new matrix with the 3 dimension (column of F, 1, column of F).
< KimSangYeon-DGU>
About the np.max(), for example, if there is a 3D matrix A = [[[1, 2, 3]], [[5, 1, 0]], [[0, 0, 1]]], then the np.max(A, axis=2) is [[3], [5], [1]]. The parameter `axis=2` means computation with keeping row and column dimension.
KimSangYeon-DGU has quit [Remote host closed the connection]
xiaohong has joined #mlpack
xiaohong has quit [Remote host closed the connection]
xiaohong has joined #mlpack
xiaohong has quit [Remote host closed the connection]
KimSangYeon-DGU has joined #mlpack
jeffin143 has joined #mlpack
< jeffin143>
lozhnikov : I cannot pass policy.Encode(output, dictionary.Value(token), i, numTokens); for tfidf
< jeffin143>
Since i have to calculate tfidf values and hence I have to pass the output matrix as a whole
< jeffin143>
and hence I cannot call the policy.Encode inside the loop and have to call it after the loop ends
< lozhnikov>
jeffin143: I think the policy itself should calculate the values.
< jeffin143>
Can you take a look at, I need to get the count, but the count will only be calculated after iterating over the token once for a particular
< jeffin143>
row
< lozhnikov>
Yes, right now you iterate over the tokens twice. You can calculate the amount of tokens during the first pass. Of course you should introduce a policy function for that.
< lozhnikov>
The idfdict variable should be defined inside the policy.
< jeffin143>
Ok then I need to change the StringEncoding Class , ryt ?
< lozhnikov>
I think it's enough to add a call to the policy function into the first pass of EncodeHelper(). The function does nothing in case of other policies. You don't need to change anything else.
< jeffin143>
ok, I will try
< jeffin143>
lozhnikov : how to pass dictionary of StringEncoding