Code for the paper ''Random Reshuffling for Stochastic Gradient Langevin Dynamics'', Luke Shaw and Peter A. Whalley.
ModelProblemCalculation.py contains the symbolic manipulations necessary to derive the expressions in section 4 of the paper, where we show SGLD-RM has variance error of order Gaussian1DExperiment.py generates samples and plots the experimental confirmation of the analytical Gaussian calculations.
LogisticRegressionExperiments.py contains the code for the experiments in section 5 of the paper. One may run an experiment using the command runLRExp(expName,R,n_paths) where expName is a string and corresponds
to one of the datafiles ('SimData', 'StatLog', 'CTG', 'Chess') provided, R is an integer number of batchs, and n_paths is an integer number of simultaneous stochastic gradient realisations to carry out. We provide HMC estimates (using LRExp). One may then plot results using plotter(expName,R) which uses the file saved by runLRExp.
In order to see oscillations, we recommend