Coder Social home page Coder Social logo

hxsylzpf / dp_penalized_logistic_regression Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fy/dp_penalized_logistic_regression

0.0 2.0 0.0 2.59 MB

Differentially private penalized logistic regression.

License: MIT License

R 97.50% MATLAB 2.50%

dp_penalized_logistic_regression's Introduction

Differentially private penalized logistic regression

This repository is an application of the differentially private penalized logistic regression method proposed in the following paper:

"Differentially-private logistic regression for detecting multiple-SNP association in GWAS databases." Yu, F., M. Rybar, C. Uhler, S. Fienberg. (2014) Proceedings of the 2014 International Conference on Privacy in Statistical Databases.

The paper is available at here.

Example data generation

The example case/control genotype data (./data/anticase_genotypes_Nov09_interaction1_MAF025_1 and ./data/case_genotypes_Nov09_interaction1_MAF025_1) were generated by HAP-SAMPLE with the following options:

  • Population: CEU
  • Source for SNPs: Chrom9_Chrom13_snps.txt
  • Disease Model File: AR_chrom9_chrom13_Nov09_interaction1_MAF025.txt
  • Simulation Type: Case/Control
  • Number of Cases: 1000
  • Number of Controls: 1000
  • Average breaks per cM: 1
  • Output Format: SNPs v. Individuals

The disease model file describes a disease with 2 causative SNPs having addive effects. For more details about the disease model, see Malaspinas & Uhler (2010).

Usage

In R:

source("./simulation_for_paper.R")
source("./analyze_simulation_for_paper.R")

Make sure that MATLAB and CVX are installed.

File descriptions

  • analyze_simulation_for_paper.R: analyze simulation results generated by simulation_for_paper.R and make plots
  • simulation_for_paper.R: perform differentially private elastic-net penalized logistic regression multiple times and save the results to an RData file. Also perform non-private penalized logistic regression and save the results to an RData file.
  • analyze_hapsample.R: (helper script) load HapSample data into the workspace.
  • run_cvx.R: (helper script) a wrapper for running CVX for MATLAB in R.
  • opt_elastic_net_for_R.m: (helper script) a MATLAB function that uses CVX for optimization.

R session info

R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin14.1.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lattice_0.20-29 R.matlab_3.1.1  glmnet_1.9-8    Matrix_1.1-4   

loaded via a namespace (and not attached):
[1] digest_0.6.8      grid_3.1.2        gtable_0.1.2      plyr_1.8.1       
[5] proto_0.3-10      R.methodsS3_1.6.1 R.oo_1.18.0       R.utils_1.34.0   
[9] Rcpp_0.11.4 

dp_penalized_logistic_regression's People

Contributors

fy avatar

Watchers

James Cloos avatar CMU学Drama 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.