Code Monkey home page Code Monkey logo

Comments (2)

haziqj avatar haziqj commented on August 16, 2024

Just some ideas:

If have a p-dimensional covariate called multx and additional some other unidimensional covariate x, then maybe can run in two separate models then combine. Use some option (I don't know what to call it yet) run=F so the EM doesn't actually run, but perhaps only stores the kernels for example.

mod1 <- iprior(y ~ multx, one.lam=T, run=F)
mod2 <- iprior(y ~ x, run=F)
mod <- combine.iprior(mod1, mod2)

The function combine.iprior does the actual running of the EM, and all that is really needed is the kernel matrices which was specified in mod1 and mod2. The number of lambdas has also already been determined correctly, because each of the models were specified individually.

This may be a more tedious multistage approach to running the model. But the advantages are:

  • R's data frame are not able to handle multidimensional covariates. We would need to use arrays or list, which are a bit clumsy to manipulate and prone to errors (might confuse the dimensions).
  • As automatic handling of multidimensional covariates are out of the question, we need to resort to some way of specifying these multidimensional covariates. Something along the lines of lambda=c(1,1,1,1,1,2,3) for example, to say that the first five covariates share the same lambda while the sixth and seventh have their own scale parameters. I would prefer to avoid this method if possible as it can get really messy if there are a lot of covariates involved. Although I am not ruling this out. Further thought and discussion needed. NOTE: Relates to issue #13
  • This multistage approach allows an existing model to be updated by adding (an) additional covariates. So we get this bonus feature for "free".

from iprior.

haziqj avatar haziqj commented on August 16, 2024

Latest release has this feature. Will write about it in the wiki soon.

from iprior.

Related Issues (20)

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.