insilico / npdr Goto Github PK
View Code? Open in Web Editor NEWNPDR: Nearest-neighbor Projected-Distance Regression with the generalized linear model
Home Page: https://insilico.github.io/npdr/
License: Other
NPDR: Nearest-neighbor Projected-Distance Regression with the generalized linear model
Home Page: https://insilico.github.io/npdr/
License: Other
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?
For large data, npdr runs out of memory when dopar.nn=T (parallel nearest-neighbor calculation). Temporary fix is dopar.nn=F. A long-term solution may be to use big.matrix from the bigmemory library to enforce a shared-memory version of the distance matrix instead of allowing copies of the matrix to be exported to the workers.
https://stackoverflow.com/questions/31575585/shared-memory-in-parallel-foreach-in-r
I think we want to remove mdd.RNAseq.rda from the package and replace it with a smaller dataset (perhaps a smaller number of randomly selected genes or just top genes).
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.