Giter Club home page Giter Club logo

scsgadaptivity's Introduction

ScsgAdaptivity

This repository contains all Python code to replicate all numerical results in our paper On the Adaptivity of Stochastic Gradient-Based Optimization.

Python scripts

The folder python/ contains all python code:

  • methods.py implements all methods considered in the paper, including SCSG, SVRG, SARAH, Katyusha(ns), SGD and GD;

  • objective.py implements the loss function and the gradient function of multi-class logistic regression;

  • process_data.py is the script to transform external data into our standard data format: "XXX_A.npy" for the design matrix, "XXX_y.npy" for the class labels and "XXX_params.p" for other information. Due to the storage constraints, the raw data is excluded from the repo;

  • expr.py is the script to run experiments on one dataset and one stepsize. See ./expr.py -h for the options;

  • post_process_expr.py post-processes the experimental results from expr.py by choosing the best tuned stepsize and recording the corresponding results for each dataset. It also outputs the best tuned stepsize for each method into "XXX_besteta.p";

  • compute_optim.py computes the optimum value f(x*) by running SCSG with 5000 effective passes of data with the best tuned stepsize from "XXX_besteta.p" and outputs the result into "XXX_optim.p";

  • expr_plot.py generate all figures;

  • utils.py implements a few helpers

Replicating the Experiments

The folder jobs/ contains all files that facilitate job submission to the cluster.

  • SCSG_expr_params.txt contains all 126 combinations of datasets and stepsizes

  • Running the following code in a SLURM system to submit jobs

mkdir results
mkdir log
sbatch SCSG_job.sh

Please contact [email protected] for further questions.

scsgadaptivity's People

Contributors

lihualei71 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.