GithubHelp home page GithubHelp logo

lcrawlab / goals Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.19 MB

Code and tutorials for implementing the GlObal And Local Score

Home Page: https://arxiv.org/abs/2302.02024

License: GNU Affero General Public License v3.0

C++ 46.47% R 53.53%
genetics gp-regression machine-learning nonlinear-models variable-importance variable-selection

goals's Introduction

GOALS: A Simple Approach for Local and Global Variable Importance in Nonlinear Regression Models

The ability to interpret machine learning models has become increasingly important as their usage in data science continues to rise. Most current interpretability methods are optimized to work on either (i) a global scale, where the goal is to rank features based on their contributions to overall variation in an observed population, or (ii) the local level, which aims to detail on how important a feature is to a particular individual in the dataset. In this work, we present the "GlObal And Local Score" (GOALS) operator: a simple post hoc approach to simultaneously assess local and global feature variable importance in nonlinear models. Motivated by problems in statistical genetics, we demonstrate our approach using Gaussian process regression where understanding how genetic markers affect trait architecture both among individuals and across populations is of high interest. With detailed simulations and real data analyses, we illustrate the flexible and efficient utility of GOALS over state-of-the-art variable importance strategies.

R Packages for GOALS and Tutorials

The GOALS software requires the installation of the following R libraries:

adegenet

BAKR (via GitHub)

corpcor

doParallel

MASS

Matrix

RATE (via GitHub)

Rcpp

RcppArmadillo

RcppParallel

svd

Note that the latest BAKR and RATE functions are also included in the Software directory for this repo. Unless stated otherwise, the easiest method to install many of these packages is with the following example command entered in an R shell:

install.packages("corpcor", dependecies = TRUE)

Alternatively, one can also install R packages from the command line.

C++ Packages for GOALS and Tutorials

The code in this repository assumes that basic C++ functions and applications are already set up on the running personal computer or cluster. If not, the functions and necessary Rcpp packages to build nonlinear covariance matrices (e.g., BAKR and RATE) and fit a GP regression model will not work properly. A simple option is to use gcc. macOS users may use this collection by installing the Homebrew package manager and then typing the following into the terminal:

brew install gcc

For macOS users, the Xcode Command Line Tools include a GCC compiler. Instructions on how to install Xcode may be found here. For extra tips on how to run C++ on macOS, please visit here. For tips on how to avoid errors dealing with "-lgfortran" or "-lquadmath", please visit here.

Demonstration and Tutorials for GOALS

The Software folder contains all necessary software to run GOALS. Note that RATE.R is only necessary for the PowerComparisons.R tutorial.

The Tutorial folder contains a tutorial on global variable selection, a tutorial on local variable selection, and a Power Comparison of GOALS to other variable selection methods. Here, we consider a simple (and small) genetics example where we simulate genotype data for n individuals with p measured genetic variants. We then randomly select a small number of these predictor variables to be causal and have true association with the generated (continuous) phenotype. These scripts are meant to illustrate proof of concepts and specifically demonstrate (1) the calculation of the Gaussian Kernel, (2) the precalculations and the calculation of the delta GOALS matrix Additional packages needed for the tutorials are in the README.md file in that folder.

Relevant Citations

E.T. Winn-Nuñez, M. Griffin, and L. Crawford. A simple approach for local and global variable importance in nonlinear regression models. arXiv. 2302.02024.

J. Ish-Horowicz*, D. Udwin*, S.R. Flaxman, S.L. Filippi, and L. Crawford. Interpreting deep neural networks through variable importance. arXiv. 1901.09839.

L. Crawford, S.R. Flaxman, D.E. Runcie, and M. West (2019). Variable prioritization in nonlinear black box methods: a genetic association case study. Annals of Applied Statistics. 13(2): 958-989.

L. Crawford, K.C. Wood, X. Zhou, and S. Mukherjee (2018). Bayesian approximate kernel regression with variable selection. Journal of the American Statistical Association. 113(524): 1710-1721.

Questions and Feedback

Please send any questions or feedback to the corresponding authors Emily Winn-Nuñez or Lorin Crawford.

We appreciate any feedback you may have with our repository and instructions.

goals's People

Contributors

etwinn avatar lorinanthony avatar

Watchers

 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.