madeleineudell / LowRankModels.jl

LowRankModels.jl is a julia package for modeling and fitting generalized low rank models.
Other
190 stars 65 forks source link

offsets in binary LowRankModels are not the same for different rank-k #63

Closed YipengUva closed 8 years ago

YipengUva commented 8 years ago

Data is binary data, I used logistic loss function and add offset to the model. According to the definition of generalized mean u_{j} for different loss function in your paper, the offset in logisticloss should be the natural parameter corresponding to the column probability, this is the case in rank 1 model. However, when I give different rank-k, I got different offsets. I think it is important to get the same offsets for different rank -k, as null model only with offset provide baseline for us to compare models. Do you known how can I get the same offsets? regards.

madeleineudell commented 8 years ago

I don't see why the optimal offset would be the same in models of different rank. However, if you want to enforce this in order to compare different models, the simplest way to ensure this is to fix the offset at the value you found for the rank-1 model.

There's no prepackaged regularizer that can do this. What you'd want to do is to fix the last row of Y, and to let all the other rows vary. You can do this by making your own regularizer, that applies whatever other regularizer you'd like to the first k-1 rows of Y, and fixes the last one.

madeleineudell commented 8 years ago

Here's how to make such a regularizer: you can combine the FixedLastLatentFeaturesConstraint on Y (which fixes the last entry of each column of Y to a value you set) with a lastentry1 regularizer, that fixes the last entry of each column of X to be 1. You'll need to pull again; I just added the FixedLastLatentFeaturesConstraint.

YipengUva commented 8 years ago

Thanks a lot for your answer and your awesome work.