GithubHelp home page GithubHelp logo

insilico / npdr Goto Github PK

View Code? Open in Web Editor NEW
12.0 8.0 6.0 24.6 MB

NPDR: Nearest-neighbor Projected-Distance Regression with the generalized linear model

Home Page: https://insilico.github.io/npdr/

License: Other

R 100.00%
relief glm covariates nearest-neighbors epistasis feature-selection gene-expression genome-wide-data projected-distances gwas

npdr's People

Contributors

brett-mckinney avatar trangdata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

npdr's Issues

Error in example code when running regular_nestedCV

I'm getting an error when trying to run the following in quantitative-trait-maineffect-simulation.R:

rncv.qtrait <- regular_nestedCV(train.ds = qtrait.data, 
+                                   validation.ds =  qtrait.3sets$validation, 
+                                   label = "qtrait",
+                                   method.model = "classification",
+                                   is.simulated = TRUE,
+                                   ncv_folds = c(10, 10),
+                                   param.tune = FALSE,
+                                   learning_method = "rf", 
+                                   importance.algorithm = "RReliefFequalK",
+                                   relief.k.method = "k_half_sigma",     # surf k
+                                   num_tree = 500,
+                                   verbose = F)

The error:

Error in if (tmps < .Machine$double.eps^0.5) 0 else tmpm/tmps : 
  missing value where TRUE/FALSE needed

Perhaps we need to revisit the regular_nestedCV function?

More refactorization

  • modularize the code (e.g. move simulation function elsewhere, break down functions with more than 500 lines of code, etc.)
  • create examples that work (hopefully independent of the data simulation step, move the examples from inst to vignettes)

Add "batch" number as additional variable in regression

We discussed adding a "batch" variable in the individual regression to alleviate some violation of the independence assumption (hence the term pseudo). For example, a diff between sample 3 and 2 would have 3 as the batch number (rule of thumb: take the first sample id).

I thought about considering this variable as a random effect term, but the independence assumption there is not quite what we want. For instance, within the neighborhood of 3, these differences (e.g. 3-2, 3-5, 3-6) are independent. However, they may not be independent of other differences in a different neighborhood (e.g. 2-5). In short, we have within-neighborhood independence but not between-neighborhood (which a mixed model would correct for).

Maybe we should stick with the fixed model and adding the batch variable as a fixed effect term.

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.