Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can RRL be used for regression? #1

Closed
KongMingxi opened this issue Oct 29, 2021 · 2 comments
Closed

Can RRL be used for regression? #1

KongMingxi opened this issue Oct 29, 2021 · 2 comments

Comments

@KongMingxi
Copy link

Hi authors,

Thanks for this great work! I think it is very helpful for data analysis.
I wonder if it can be used for regression and how to perform that?

Best,

Mx

@12wang3
Copy link
Owner

12wang3 commented Oct 30, 2021

Hi KongMingxi,

RRL can be used for regression because the last layer is a linear layer (FC layer). To do regression, you just need to change the loss function, i.e., delete the softmax and use the loss function designed for regression. It should be noted that you need to calculate $\frac{\partial Loss()}{\partial \bar{Y}}$ like the following code:

y_pred_mllp.backward((y_prob - y) / y.shape[0]) # for CrossEntropy Loss

What's more, the regression performance of RRL is not verified by experiments, so I'm not sure if RRL can get a good result.

@KongMingxi
Copy link
Author

Many thanks for your reply!

@12wang3 12wang3 closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants