Coder Social home page Coder Social logo

sage-bionetworks / bfrm Goto Github PK

View Code? Open in Web Editor NEW
1.0 18.0 3.0 3.56 MB

Bayesian Factor Regression Model (BFRM) techniques from West group at Duke - wrappers written to integrate as an R package to call platform-specific executable.

C 2.52% C++ 73.24% Shell 22.16% R 2.09%

bfrm's Introduction

README DOCUMENT FOR THE bfrm PACKAGE

AUTHOR: BRIAN M. BOT

Bayesian Factor Regression Modelling (bfrm) - wrappers written to integrate bfrm algorithm from West group as an R package to call platform-specific executables.

bfrm's People

Contributors

brian-bot avatar trister avatar synapsify avatar

Stargazers

 avatar

Watchers

Erich S. Huang avatar Justin Guinney avatar James Cloos avatar Matthew D. Furia avatar  avatar Ben Logsdon avatar  avatar Bruce Hoff avatar Brig Mecham avatar  avatar insockjang avatar T. Thyer avatar  avatar  avatar  avatar Thomas Yu avatar C. Molitor avatar  avatar

bfrm's Issues

add parseBFRM (or some better name) function?

# parseBFRM.R
# Functions to parse BFRM output into a list object of Factors by feature indices
# that meet a 0.99 posterior probability threshold

parseBFRM <- function(bfrmResult){
  print('Loading Posterior Probabilities')
  mPostPib <- bfrmResult@results$mPostPib
  numFacs <- dim(mPostPib)[2]
  facParse <- function(x){
    incFeatureLogical <- x > 0.99
    incFeatureInd <- grep('TRUE', incFeatureLogical)
    return(incFeatureInd)
  }
  print('Creating list of Factors by Features with Posterior Probability > 0.99')
  facList <- apply(mPostPib[ , 2:numFacs], 2, facParse)
  return(facList)
} 

evolve() needs to specify EvolVarInFile to work properly

I think I've pinned down where the bug is:
When "evol = 1", just as with the bfrm() function, the file of the "seed" indices has to be specified, in this case with the "evolvarinfile" argument. So the temporary scratch parameter file needs this line added in and a temporary scratch text file of these indices needs to be created.

minFacVars isn't a slot

Error in checkSlotAssignment(object, name, value) :
"minFacVars" is not a slot in class “bfrmParam”

"evolmaximumperfactors" is not a slot in class "bfrmParam"

fooFactor <- evolve(egfrMat,

  •                 init = as.numeric(topProbeInd),
    
  •                 maxVarIter = 30,
    
  •                 maxFacs = 5,
    
  •                 maxVars = length(topProbeInd))
    
    Error in checkSlotAssignment(object, name, value) :
    "evolmaximumperfactors" is not a slot in class “bfrmParam”

evolve() should take "h-matrix" args

When you inspect the scratch parameters file, you see:
ndesignvariables = 1
ncontrolvariables = 0
nlatentfactors = 1
datafile = /home/[email protected]/scratch/tmp/RtmpwMIy0B/data2c1874b31865.txt
hfile = NA

When you should see:
ncontrolvariables = 5
...
hfile = sometempscratchhfile.txt

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.