ContinuousTransformations.jl
Continuous transformations from ℝ or ℝⁿ to various open sets
Install / Use
/learn @tpapp/ContinuousTransformations.jlREADME
Deprecation notice
IMPORTANT: this package is now abandoned, please use TransformVariables.jl instead.
ContinuousTransformations
Continuous transformations (or more precisely, homeomorphisms) from ℝ (and two-point compactified version) and ℝⁿ to various open (or closed) sets used in statistics and numerical methods, such as intervals, simplexes, ordered vectors.
Work in progress, API may change without notice.
Overview
This package was born because I was tired of coding the same transformations over and over, with occasional bugs, and wanted something well-tested.
Transformations defined by the package can be
- called as functions,
- provide the
logjac(transformation, x)method for the log Jacobian determinant, - prodide the
inverse(transformation, x)method for the inverse.
Log jacobian determinants and their log are useful for domain transformations in MCMC, among other things.
In addition, the package includes types to represent intervals, and some basic methods of working with them. The concept of intervals is slightly different from IntervalSet.jl and ValidatedNumerics.jl, and as a result not compatible with either.
The convenience function bridge(dom, img) figures out the right transformation from dom to img. Currently implemented for intervals.
Examples:
using ContinuousTransformations
t = bridge(ℝ, Segment(0.0, 3.0)) # will use a real-circle transformation, stretched
t(0.0) # 1.5
inverse(t, 1.5) # ≈ 0.0
logjac(t, 0) # ≈ 0.405
image(t) # Segment(0.0, 3.0)
ArrayTransformation(transformation, dimensions...) transforms a vector of numbers to an array elementwise using transformation.
TransformationTuple(transformations) can be used for heterogeneous collections of transformations.
TransformLogLikelihood wraps a log likelihood function, and TransformDistribution transforms a distribution. Both of them take care of the log Jacobian determinant adjustment.
Special transformations, useful for Bayesian methods, are also available (WIP). Feature and pull requests are appreciated.
Bibliography
-
Stan Development Team (2017). "Modeling Language User's Guide and Reference Manual, Version 2.17.0" (pdf)
-
Lewandowski, Daniel, Dorota Kurowicka, and Harry Joe. "Generating random correlation matrices based on vines and extended onion method." Journal of multivariate analysis 100.9 (2009): 1989–2001.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
