Giter VIP home page Giter VIP logo

bsims's Introduction

bsims's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

farcego

bsims's Issues

Use user provided nest locations

Should allow for user provided nest locations. It can be a coercion method that would turn a 2-column matrix or data frame or list into a bsism_population object. Other argument can be a landscape object (use defaults when missing).

Use cases:

  • use real territory mapping
  • use fine scale habitat info (rasters, polygons) to determine nest locations, assuming that these fine scale differences do not impact behavior and observation layers

Add multiple-visit transcription

This would mean to restart counting for each time interval. See qpad-book for implementation (?). Likely we need to isolate counting parts of code to share among transcription options.

Inheritance and methods cleanup

Layer functions should have nested inheritance, get_events, get_detections, get_table should work accordingly.

Add new getters for all user action that would otherwise require knowing the internals:

  • get_abund: get total N
  • get_dens: get avg D=N/A
  • get_area: get total A
  • get_nests: nest locations

Eject settings from Shiny app

Semi-interactive workflow when comparing different options:

  1. use Shiny GUI to explore different options
  2. eject settings from GUI
  3. import different settings
  4. run and replicate simulations under each setting using a wrapper

Wrapper design:

  • 1st arg as (1) bsims object (those settings fixed), (2) settings object as ejected by GUI, or (3) individual arguments
  • use formals to match inputs with bsims_* args
  • return a closure with accessible settings object (object$settings()) and a simulate method (object$run()).

This closure object can be used to be called multiple times for replication like replicate(B, object$run()).

Not quite clear what to store as output (i.e. just table output? -- there is so much more, so maybe this should be left open).

Why is this important?

Because this is how we can make meaningful comparisons.

Rolling list of small things to fix

Default settings with bsims_all should print better:

bi=bsims_all()

r$> bi
bSims wrapper object with settings:
Warning message:
In max(n) : no non-missing arguments to max; returning -Inf

Write tutorial/vignette to the package

Topics:

  • Homogeneous landscape, single realization (take biostat + QPAD book material)
  • Stratified landscape, single realization (needs to be developed)
  • Multiple realizations (QPAD & MV framework for estimation; needs to be developed)

Develop broader simulation framework

It is fine to use a mix of CLI/Shiny to make a bsims_all container object and run many realizations under same settings.

  • Provide print method for bsims_all containers
  • Provide wrapper that interpolates argument values based on a list of values (i.e. single gradient) or over a data frame (a set of value combos)
  • Provide option (function) that gives metric of interest (bias etc) that can be calculated over the sets.

Rethink observer avoidance

Response can be positive, and negative response is also more gradual than currently implemented.

Suggest to remove this option (it is really just a filter applied on the events depending on distance to observer).

A hack can be described as extension, i.e. how to further manipulate objects, but it might be too involved for folks without knowledge of the internals (i.e. that events are in a list of tables, and not in a tidy stacked data frame).

Fuzzy individual clustering

Observed might perceive same individual as multiple ones, and multiple individuals as the same, depending on the spatial distinctness (clustering) of detection events.

One such implementation is using ADPclust:

## fit ADP clustering
library(ADPclust)
## get coords
xy <- do.call(rbind, lapply(1:length(x$events), function(i) {
  cbind(x$events[[i]]$x+x$nests$x[i],x$events[[i]]$y+x$nests$y[i])
}))
## get individual id
i <- do.call(c, lapply(1:length(x$events), function(i)
  rep(i, nrow(x$events[[i]]))))
ad <- adpclust(xy, dmethod = "euclidean")
## number of clusters found
ad$nclust
## classification
tab <- table(inds=i, clust=ad$clusters)

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.