-
Notifications
You must be signed in to change notification settings - Fork 162
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
use np.linalg.lstsq to _optimize? #8
Comments
That's a good shoot! Have you assessed the impact on final results? |
I obtained similar results. But omit alpha*loss_l1 may be bad idea? |
Thank you for your insightful suggestion. We'll make a decision after further evaluations. |
After careful assessment, we have found that l1 regularization has such a significant impact on the stability of the model that we cannot adopt this optimization as default. However, we have implemented it as an optional feature. Thank you for your contribution to this project, once again. |
def _optimize(self, alpha: float, lr: float, n_iter: int) -> np.ndarray:
try:
return np.linalg.lstsq(self.mutual_ics[:self.size, :self.size],self.single_ics[:self.size])[0]
except:
return self.weights[:self.size];
very fast
The text was updated successfully, but these errors were encountered: