Skip to content

zhenanf/FedDCD.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FedDCD.jl

Implementation of the federated dual coordinate descent (FedDCD) method.

Installation

To install, just call

Pkg.add("https://github.com/ZhenanFanUBC/FedDCD.jl.git")

Get data

We get data from the website of LIBSVM. To download the datasets, just call

mkdir data
cd ./data
wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/rcv1_train.binary.bz2
wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/rcv1_test.binary.bz2
wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/mnist.scale.bz2
wget https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/mnist.scale.t.bz2
bzip2 -d rcv1_train.binary.bz2
bzip2 -d rcv1_test.binary.bz2
bzip2 -d mnist.scale.bz2
bzip2 -d mnist.scale.t.bz2

Run FedAvg for toy example.

include("experiments/PrimalMethods.jl")
RunFedAvgAndProx(
    "data/rcv1_train.binary",
    "data/rcv1_train.binary"
    1e-2,
    0.0,
    0.3,
    0.1,
    100,
    "results/toy.txt"
    )

Run FedDCD for toy example.

include("experiments/DualMethods.jl")
RunFedDCD(
    "data/rcv1_train.binary",
    "data/rcv1_train.binary"
    1e-2,
    0.3,
    0.1,
    100,
    "results/toy.txt"
    )

Citing this package

If you use FedDCD.jl for published work, we encourage you to cite the software.

Use the following BibTeX citation:

@article{fan2022dual,
      title={A dual approach for federated learning}, 
      author={Zhenan Fan and Huang Fang and Michael P. Friedlander},
      year={2022},
      eprint={2201.11183},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Credits

FedDCD.jl is developed by Zhenan Fan and Huang Fang

About

Implementation of the federated dual coordinate descent (FedDCD) method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published