GithubHelp home page GithubHelp logo

basket's People

Contributors

basil-iii avatar hafen avatar kaneplusplus avatar mgen160 avatar zabore avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

basket's Issues

Next step 24Jan19

  1. Incorporate cluster analysis into full_bayes_mcmc()

  2. Organize full_bayes_mcmc() output into 3 lists

    • inputs
    • basketwise output
    • clusterwise output
  3. summary function
    post prob
    hpd
    median
    mean
    ESS

  4. Update function to re-compute posterior prob with new p0

    • basketwise for new p0 vector and alternative input
    • clusterwise for p0 vector of same size as number of cluster and alternative input
  5. Plot function

    • Basket densities
    • Prior, MAP, PEP exist as 1x3 vector
    • Segments HPDs?
  6. Make full_bayes_exact() consistent with full_bayes_mcmc()
    unique to exact = PEP and posterior probability

non-exact calculations in mem_exact

Hi there,

I currently use the mem_exact function a lot for simulations with a relatively small number of baskets (3-5). I noticed that the function only calculates the posterior probabilities exactly, but the posterior mean, median and HPD-intervals are still estimated from MCMC samples. This slows down computation a lot, since 100.000 samples are drawn and there is no way to change this. Drawing the posterior samples takes much longer than calculating the exact posterior probabilities for a small number of baskets.

Is there a specific reason that the rest of the output isn't also calculated exactly? Since the posterior weights are already calculated in the function, it seems that it would be much faster to also calculate the posterior mean and median exactly. It would be awesome if this could be changed!

Cluster Null should default size should be less than the number of clusters

The following code shows that there is one cluster found but there are 3 Nulls (one for each basket). This is confusing.

library(basket)
data(vemu_wide)
baskets <- 1:3
vemu_wide1 <- vemu_wide[baskets,]
mcmc_res1 <- mem_mcmc(
  responses = vemu_wide1$responders,
  size = vemu_wide1$evaluable,
  name = vemu_wide1$baskets,
  p0 = 0.15)
mcmc_res1$cluster$post.prob
mcmc_res1$cluster$p0

Finish SEM implementation

Two things still need to be done for the SEM implementation:

  1. Validate that the package code gives similar results to the reference code.
  2. Add regression testing. This may include creating a reference data set from the data-raw directory.

Use a different color scale for exchangeograms

From the JSS editor:

The diverging color scale in Figure 4 is rather unbalanced and not ideal
for viewers with color vision deficiencies. For example,
grDevices::hcl.colors() offers "Green-Brown" or "Blue-Red 3". But other
packages like RColorBrewer, rcartocolors, colorspace, etc. also offer
alternatives.

mem_mcmc fails with 2 baskets

library(basket)

data(vemu_wide)

baskets <- 1:2

vemu_wide1 <- vemu_wide[baskets,]

mcmc_res1 <- mem_mcmc(
  responses = vemu_wide1$responders,
  size = vemu_wide1$evaluable,
  name = vemu_wide1$baskets,
  p0 = 0.15)

# Results in Error in rep(1, dim(mod.mat[[1]])[1]) : invalid 'times' argument

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.