Giter VIP home page Giter VIP logo

Comments (5)

baddstats avatar baddstats commented on June 1, 2024

Thanks - The number of simulations is specified by nsim, which defaults to 99, so this is not strictly a bug. However I guess what you're saying is that most users would expect 'envelope' to set nsim = length(simulate) when 'simulate' is a list of point patterns and nsim is not given. I guess we can do that. Thanks for pointing it out. A

from spatstat.

baddstats avatar baddstats commented on June 1, 2024

On second thoughts, this might be complicated. Sometimes a second set of simulations is required (eg global=TRUE and X is a point process). Then we want nsim + nsim2 = length(simulate). I'm not sure how to guess the user's intention easily. A

from spatstat.

antiphon avatar antiphon commented on June 1, 2024

In my usecase I want to compute envelopes from the pre-defined set of simulations. This always(?) excludes global =TRUE as

  1. when X is 'ppm' the average can't be guaranteed to be correct for 'simulate'
  2. when X is 'ppp' there is no model specified for deriving the average

from spatstat.

baddstats avatar baddstats commented on June 1, 2024

The following is possible, where the 'simulate' argument has to have 2 * nsim entries:
a <- rStrauss(100, 0.5, 0.05, nsim=38)
E <- envelope(cells, Gest, simulate=a, nsim=19, global=TRUE)

from spatstat.

antiphon avatar antiphon commented on June 1, 2024

imho it would be better behaviour if the nsim and nsim2 would adapt to length(a) . It would solve the original issue, and would not waste patterns as in e.g.

a <- rStrauss(100, 0.5, 0.05, nsim=38)
E <- envelope(cells, Gest, simulate=a, nsim=15, global=TRUE)

which assumes nsim2=nsim and leaves over the 38-15*2=8 patterns. Another reasonable scenario is the case "here's a bunch of patterns, compute the global average from 10 of them", i.e.

E <- envelope(cells, Gest, simulate=a, nsim2=10, global=TRUE)

which crashes as nsim=99 is fixed and nsim+nsim2 > length(a).

from spatstat.

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.