This is an accompanying code for the paper "Minimax Algorithms with Fixed-$k$-Nearest Neighbors" (arXiv:2202.02464v3).
- To run each experiment with a real-world dataset for classification and regression, find the link from Table 2 of the paper and download the dataset under
data/dataset-name/
.
- To replicate the mixture of Gaussians experiment, run
python main_synthetic.py
-
For the plots in the paper, check the jupyter notebook
notebooks/exp_cls_mog_results.ipynb
-
For the real-world dataset experiment: run, e.g.,
python main.py --parallel True --test-size 0.05 --n-folds 10 --n-trials 10 --algorithm kd_tree --dataset SUSY
- For the validation error profile plot in the paper, check the jupyter notebook
notebooks/exp_cls_real_data_val_errors.ipynb
- To replicate the random mixture of Gaussians experiment, run the jupyter notebook
notebooks/exp_density_mog.ipynb
- Support node-level parallel computation.
- A cross validation code snippet was adapted from that of this repository.