Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 766b6821a98ea206fe461d23237bc4a4589c24af authored by Alireza Mahani on 02 November 2022, 10:02:22 UTC, committed by cran-robot on 02 November 2022, 10:02:22 UTC
version 1.2.2
1 parent f1cf3c9
  • Files
  • Changes
  • 19b637c
  • /
  • man
  • /
  • sns.part.Rd
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:766b6821a98ea206fe461d23237bc4a4589c24af
directory badge
swh:1:dir:74a72f703d47498b9464d469286c27be2cbaf248
content badge
swh:1:cnt:38905c46a5a3835fd5969b90ad41c231289f1daf

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
sns.part.Rd
\name{sns.make.part}
\alias{sns.make.part}
\alias{sns.check.part}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Utility Functions for Creating and Validating State Space Partitions
}
\description{
Utility functions for creating and validating state space partitions, to be used in SNS for improving the mixing of sampled chains for high-dimensional posteriors.
}
\usage{
sns.make.part(K, nsubset, method = "naive")
sns.check.part(part, K)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{K}{Dimensionality of state space.}
  \item{nsubset}{Number of subsets to partition the state space dimensions into.}
  \item{method}{Method used for state space partitioning. Currently, only \code{naive} method is implemented, where coordinates are distributed evenly (or as evenly as possible) across subsets.}
  \item{part}{A list of length \code{nsubset}, with each element a vector of integer values, representing the coordinates belonging to a subset. This list is the output of \code{sns.make.part}.}
}

\value{
\code{sns.make.part} produces a list of integer vectors, each containing coordinates belonging to the same subset. \code{sns.check.part} produces a boolean flag, indicating whether or not the partition list is valid or not. The subset members must constitute a mutually-exclusive, collectively-exhaustive set relative to \code{1:K}.
}

\references{
Mahani A.S., Hasan A., Jiang M. &  Sharabiani M.T.A. (2016). Stochastic Newton Sampler: The R Package sns. Journal of Statistical Software, Code Snippets, 74(2), 1-33. doi:10.18637/jss.v074.c02
}

\author{
Alireza S. Mahani, Asad Hasan, Marshall Jiang, Mansour T.A. Sharabiani
}

\seealso{
\code{\link{sns}}, \code{\link{sns.run}}
}

\examples{
# creating a valid partition of a 6-dimensional state space
my.part.valid <- list(c(1,2,3), c(4,5,6))
is.valid.1 <- sns.check.part(my.part.valid, 6)
cat("is partition valid: ", is.valid.1, "\n")

# creating an invalid partition of a 6-dimensional state space
# (coordinate 4 is missing)
my.part.invalid <- list(c(1,2,3), c(5,6))
is.valid.2 <- sns.check.part(my.part.invalid, 6)
cat("is partition valid: ", is.valid.2, "\n")

}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API