Closed kristosh closed 7 years ago
For PMF, you could change n_feature
for latent variable size, reg
for regularization, and batch_size
, epsilon
, momentum
for rate of convergence.
For BPMF, n_feature
is the same as PMF, and beta
, beta_user
, df_user
, beta_item
, df_item
are hyper parameters in MCMC sampling.
All details are in this paper.
Is it the case that PMF make use EM algorithm for optimize the equation function while BMF MCMC and the standard MF SVD?
PMF just use SGD, and BPMF use MCMC. (No SVD)
Hi, I have a question here in you pmf model class code. The grads updating rule in your code are: My question is that the grads of u is: so, the ui and vj are not the same, why in your code are: both multiply item_feature??? Could you please give me your inference procedure? Thank you very much!
@xuChenSJTU you are right!
It should be u_grads = i_features * err_mat + self.reg * u_features
Thanks for finding the error. I will fix it.
No thanks, in fact, there is still a question in your code I couldn't understand. Form the gradients inference equation, we got that, for every ui, even though the cij=0, it will be updated with the other item 2lambdaui. But in your code, you only use the train data, which means, when cij=0, you don't update the corresponding ui. Is this just a trick?
I think it depends on how you want to handle u_i
when there is no records correspond to it.
In my current implementation, I keep u_i
unchanged as 0.1 * rand_value
. If you include regularization for it, then the value will just shrink toward 0.
(I think both cases are fine though.)
Hello, I studied the BPMF code. I found in my dataset, when the iterations=5 or 10, the rmse is similar to PMF method(test rmse=0.38), and the precision and recall are reasonable too(Recall@20: 0.83). When I set the iteration=50 or more, the test rmse will decrease too(test rmse=0.24), but the precision and recall value is non-sense(Recall@20:0.005). I don't know why, could you please tell me is there any special problem I need to pay attention to in BPMF. Thank you very much~~~
Hi, I am not sure what's the problem, but my guess is some item features become very large and cause the recall issue. You can try print out top predictions for each user and check why recall is so low.
close this now
Hi there, I am trying to figure out about the parameters of BMF and PMF algoriths that you are using to tune the equation of the optimization function. Could you please elaborate bit about the parameters needed tuning?