Code for Safe and Sparse Newton Method for Entropic-Regularized Optimal Transport.
Use the following commands to create a virtual environment and install necessary packages:
conda create -n ssns
conda activate ssns
conda install python=3.10 numpy scipy matplotlib seaborn pandas scikit-learn
pip install regot python-mnist
We evaluate the SSNS algorithm's performance through various numerical experiments, focusing on entropic-regularized optimal transport (OT). We compare SSNS with other optimization methods, including the Sinkhorn algorithm, APDAGD, L-BFGS, and the globalized Newton method.
We use three benchmark datasets to define the OT problem, with experiments conducted on both (Fashion-)MNIST and ImageNet datasets:
- (Fashion-)MNIST:
fashion
anddata_mnist
- ImageNet:
train_feature
,train_feature_60
andtrain_feature_90
feature.py
- Comparative Experiments:
get-pkl-for-all.py
- Impact of Feature Dimension:
get-pkl-for-feature.py
- Scalability:
get-pkl-for-large-scale.py
- Comparative Experiments:
plot-pdf-for-all.py
- Impact of Feature Dimension:
plot-pdf-for-feature.py
- Scalability:
plot-pdf-for-large-scale.py