hmer

An R package for Bayes Linear emulation and history matching.

https://github.com/andy-iskauskas/hmer

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (20.3%) to scientific vocabulary

Keywords

cran r r-package
Last synced: 10 months ago · JSON representation

Repository

An R package for Bayes Linear emulation and history matching.

Basic Info
  • Host: GitHub
  • Owner: andy-iskauskas
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 51.7 MB
Statistics
  • Stars: 16
  • Watchers: 3
  • Forks: 3
  • Open Issues: 6
  • Releases: 8
Topics
cran r r-package
Created about 5 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# hmer 


[![R-CMD-check](https://github.com/andy-iskauskas/hmer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/andy-iskauskas/hmer/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/hmer)](https://CRAN.R-project.org/package=hmer)
[![Codecov test coverage](https://codecov.io/gh/andy-iskauskas/hmer/branch/master/graph/badge.svg)](https://app.codecov.io/gh/andy-iskauskas/hmer?branch=master)
[![](https://cranlogs.r-pkg.org/badges/grand-total/hmer?color=blue)](https://cran.r-project.org/package=hmer)
[![](https://cranlogs.r-pkg.org/badges/last-week/hmer?color=yellow)](https://cran.r-project.org/package=hmer)


## Overview

The goal of hmer is to make the process of history matching and emulation accessible and easily usable by modellers, particularly in epidemiology. The central object of the process is an `Emulator`: a statistical approximation for the output of a complex (and often expensive) model that, given a relatively small number of model evaluations, can give predictions of the model output at unseen points with the appropriate uncertainty built-in. Using these we may follow a process of 'history matching', where unfeasible parts of the parameter space are ruled out. Sampling parameter sets from the remaining region allows us to train more accurate emulators, which allow us to remove more of the space, and so on. The hmer package contains tools for the automated construction of emulators, visualisations for diagnostic checks and exploration of parameter space, and a means by which new points can be proposed.

## Installation

You can install the development version of hmer from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("andy-iskauskas/hmer")
```

## Example

The three core functions of the package are called below, using built-in toy data.


```{r example}
library(hmer)
## Train a set of emulators to data
ems <- emulator_from_data(input_data = SIRSample$training,
                          output_names = names(SIREmulators$targets),
                          ranges = list(aSI = c(0.1, 0.8), aIR = c(0, 0.5), aSR = c(0, 0.05)))
## Perform diagnostics on the emulators
validation <- validation_diagnostics(ems, SIREmulators$targets, SIRSample$validation, plt = FALSE)
## Propose new points from the emulators
new_points <- generate_new_design(ems, 50, SIREmulators$targets)
```

## Learning Emulation and History Matching

There is a wealth of published information on Bayes Linear emulation, history matching, and the more general framework of uncertainty quantification, upon which this package is based. The easiest way to learn how to use the hmer package, however, is to look through the vignettes within.

```{r vignettes, eval = FALSE}
browseVignettes("hmer")
vignette("low-dimensional-examples", package = 'hmer')
```

- Low-dimensional examples `low-dimensional-examples` introduces the basics of emulation and history matching and how to use `hmer` in some low-dimensional toy models;

- Demonstration `demonstrating-the-hmer-package` serves as a broad overview of most of the functions in the package;

- Stochastic and Bimodal Emulation `stochasticandbimodalemulation` introduces the basics of dealing with stochastic systems, and identifying bimodality;

- The "Emulation Handbook" `emulationhandbook` details some common problems and considerations that occur when using the framework, and serves as a broad FAQ for problems encountered.

Owner

  • Name: Andy Iskauskas
  • Login: andy-iskauskas
  • Kind: user
  • Location: Durham, UK
  • Company: Durham University

Assistant Professor at Durham University; statistician, coder and e-assessment obsessive.

GitHub Events

Total
  • Issues event: 1
  • Issue comment event: 2
  • Push event: 10
Last Year
  • Issues event: 1
  • Issue comment event: 2
  • Push event: 10

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 163
  • Total Committers: 3
  • Avg Commits per committer: 54.333
  • Development Distribution Score (DDS): 0.086
Top Committers
Name Email Commits
tandethsquire a****s@g****m 149
Andrew Iskauskas t****8@w****k 13
Andy Iskauskas a****y@A****d 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 11
  • Total pull requests: 6
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 6
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • andy-iskauskas (4)
  • johnpaulgosling (3)
  • cliffckerr (1)
  • pkubruce (1)
  • tjmckinley (1)
  • jfunction (1)
Pull Request Authors
  • tjmckinley (4)
Top Labels
Issue Labels
enhancement (5) good first issue (2) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 565 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 8
  • Total maintainers: 1
cran.r-project.org: hmer

History Matching and Emulation Package

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 565 Last month
Rankings
Stargazers count: 15.1%
Forks count: 17.0%
Dependent repos count: 23.8%
Dependent packages count: 28.6%
Average: 29.7%
Downloads: 64.0%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.0.0 depends
  • GGally * imports
  • MASS * imports
  • R6 * imports
  • ggplot2 * imports
  • isoband * imports
  • lhs * imports
  • mclust * imports
  • mvtnorm * imports
  • purrr * imports
  • rlang * imports
  • stringr * imports
  • tidyr * imports
  • viridis * imports
  • covr * suggests
  • deSolve * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/check-standard.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite