lockEF / SupCP

Probabilistic tensor factorization with covariate supervision
7 stars 1 forks source link

Unrecognized function or variable 'TensProd_GL' #1

Closed turovapolina closed 4 years ago

turovapolina commented 4 years ago

Dear colleagues,

I am trying to use your code for supervised PARAFAC and unfortunately, I received a mistake: image I didn't find any modules with this function or any other examples with it. Could you please clarify how can I define this function?

Best regards, Polina

lockEF commented 4 years ago

Thank you for notifying us. The 'TensProd_GL' function is outdated and should be replaced with just 'TensProd'. We have made this change to the code in the current version. Please let us know if you encounter any other issues.

turovapolina commented 4 years ago

Thank you for notifying us. The 'TensProd_GL' function is outdated and should be replaced with just 'TensProd'. We have made this change to the code in the current version. Please let us know if you encounter any other issues.

Dear @lockEF,

Thank you for your answer! I am sorry to disturb you once again. I tried to perform SupParafacEM with same arrays X and Y as in your example with aminoacids but one more problem appeared: image

After thatI tried to perform line by line the same algorythm as in your Example.m script but I received the same mistake: image

Do you have any suggestions why TensProd function doesn't work? As far as I understand it refers to khatri-rao function kr.m and it requires two arguments but we give only one (tempL).

Thank you very much in advance!

lockEF commented 4 years ago

Thanks again for the comment. It seems that multiple versions of the kr.m function have been developed. I have uploaded the version used in our function as an additional file. Please let me know if you encounter any more issues.

turovapolina commented 4 years ago

Dear @lockEF,

Thank you very much! Now it works! But another strange thing happened: I decomposed my own data using supervised PARAFAC and it gives me the same loadings as usual PARAFAC. At the first time I thought that this happened because my samples are already resolved in unsupervised model and supervised technique doesn't give me any advantages. But then I tried to apply SupPARAFACem to the dataset where scores from PARAFAC are not satisfying at all and received the same result! I am just wondering how it works with your examples? Do you receive different loadings? Or probably I misunderstand the idea of supervised PARAFAC at all. Thank you very much in advance!

Best regards, Polina

lockEF commented 4 years ago

The results for SupCP can be similar to those of regular PARAFAC under certain settings, especially if the low-rank signal for the tensor (X) is strong and its relation to the response (Y) is weak. Situations in which the low-rank signal (X) is relatively weak but its relation to the responses (Y) is strong will have the most improvement with a supervised approach. See the simulations in https://arxiv.org/pdf/1609.03228.pdf for more detail.