This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ Fit logistic regression by ADMM. """ | |
| # Author: Vlad Niculae <v.niculae@uva.nl> | |
| # License: MIT | |
| import numpy as np | |
| from sklearn.datasets import load_breast_cancer | |
| from sklearn.linear_model import LogisticRegression | |
| from sklearn.preprocessing import StandardScaler | |
| from scipy.linalg import cho_factor, cho_solve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Vlad Niculae <v.niculae@uva.nl> | |
| # License: MIT | |
| # Memory-efficient randomized pivoted Cholesky factorization | |
| # Algorithm 2.3 from Epperly et al, https://arxiv.org/abs/2410.03969 | |
| import torch | |
| torch.set_printoptions(precision=2, linewidth=120, sci_mode=False) | |
| class LazyKernelMatrix: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Permutation numbering system | |
| https://www.numdam.org/item/?id=BSMF_1888__16__176_0 | |
| """ | |
| # Author: Vlad Niculae <v.niculae@uva.nl> | |
| # License: MIT | |
| import numpy as np |
OlderNewer