This document summarizes an R package called bayesImageS that enables Bayesian computation for medical image segmentation using a hidden Potts model. It discusses the statistical model, which involves a hidden Markov random field with a Potts prior on the latent labels. Bayesian computation methods like Gibbs sampling and Metropolis-Hastings using pseudolikelihood approximation are implemented in C++ for efficiency. Experimental results demonstrate the package on a CT electron density phantom and patient radiotherapy data.
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...Matt Moores
There are many approaches to Bayesian computation with intractable likelihoods, including the exchange algorithm, approximate Bayesian computation (ABC), thermodynamic integration, and composite likelihood. These approaches vary in accuracy as well as scalability for datasets of significant size. The Potts model is an example where such methods are required, due to its intractable normalising constant. This model is a type of Markov random field, which is commonly used for image segmentation. The dimension of its parameter space increases linearly with the number of pixels in the image, making this a challenging application for scalable Bayesian computation. My talk will introduce various algorithms in the context of the Potts model and describe their implementation in C++, using OpenMP for parallelism. I will also discuss the process of releasing this software as an open source R package on the CRAN repository.
Bayesian Inference and Uncertainty Quantification for Inverse ProblemsMatt Moores
So-called “inverse” problems arise when the parameters of a physical system cannot be directly observed. The mapping between these latent parameters and the space of noisy observations is represented as a mathematical model, often involving a system of differential equations. We seek to infer the parameter values that best fit our observed data. However, it is also vital to obtain accurate quantification of the uncertainty involved with these parameters, particularly when the output of the model will be used for forecasting. Bayesian inference provides well-calibrated uncertainty estimates, represented by the posterior distribution over the parameters. In this talk, I will give a brief introduction to Markov chain Monte Carlo (MCMC) algorithms for sampling from the posterior distribution and describe how they can be combined with numerical solvers for the forward model. We apply these methods to two examples of ODE models: growth curves in ecology, and thermogravimetric analysis (TGA) in chemistry. This is joint work with Matthew Berry, Mark Nelson, Brian Monaghan and Raymond Longbottom.
Topic modeling with Poisson factorization (2)Tomonari Masada
A modified version of the manuscript Published on Feb 3, 2017.
1. Use a gamma prior for $r_k$.
2. Use the same shape parameter $s$ for all gamma distributions.
Topic modeling with Poisson factorization is introduced. The generative model assumes words in documents are generated from topics modeled with Poisson distributions. Variational Bayesian inference is used to approximate the posterior. Update equations are derived for the variational parameters ω, representing topic assignments, α, the Dirichlet prior, and γ, the gamma prior over topic distributions. ω is updated proportionally to functions of α and γ. α is updated based on sums of ω. γ is updated based on sums of ω and the prior shape parameter.
This document summarizes a presentation on graph kernels in chemoinformatics. It discusses using graph kernels to measure similarity between molecular graphs to analyze large families of structural and numerical objects. Specific graph kernels discussed include the treelets kernel, which extracts small labeled subtrees from graphs, and kernels based on cyclic similarity, which analyze relevant cycles in molecules. The treelets kernel is shown to outperform other graph kernels and molecular descriptors in predicting boiling points of molecules.
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...Matt Moores
There are many approaches to Bayesian computation with intractable likelihoods, including the exchange algorithm, approximate Bayesian computation (ABC), thermodynamic integration, and composite likelihood. These approaches vary in accuracy as well as scalability for datasets of significant size. The Potts model is an example where such methods are required, due to its intractable normalising constant. This model is a type of Markov random field, which is commonly used for image segmentation. The dimension of its parameter space increases linearly with the number of pixels in the image, making this a challenging application for scalable Bayesian computation. My talk will introduce various algorithms in the context of the Potts model and describe their implementation in C++, using OpenMP for parallelism. I will also discuss the process of releasing this software as an open source R package on the CRAN repository.
Bayesian Inference and Uncertainty Quantification for Inverse ProblemsMatt Moores
So-called “inverse” problems arise when the parameters of a physical system cannot be directly observed. The mapping between these latent parameters and the space of noisy observations is represented as a mathematical model, often involving a system of differential equations. We seek to infer the parameter values that best fit our observed data. However, it is also vital to obtain accurate quantification of the uncertainty involved with these parameters, particularly when the output of the model will be used for forecasting. Bayesian inference provides well-calibrated uncertainty estimates, represented by the posterior distribution over the parameters. In this talk, I will give a brief introduction to Markov chain Monte Carlo (MCMC) algorithms for sampling from the posterior distribution and describe how they can be combined with numerical solvers for the forward model. We apply these methods to two examples of ODE models: growth curves in ecology, and thermogravimetric analysis (TGA) in chemistry. This is joint work with Matthew Berry, Mark Nelson, Brian Monaghan and Raymond Longbottom.
Topic modeling with Poisson factorization (2)Tomonari Masada
A modified version of the manuscript Published on Feb 3, 2017.
1. Use a gamma prior for $r_k$.
2. Use the same shape parameter $s$ for all gamma distributions.
Topic modeling with Poisson factorization is introduced. The generative model assumes words in documents are generated from topics modeled with Poisson distributions. Variational Bayesian inference is used to approximate the posterior. Update equations are derived for the variational parameters ω, representing topic assignments, α, the Dirichlet prior, and γ, the gamma prior over topic distributions. ω is updated proportionally to functions of α and γ. α is updated based on sums of ω. γ is updated based on sums of ω and the prior shape parameter.
This document summarizes a presentation on graph kernels in chemoinformatics. It discusses using graph kernels to measure similarity between molecular graphs to analyze large families of structural and numerical objects. Specific graph kernels discussed include the treelets kernel, which extracts small labeled subtrees from graphs, and kernels based on cyclic similarity, which analyze relevant cycles in molecules. The treelets kernel is shown to outperform other graph kernels and molecular descriptors in predicting boiling points of molecules.
This document provides an overview of graph edit distance, including its definition, history, and algorithms. It begins by defining an edit path as a sequence of node/edge insertions, deletions, and substitutions that transforms one graph into another. The graph edit distance is the cost of the lowest cost edit path. It describes tree search algorithms used to explore the space of possible edit paths efficiently. It also explains how edit paths can be modeled as assignment problems that are solved using techniques like the Hungarian algorithm to find approximations of the graph edit distance.
1) The document describes methods for optimizing the widths of radial basis functions in regression analysis models.
2) It presents an efficient computational method for re-estimating the regularization parameter based on generalized cross-validation that utilizes eigendecomposition.
3) The method is also extended to optimize the basis function width by testing multiple trial values and selecting the width with the smallest cross-validation value. Testing on practical problems showed the method improved prediction performance over fixed-width approaches.
To describe the dynamics taking place in networks that structurally change over time, we propose an approach to search for attributes whose value changes impact the topology of the graph. In several applications, it appears that the variations of a group of attributes are often followed by some structural changes in the graph that one may assume they generate. We formalize the triggering pattern discovery problem as a method jointly rooted in sequence mining and graph analysis. We apply our approach on three real-world dynamic graphs of different natures - a co-authoring network, an airline network, and a social bookmarking system - assessing the relevancy of the triggering pattern mining approach.
Transceiver design for single-cell and multi-cell downlink multiuser MIMO sys...T. E. BOGALE
The document outlines a presentation on transceiver design for single-cell and multi-cell downlink multiuser MIMO systems. It discusses MSE uplink-downlink duality under imperfect CSI, showing that the sum MSE, user MSE, and symbol MSE are dual between the uplink and downlink channels. It demonstrates how to ensure the uplink and downlink MSE values are equal to each other by appropriately setting the transmit covariance matrices. The presentation also covers transceiver design algorithms for coordinated base station systems and generalized duality for multiuser MIMO systems.
Positive and negative solutions of a boundary value problem for a fractional ...journal ijrtem
: In this work, we study a boundary value problem for a fractional
q, -difference equation. By
using the monotone iterative technique and lower-upper solution method, we get the existence of positive or
negative solutions under the nonlinear term is local continuity and local monotonicity. The results show that we
can construct two iterative sequences for approximating the solutions
Stationary Incompressible Viscous Flow Analysis by a Domain Decomposition MethodADVENTURE Project
This document describes an iterative domain decomposition method for analyzing large-scale stationary incompressible viscous flow problems using finite element analysis. The method decomposes the domain into subdomains and solves the inner degrees of freedom using a skyline solver. Interface degrees of freedom are solved using preconditioned BiCGSTAB or GPBiCG iterative solvers. Numerical examples are provided to demonstrate the method on problems with over 1 million degrees of freedom and compare results to a monolithic finite element method solver.
1. Motivation: why do we need low-rank tensors
2. Tensors of the second order (matrices)
3. CP, Tucker and tensor train tensor formats
4. Many classical kernels have (or can be approximated in ) low-rank tensor format
5. Post processing: Computation of mean, variance, level sets, frequency
TopicRNN is a generative model for documents that:
1. Draws a topic vector from a standard normal distribution and uses it to generate words in a document.
2. Computes a lower bound on the log marginal likelihood of words and stop word indicators.
3. Approximates the expected values in the lower bound using samples from an inference network that models the approximate posterior distribution over topics.
The document describes research into primality tests for specific classes of numbers. It presents 6 conjectures relating to primality tests for numbers of the form N = k*b^n - c or N = k*b^n + c, where b, k, n, and c meet certain criteria. It then attempts to prove the conjectures by relating them to Lucas sequences. The proof analyzes how the Lucas sequences behave modulo N depending on whether N is congruent to 1 or 3 (mod 8). It shows that the conjectures are true based on the behavior of the Lucas sequences. The document also presents some basic lemmas and theorems relating to Lucas sequences and defines the sequences to be used.
The document discusses shortest path algorithms for weighted graphs. It introduces Dijkstra's algorithm and the Bellman-Ford algorithm for finding shortest paths. Dijkstra's algorithm works for graphs with non-negative edge weights, while Bellman-Ford can handle graphs with negative edge weights. The document also describes how to find shortest paths in directed acyclic graphs and compute all-pairs shortest paths.
This document summarizes the derivation of an evidence lower bound (ELBO) for latent LSTM allocation, a model that uses an LSTM to determine topic assignments in a topic modeling framework. It expresses the ELBO as terms related to the variational posterior distributions over topics and topics proportions, the generative process of words given topics, and the LSTM's prediction of topic assignments. It also describes how to optimize the ELBO with respect to the variational and LSTM parameters through gradient ascent.
The Goldberg-Coxeter construction takes two integers (k,l) a 3-or 4-valent plane graph and returns a 3- or 4-valent plane graph. This construction is useful in virus study, numerical analysis, architecture, chemistry and of course mathematics.
Here we consider the zigzags and central circuits of 3- or 4-valent plane graph. It turns out that we can define an algebraic construction of (k,l)-product that allows to find the length of the zigzags and central circuits in a compact way. All possible lengths of zigzags are determined by this (k,l)-product and the normal structure of the automorphism group allows to find them for some congruence conditions.
Coordinate sampler: A non-reversible Gibbs-like samplerChristian Robert
This document describes a new MCMC method called the Coordinate Sampler. It is a non-reversible Gibbs-like sampler based on a piecewise deterministic Markov process (PDMP). The Coordinate Sampler generalizes the Bouncy Particle Sampler by making the bounce direction partly random and orthogonal to the gradient. It is proven that under certain conditions, the PDMP induced by the Coordinate Sampler has a unique invariant distribution of the target distribution multiplied by a uniform auxiliary variable distribution. The Coordinate Sampler is also shown to exhibit geometric ergodicity, an important convergence property, under additional regularity conditions on the target distribution.
This document describes the Kumaraswamy generalized (Kw-G) distribution, a new family of continuous probability distributions defined on the interval (0,1). The Kw-G distribution is constructed by applying the Kumaraswamy distribution to an existing parent distribution with cumulative distribution function G(x). Properties of the Kw-G distribution such as its probability density function, moments, order statistics, and L-moments are expressed in terms of the parent distribution G(x). Several special cases of the Kw-G distribution are also discussed, including the Kw-normal, Kw-Weibull, and Kw-gamma distributions.
This document discusses using the Wasserstein distance for inference in generative models. It begins by introducing ABC methods that use a distance between samples to compare observed and simulated data. It then discusses using the Wasserstein distance as an alternative distance metric that has lower variance than the Euclidean distance. The document covers computational aspects of calculating the Wasserstein distance, asymptotic properties of minimum Wasserstein estimators, and applications to time series data.
Accelerating Collapsed Variational Bayesian Inference for Latent Dirichlet Al...Tomonari Masada
1. The document discusses accelerating collapsed variational Bayesian inference for latent Dirichlet allocation (CVB) using Nvidia CUDA compatible GPU devices.
2. It describes parallelizing CVB for LDA by assigning different topics to different GPU threads. This achieves near-linear speedup compared to a single-threaded CPU implementation.
3. Experiments on text and image datasets demonstrate that the GPU implementation provides faster inference over the CPU version, though data transfer latency and memory limits remain challenges for large-scale problems.
This document contains a 30 question mid-semester exam for a data structures and algorithms course. The exam covers topics like asymptotic analysis, sorting algorithms, hashing, binary search trees, and recursion. It provides multiple choice questions to test understanding of algorithm time complexities, worst-case inputs, and recursive functions. Students are instructed to attempt all questions in the 2 hour time limit and notify the proctor if any electronic devices other than calculators are used.
This document discusses algorithms for solving the feedback vertex set problem, which aims to find the minimum number of nodes that need to be removed from a graph to make it acyclic. It describes several algorithms including a naive algorithm, fixed parameter tractable algorithm, 2-approximation algorithm, disjoint feedback vertex set algorithm, and randomized algorithm. For each algorithm, it provides definitions, pseudocode, and an example to illustrate how it works. The document concludes that this problem remains an active area of research to develop more efficient algorithms.
This document summarizes a research paper titled "Fast Image Tagging" presented at ICML2013. The paper proposes a new method called FastTag that can quickly and accurately tag images with relevant keywords. FastTag learns a mapping from image features to a completed tag set by simultaneously training two classifiers - one to predict the complete tag set from images, and another to enrich existing sparse tags. It uses a marginalized blank-out regularization technique to guide the learning without needing corrupted training data. Experiments show FastTag achieves state-of-the-art accuracy on par with previous best methods but with faster training and testing times.
- The document summarizes Matthew Moores' PhD research on developing Bayesian computational methods for spatial analysis of medical and satellite images.
- The objectives are to develop a generative image model incorporating prior information, implement it computationally efficiently, and apply it to radiotherapy and remote sensing data.
- Challenges include intractable likelihoods, which are addressed through approximate Bayesian computation and sequential Monte Carlo with pre-computation.
- The research aims to classify pixels in medical and satellite images according to tissue type or land use by incorporating informative priors.
Photoacoustic tomography based on the application of virtual detectorsIAEME Publication
This document discusses using virtual detectors to improve photoacoustic tomography (PAT) image reconstruction when full scanning data is unavailable. It proposes interpolation and compressed sensing methods to generate virtual detector data and increase the number of measurements. Simulation results show applying these methods to preprocessed photoacoustic data significantly improves the peak signal-to-noise ratio of reconstructed images compared to direct reconstruction with limited detectors. Dictionary-based compressed sensing provides the best performance by learning an over-complete dictionary to sparsify signals. The methods allow better quality PAT imaging when hardware and spatial constraints limit actual detector positions and sampling angles.
This document provides an overview of graph edit distance, including its definition, history, and algorithms. It begins by defining an edit path as a sequence of node/edge insertions, deletions, and substitutions that transforms one graph into another. The graph edit distance is the cost of the lowest cost edit path. It describes tree search algorithms used to explore the space of possible edit paths efficiently. It also explains how edit paths can be modeled as assignment problems that are solved using techniques like the Hungarian algorithm to find approximations of the graph edit distance.
1) The document describes methods for optimizing the widths of radial basis functions in regression analysis models.
2) It presents an efficient computational method for re-estimating the regularization parameter based on generalized cross-validation that utilizes eigendecomposition.
3) The method is also extended to optimize the basis function width by testing multiple trial values and selecting the width with the smallest cross-validation value. Testing on practical problems showed the method improved prediction performance over fixed-width approaches.
To describe the dynamics taking place in networks that structurally change over time, we propose an approach to search for attributes whose value changes impact the topology of the graph. In several applications, it appears that the variations of a group of attributes are often followed by some structural changes in the graph that one may assume they generate. We formalize the triggering pattern discovery problem as a method jointly rooted in sequence mining and graph analysis. We apply our approach on three real-world dynamic graphs of different natures - a co-authoring network, an airline network, and a social bookmarking system - assessing the relevancy of the triggering pattern mining approach.
Transceiver design for single-cell and multi-cell downlink multiuser MIMO sys...T. E. BOGALE
The document outlines a presentation on transceiver design for single-cell and multi-cell downlink multiuser MIMO systems. It discusses MSE uplink-downlink duality under imperfect CSI, showing that the sum MSE, user MSE, and symbol MSE are dual between the uplink and downlink channels. It demonstrates how to ensure the uplink and downlink MSE values are equal to each other by appropriately setting the transmit covariance matrices. The presentation also covers transceiver design algorithms for coordinated base station systems and generalized duality for multiuser MIMO systems.
Positive and negative solutions of a boundary value problem for a fractional ...journal ijrtem
: In this work, we study a boundary value problem for a fractional
q, -difference equation. By
using the monotone iterative technique and lower-upper solution method, we get the existence of positive or
negative solutions under the nonlinear term is local continuity and local monotonicity. The results show that we
can construct two iterative sequences for approximating the solutions
Stationary Incompressible Viscous Flow Analysis by a Domain Decomposition MethodADVENTURE Project
This document describes an iterative domain decomposition method for analyzing large-scale stationary incompressible viscous flow problems using finite element analysis. The method decomposes the domain into subdomains and solves the inner degrees of freedom using a skyline solver. Interface degrees of freedom are solved using preconditioned BiCGSTAB or GPBiCG iterative solvers. Numerical examples are provided to demonstrate the method on problems with over 1 million degrees of freedom and compare results to a monolithic finite element method solver.
1. Motivation: why do we need low-rank tensors
2. Tensors of the second order (matrices)
3. CP, Tucker and tensor train tensor formats
4. Many classical kernels have (or can be approximated in ) low-rank tensor format
5. Post processing: Computation of mean, variance, level sets, frequency
TopicRNN is a generative model for documents that:
1. Draws a topic vector from a standard normal distribution and uses it to generate words in a document.
2. Computes a lower bound on the log marginal likelihood of words and stop word indicators.
3. Approximates the expected values in the lower bound using samples from an inference network that models the approximate posterior distribution over topics.
The document describes research into primality tests for specific classes of numbers. It presents 6 conjectures relating to primality tests for numbers of the form N = k*b^n - c or N = k*b^n + c, where b, k, n, and c meet certain criteria. It then attempts to prove the conjectures by relating them to Lucas sequences. The proof analyzes how the Lucas sequences behave modulo N depending on whether N is congruent to 1 or 3 (mod 8). It shows that the conjectures are true based on the behavior of the Lucas sequences. The document also presents some basic lemmas and theorems relating to Lucas sequences and defines the sequences to be used.
The document discusses shortest path algorithms for weighted graphs. It introduces Dijkstra's algorithm and the Bellman-Ford algorithm for finding shortest paths. Dijkstra's algorithm works for graphs with non-negative edge weights, while Bellman-Ford can handle graphs with negative edge weights. The document also describes how to find shortest paths in directed acyclic graphs and compute all-pairs shortest paths.
This document summarizes the derivation of an evidence lower bound (ELBO) for latent LSTM allocation, a model that uses an LSTM to determine topic assignments in a topic modeling framework. It expresses the ELBO as terms related to the variational posterior distributions over topics and topics proportions, the generative process of words given topics, and the LSTM's prediction of topic assignments. It also describes how to optimize the ELBO with respect to the variational and LSTM parameters through gradient ascent.
The Goldberg-Coxeter construction takes two integers (k,l) a 3-or 4-valent plane graph and returns a 3- or 4-valent plane graph. This construction is useful in virus study, numerical analysis, architecture, chemistry and of course mathematics.
Here we consider the zigzags and central circuits of 3- or 4-valent plane graph. It turns out that we can define an algebraic construction of (k,l)-product that allows to find the length of the zigzags and central circuits in a compact way. All possible lengths of zigzags are determined by this (k,l)-product and the normal structure of the automorphism group allows to find them for some congruence conditions.
Coordinate sampler: A non-reversible Gibbs-like samplerChristian Robert
This document describes a new MCMC method called the Coordinate Sampler. It is a non-reversible Gibbs-like sampler based on a piecewise deterministic Markov process (PDMP). The Coordinate Sampler generalizes the Bouncy Particle Sampler by making the bounce direction partly random and orthogonal to the gradient. It is proven that under certain conditions, the PDMP induced by the Coordinate Sampler has a unique invariant distribution of the target distribution multiplied by a uniform auxiliary variable distribution. The Coordinate Sampler is also shown to exhibit geometric ergodicity, an important convergence property, under additional regularity conditions on the target distribution.
This document describes the Kumaraswamy generalized (Kw-G) distribution, a new family of continuous probability distributions defined on the interval (0,1). The Kw-G distribution is constructed by applying the Kumaraswamy distribution to an existing parent distribution with cumulative distribution function G(x). Properties of the Kw-G distribution such as its probability density function, moments, order statistics, and L-moments are expressed in terms of the parent distribution G(x). Several special cases of the Kw-G distribution are also discussed, including the Kw-normal, Kw-Weibull, and Kw-gamma distributions.
This document discusses using the Wasserstein distance for inference in generative models. It begins by introducing ABC methods that use a distance between samples to compare observed and simulated data. It then discusses using the Wasserstein distance as an alternative distance metric that has lower variance than the Euclidean distance. The document covers computational aspects of calculating the Wasserstein distance, asymptotic properties of minimum Wasserstein estimators, and applications to time series data.
Accelerating Collapsed Variational Bayesian Inference for Latent Dirichlet Al...Tomonari Masada
1. The document discusses accelerating collapsed variational Bayesian inference for latent Dirichlet allocation (CVB) using Nvidia CUDA compatible GPU devices.
2. It describes parallelizing CVB for LDA by assigning different topics to different GPU threads. This achieves near-linear speedup compared to a single-threaded CPU implementation.
3. Experiments on text and image datasets demonstrate that the GPU implementation provides faster inference over the CPU version, though data transfer latency and memory limits remain challenges for large-scale problems.
This document contains a 30 question mid-semester exam for a data structures and algorithms course. The exam covers topics like asymptotic analysis, sorting algorithms, hashing, binary search trees, and recursion. It provides multiple choice questions to test understanding of algorithm time complexities, worst-case inputs, and recursive functions. Students are instructed to attempt all questions in the 2 hour time limit and notify the proctor if any electronic devices other than calculators are used.
This document discusses algorithms for solving the feedback vertex set problem, which aims to find the minimum number of nodes that need to be removed from a graph to make it acyclic. It describes several algorithms including a naive algorithm, fixed parameter tractable algorithm, 2-approximation algorithm, disjoint feedback vertex set algorithm, and randomized algorithm. For each algorithm, it provides definitions, pseudocode, and an example to illustrate how it works. The document concludes that this problem remains an active area of research to develop more efficient algorithms.
This document summarizes a research paper titled "Fast Image Tagging" presented at ICML2013. The paper proposes a new method called FastTag that can quickly and accurately tag images with relevant keywords. FastTag learns a mapping from image features to a completed tag set by simultaneously training two classifiers - one to predict the complete tag set from images, and another to enrich existing sparse tags. It uses a marginalized blank-out regularization technique to guide the learning without needing corrupted training data. Experiments show FastTag achieves state-of-the-art accuracy on par with previous best methods but with faster training and testing times.
- The document summarizes Matthew Moores' PhD research on developing Bayesian computational methods for spatial analysis of medical and satellite images.
- The objectives are to develop a generative image model incorporating prior information, implement it computationally efficiently, and apply it to radiotherapy and remote sensing data.
- Challenges include intractable likelihoods, which are addressed through approximate Bayesian computation and sequential Monte Carlo with pre-computation.
- The research aims to classify pixels in medical and satellite images according to tissue type or land use by incorporating informative priors.
Photoacoustic tomography based on the application of virtual detectorsIAEME Publication
This document discusses using virtual detectors to improve photoacoustic tomography (PAT) image reconstruction when full scanning data is unavailable. It proposes interpolation and compressed sensing methods to generate virtual detector data and increase the number of measurements. Simulation results show applying these methods to preprocessed photoacoustic data significantly improves the peak signal-to-noise ratio of reconstructed images compared to direct reconstruction with limited detectors. Dictionary-based compressed sensing provides the best performance by learning an over-complete dictionary to sparsify signals. The methods allow better quality PAT imaging when hardware and spatial constraints limit actual detector positions and sampling angles.
Pre-computation for ABC in image analysisMatt Moores
MCMSki IV (the 5th IMS-ISBA joint meeting)
January 2014
Chamonix Mont-Blanc, France
The associated journal article has now been uploaded to arXiv: http://arxiv.org/abs/1403.4359
This document proposes using machine learning techniques to predict COVID-19 infections based on chest x-ray images. Specifically, it involves using discrete wavelet transform to extract space-frequency features from chest x-rays, reducing the dimensionality of features using Shannon entropy, and then training standard machine learning classifiers like logistic regression, support vector machine, decision tree, and convolutional neural network on the extracted features to classify images as COVID-19 positive or negative. The document provides background on the proposed techniques of discrete wavelet transform, entropy, and various machine learning models.
This document describes the dcemriS4 package for analyzing dynamic contrast-enhanced MRI (DCE-MRI) data in R. It discusses DCE-MRI data acquisition and processing steps like motion correction, T1 relaxation mapping, and extracting arterial input functions. Parameter estimation methods like nonlinear regression and Bayesian approaches are covered. The package facilitates kinetic modeling and parameter estimation for DCE-MRI as well as visualization and statistical analysis. Future directions include multi-compartment models, parallelization, and semi-parametric analysis methods.
Bayesian modelling and computation for Raman spectroscopyMatt Moores
Raman spectroscopy can be used to identify molecules by the characteristic scattering of light from a laser. Each Raman-active dye label has a unique spectral signature, comprised by the locations and amplitudes of the peaks. The Raman spectrum is discretised into a multivariate observation that is highly collinear, hence it lends itself to a reduced-rank representation. We introduce a sequential Monte Carlo (SMC) algorithm to separate this signal into a series of peaks plus a smoothly-varying baseline, corrupted by additive white noise. By incorporating this representation into a Bayesian functional regression, we can quantify the relationship between dye concentration and peak intensity. We also estimate the model evidence using SMC to investigate long-range dependence between peaks. These methods have been implemented as an R package, using RcppEigen and OpenMP.
Image quality assessment and statistical evaluationDocumentStory
This document discusses image quality assessment and statistical evaluation of remote sensing data. It explains that remote sensing data can contain errors introduced by the environment, sensor issues, or processing errors. Assessing image quality and statistical characteristics is important and can be done by examining histograms, pixel values, and univariate and multivariate statistics to identify anomalies or redundancy in the data. The document also provides mathematical notation for describing remote sensing data and discusses concepts like populations, samples, sampling error, and the importance of metadata for image analysis.
Data Driven Choice of Threshold in Cepstrum Based Spectrum Estimatesipij
The technique of cepstrum thresholding, which is shown to be an effective, yet simple, way of obtaining a smoothed non parametric spectrum estimate of a stationary signal. The major problem of this method is the choice of the threshold value for variance reduction of spectrum estimates. This paper proposes a new threshold selection method which is based on cross validation schemes such as Leave-One-Out, LeaveTwo-Out and Leave-Half-Out. This new methods are easy to describe, simple to implement, and does not impose severe conditions on the unknown spectrum. Numerical results suggest that this new methods are shown to be in agreement with those obtained when the spectrum is fully known.
Precomputation for SMC-ABC with undirected graphical modelsMatt Moores
This document presents a method for improving the scalability of approximate Bayesian computation (ABC) for latent graphical models like the hidden Potts model used in image analysis. It does this by pre-computing an auxiliary model that approximates the relationship between model parameters and summary statistics, avoiding the need to simulate pseudo-data during ABC model fitting. Experimental results on both simulated and satellite image data show the method reduces ABC runtime from weeks to hours while maintaining accuracy of parameter estimates.
A Quantitative Comparative Study of Analytical and Iterative Reconstruction T...CSCJournals
A special image restoration problem is the reconstruction of image from projections – a problem of immense importance in medical imaging, computed tomography and non-destructive testing of objects. This is a problem where a two – dimensional (or higher) object is reconstructed from several one –dimensional projections [1]. The reconstruction techniques are broadly classified into three categories, analytical, iterative, and statistical [2]. The comparative study among these is of great importance in the field of medical imaging. This paper aims at comparative study by analyzing quantitatively the quality of image reconstructed by analytical and iterative techniques. Projections (parallel beam type) for the reconstruction are calculated analytically by defining Shepp logan phantom head model with coverage angle ranging from 0 to ±180o with rotational increment of 2o to 10o. For iterative reconstruction coverage angle of ±90o, iteration up to 10 is used. The original image is grayscale image of size 128 X 128. The Image quality of the reconstructed image is measured by six quality measurement parameters. In this paper as analytical technique; simple back projection and filtered back projection are implemented, while as iterative; algebraic reconstruction technique is implemented. Experiment result reveals that quality of reconstructed image increase as coverage angle, and number of views increases. The processing time is one major deciding component for reconstruction. Keywords: Reconstruction algorithm, Simple-Back projection algorithm (SBP), Filter-Back projection algorithm (FBP), Algebraic Reconstruction Technique algorithm (ART), Image quality, coverage angle, Computed tomography (CT).
Sparse Representation for Fetal QRS Detection in Abdominal ECG RecordingsRiccardo Bernardini
Slideshow of the presentation given at EHB 2015
In this work, we consider the problem of detection of fetal heart beats from abdominal, non-invasive mixture recordings. We propose a new method for the separation of maternal and fetal beats based on the sparse decomposition in an over-complete dictionary of Gaussian-like functions. To increase the detection capability, we also use Independent Component Analysis (ICA) after maternal template subtraction. We show that the proposed detection method can be applied on the original mixture with a sensitivity close to 95%. Moreover, our method may be used also for single channel abdominal ECG signals, and also used in real-time applications.
This document summarizes a research paper on computed tomography (CT) dose reduction and view number optimization. It discusses how CT uses X-rays to create images but that radiation exposure is a concern, especially for pediatric patients. The paper explores how iterative reconstruction techniques and compressed sensing theories have aimed to reduce views and dose while maintaining image quality. It presents the goal of investigating the relationship between image quality, view number, and radiation dose level. Numerical tests were performed to determine the optimal view number for a given dose level that achieves the best reconstruction quality.
When spatial data are distributed across multiple servers, there is an obvious difficulty with computing the likelihood function without combining all the data onto one server. Therefore, it would be of interest to compute estimates of the spatial parameters based on decompositions of the spatial held into blocks, each block corresponding to one server. Two methods suggest themselves, a \between blocks" approach in which each block is reduced to a single observation (or a low dimensional summary) to facilitate calculation of a likelihood across blocks, or a within blocks" approach in which the likelihood is calculated for each block and then combined into an overall likelihood for the full process. In fact, I argue that a hybrid approach that combines both ideas is best. Theoretical calculations are provided for the statistical efficiency of each approach. In conclusion, I will present some thoughts for optimal sampling designs with distributed data.
1 FACULTY OF SCIENCE AND ENGINEERING SCHOOL OF COMPUT.docxmercysuttle
1
FACULTY OF SCIENCE AND ENGINEERING
SCHOOL OF COMPUTING, MATHEMATICS & DIGITAL MEDIA
REASSESSMENT COURSEWORK 2013/14
UNIT CODE:
6G6Z3005
UNIT DESC:
APPLIED REGRESSION AND MULTIVARIATE ANALYSIS
ASSESSMENT ID:
1CWK30
ASSESSMENT NAME:
Courswork 30%
WEIGHT
FACTOR: 30%
See below.
NAME OF STAFF SETTING ASSIGNMENT: Dr B L Shea
0
MANCHESTER METROPOLITAN UNIVERSITY
FACULTY OF SCIENCE AND ENGINEERING
SCHOOL OF COMPUTING, MATHEMATICS & DIGITAL TECHNOLOGY
ACADEMIC YEAR 2013-2014:
REFERRED COURSEWORK
BSC(HONS) FINANCIAL MATHEMATICS
BSC(HONS) MATHEMATICS
YEAR/STAGE THREE
UNIT 6G6Z3005 : APPLIED REGRESSION AND MULTIVARIATE ANALYSIS
Answer ALL questions.
The pass mark is 40% which corresponds to a minimum of 72
marks out of a possible 180 marks.
The deadline is 8th August 2014.
SECTION A
1. (a) Three measurementsx1, x2 andx3 have the following sample covariance matrix.
∑̂ =
9 2 0
2 4 1
0 1 4
(i) Verify that the corresponding sample correlation matrix C, is given by
C =
1 13 0
1
3 1
1
4
0 14 1
[2]
(ii) Given that one of the eigenvalues of C is equal to one, calculate the other two
eigenvalues and determine the proportion of the variation in the data explained
by the first principal component.
[6]
(iii) Using the sample correlation matrix C, calculate the first principal component.
[6]
(b) A Principal Components Analysis of the prices of food items in 23 cities was carried
out with a view to forming a measure of the Consumer Price Index(CPI). A Minitab
analysis of this data is attached.
(i) Explain why Principal Components Analysis was performedon the correlation
matrix instead of the covariance matrix.
[2]
(ii) If the first Principal Component is taken as a measure of the CPI calculate, to
one decimal place, the value of the index for Atlanta.
[2]
(iii) Which is the most expensive city and which is the least expensive city?
[2]
(Question 1 continued overleaf)
1
(Question 1 continued)
Minitab output for Question 1
Descriptive Statistics: bread, burger, milk, oranges, tomatoes
Variable N Mean Median TrMean StDev SE Mean
bread 23 25.291 25.300 25.267 2.507 0.523
burger 23 91.86 91.00 91.63 7.55 1.58
milk 23 62.30 62.50 61.96 6.95 1.45
oranges 23 102.99 105.90 102.90 14.24 2.97
tomatoes 23 48.77 46.80 48.74 7.60 1.59
Principal Component Analysis: bread, burger, milk, oranges, tomatoes
Eigenanalysis of the Correlation Matrix
Eigenvalue 2.4225 1.1047 0.7385 0.4936 0.2408
Proportion 0.484 0.221 0.148 0.099 0.048
Cumulative 0.484 0.705 0.853 0.952 1.000
Variable PC1 PC2 PC3 PC4 PC5
bread 0.496 -0.309 0.386 -0.509 -0.500
burger 0.576 -0.044 0.262 0.028 0.773
milk 0.340 -0.431 -0.835 -0.049 0.008
oranges 0.225 0.797 -0.292 -0.479 -0.006
tomatoes 0.506 0.287 0.012 0.713 -0.391
(Question 1 continued overleaf)
2
(Question 1 continued)
Data Display
Row c ...
The document provides an introduction to medical imaging modalities, with a focus on computed tomography (CT). It discusses the history and evolution of CT, from first generation scanners with one source and detector requiring 25 minutes per scan, to current multi-slice scanners with up to 2000 detectors allowing scans in just a few seconds. Scatter correction and iterative reconstruction techniques are also covered, which help reduce dose and improve image quality compared to traditional filtered back projection. The principles of the Radon transform and how it is used to reconstruct CT images from projections are briefly explained. Overall, the document gives a high-level overview of CT technology and image reconstruction methods.
Hyperspectral imaging can be used to detect early signs of cobweb disease on mushroom caps that are invisible to the naked eye. A study found that infected areas lost water from the first day of infection, unlike areas with mechanical injuries. Linear discriminant analysis could classify infection types and support vector machines identified untreated samples and those treated with different antifungal methods, including biological and synthetic pre-treatments. However, the models rely on water absorption bands, so drying from other causes could interfere with detection. Comparisons across sample sets from different sources may also be less reliable. Hyperspectral imaging shows promise for early detection but real-world applications face challenges around sample variability.
Bayesian Estimation for Missing Values in Latin Square Designinventionjournals
International Journal of Mathematics and Statistics Invention (IJMSI) is an international journal intended for professionals and researchers in all fields of computer science and electronics. IJMSI publishes research articles and reviews within the whole field Mathematics and Statistics, new teaching methods, assessment, validation and the impact of new technologies and it will continue to provide information on the latest trends and developments in this ever-expanding subject. The publications of papers are selected through double peer reviewed to ensure originality, relevance, and readability. The articles published in our journal can be accessed online.
This document discusses dimensionality reduction techniques for hyperspectral images. It proposes using k-means clustering based on statistical measures like variance, standard deviation, and mean absolute deviation to select bands from hyperspectral images. The number of bands is first estimated using virtual dimensionality. Bands are then clustered based on their statistical properties and one band is selected from each cluster with the maximum value of the statistical measure. Finally, endmembers are extracted from the selected bands using N-FINDR.
Performance Improvement of Vector Quantization with Bit-parallelism HardwareCSCJournals
Vector quantization is an elementary technique for image compression; however, searching for the nearest codeword in a codebook is time-consuming. In this work, we propose a hardware-based scheme by adopting bit-parallelism to prune unnecessary codewords. The new scheme uses a “Bit-mapped Look-up Table” to represent the positional information of the codewords. The lookup procedure can simply refer to the bitmaps to find the candidate codewords. Our simulation results further confirm the effectiveness of the proposed scheme.
bayesImageS: an R package for Bayesian image analysisMatt Moores
There are many approaches to Bayesian computation with intractable likelihoods, including the exchange algorithm, approximate Bayesian computation (ABC), thermodynamic integration, and composite likelihood. These approaches vary in accuracy as well as scalability for datasets of significant size. The Potts model is an example where such methods are required, due to its intractable normalising constant. This model is a type of Markov random field, which is commonly used for image segmentation. The dimension of its parameter space increases linearly with the number of pixels in the image, making this a challenging application for scalable Bayesian computation. My talk will introduce various algorithms in the context of the Potts model and describe their implementation in C++, using OpenMP for parallelism. I will also discuss the process of releasing this software as an open source R package on the CRAN repository.
Exploratory Analysis of Multivariate DataMatt Moores
The document discusses exploratory analysis techniques for multivariate data, including principal component analysis (PCA) and clustering. It uses PCA to analyze morphological measurements of crabs and genetic data from human individuals. It also demonstrates k-means clustering on US crime rate data and generates a dendrogram. The goal is to explore patterns in high-dimensional, correlated data through dimensionality reduction and grouping observations.
R package bayesImageS: Scalable Inference for Intractable LikelihoodsMatt Moores
There are many approaches to Bayesian computation with intractable likelihoods, including the exchange algorithm and approximate Bayesian computation (ABC). A serious drawback of these algorithms is that they do not scale well for models with a large state space. Markov random fields, such as the Ising/Potts model and exponential random graph model (ERGM), are particularly challenging because the number of discrete variables increases linearly with the size of the image or graph. The likelihood of these models cannot be computed directly, due to the presence of an intractable normalising constant. In this context, it is necessary to employ algorithms that provide a suitable compromise between accuracy and computational cost.
Bayesian indirect likelihood (BIL) is a class of methods that approximate the likelihood function using a surrogate model. This model can be trained using a pre-computation step, utilising massively parallel hardware to simulate auxiliary variables. We review various types of surrogate model that can be used in BIL. In the case of the Potts model, we introduce a parametric approximation to the score function that incorporates its known properties, such as heteroskedasticity and critical temperature. We demonstrate this method on 2D satellite remote sensing and 3D computed tomography (CT) images. We achieve a hundredfold improvement in the elapsed runtime, compared to the exchange algorithm or ABC. Our algorithm has been implemented in the R package “bayesImageS,” which is available from CRAN.
Approximate Bayesian computation for the Ising/Potts modelMatt Moores
This document provides an introduction to Approximate Bayesian Computation (ABC). ABC is a likelihood-free method for approximating posterior distributions when the likelihood function is intractable or expensive to evaluate. The document outlines the basic ABC rejection sampling algorithm and discusses extensions like using summary statistics, ABC-MCMC, and ABC sequential Monte Carlo. It also applies ABC to parameter inference for a hidden Potts model used in Bayesian image segmentation.
Accelerating Pseudo-Marginal MCMC using Gaussian ProcessesMatt Moores
The grouped independence Metropolis-Hastings (GIMH) and Markov chain within Metropolis (MCWM) algorithms are pseudo-marginal methods used to perform Bayesian inference in latent variable models. These methods replace intractable likelihood calculations with unbiased estimates within Markov chain Monte Carlo algorithms. The GIMH method has the posterior of interest as its limiting distribution, but suffers from poor mixing if it is too computationally intensive to obtain high-precision likelihood estimates. The MCWM algorithm has better mixing properties, but less theoretical support. In this paper we accelerate the GIMH method by using a Gaussian process (GP) approximation to the log-likelihood and train this GP using a short pilot run of the MCWM algorithm. Our new method, GP-GIMH, is illustrated on simulated data from a stochastic volatility and a gene network model. Our approach produces reasonable estimates of the univariate and bivariate posterior distributions, and the posterior correlation matrix in these examples with at least an order of magnitude improvement in computing time.
This document provides an introduction to Approximate Bayesian Computation (ABC), a likelihood-free method for approximating posterior distributions when the likelihood function is unavailable or computationally intractable. It describes the ABC rejection sampling algorithm and key concepts like tolerance levels, distance functions, summary statistics, and improvements like ABC-MCMC and ABC-SMC. ABC is presented as an alternative to traditional Bayesian inference methods for models where direct likelihood evaluation is impossible or too expensive.
The document provides an overview of variational Bayes (VB) and its implementation in the VBmix R package. VB approximates intractable posterior distributions by introducing a tractable distribution and minimizing its distance from the true posterior. VBmix uses VB to perform approximate Bayesian inference for mixtures of Gaussians, providing fast inference compared to exact methods.
This document discusses parallel MCMC and random number generators for parallel MCMC in R. It introduces parallel computing packages in R like foreach and parallel that allow running MCMC chains concurrently. It emphasizes the importance of using different random number generator seeds and initial values for each chain to ensure independence. The document also summarizes some random number generators available in R like the Mersenne Twister default RNG and others in the base package.
Informative Priors for Segmentation of Medical ImagesMatt Moores
This document summarizes two Bayesian approaches to medical image segmentation - k-means with posterior diffusion and hidden Markov random field models. It discusses potential extensions, such as using an external field to incorporate organ size and position variability, or a hybrid level set model. The conclusions discuss references for further information on these methods.
hematic appreciation test is a psychological assessment tool used to measure an individual's appreciation and understanding of specific themes or topics. This test helps to evaluate an individual's ability to connect different ideas and concepts within a given theme, as well as their overall comprehension and interpretation skills. The results of the test can provide valuable insights into an individual's cognitive abilities, creativity, and critical thinking skills
Nucleophilic Addition of carbonyl compounds.pptxSSR02
Nucleophilic addition is the most important reaction of carbonyls. Not just aldehydes and ketones, but also carboxylic acid derivatives in general.
Carbonyls undergo addition reactions with a large range of nucleophiles.
Comparing the relative basicity of the nucleophile and the product is extremely helpful in determining how reversible the addition reaction is. Reactions with Grignards and hydrides are irreversible. Reactions with weak bases like halides and carboxylates generally don’t happen.
Electronic effects (inductive effects, electron donation) have a large impact on reactivity.
Large groups adjacent to the carbonyl will slow the rate of reaction.
Neutral nucleophiles can also add to carbonyls, although their additions are generally slower and more reversible. Acid catalysis is sometimes employed to increase the rate of addition.
When I was asked to give a companion lecture in support of ‘The Philosophy of Science’ (https://shorturl.at/4pUXz) I decided not to walk through the detail of the many methodologies in order of use. Instead, I chose to employ a long standing, and ongoing, scientific development as an exemplar. And so, I chose the ever evolving story of Thermodynamics as a scientific investigation at its best.
Conducted over a period of >200 years, Thermodynamics R&D, and application, benefitted from the highest levels of professionalism, collaboration, and technical thoroughness. New layers of application, methodology, and practice were made possible by the progressive advance of technology. In turn, this has seen measurement and modelling accuracy continually improved at a micro and macro level.
Perhaps most importantly, Thermodynamics rapidly became a primary tool in the advance of applied science/engineering/technology, spanning micro-tech, to aerospace and cosmology. I can think of no better a story to illustrate the breadth of scientific methodologies and applications at their best.
What is greenhouse gasses and how many gasses are there to affect the Earth.moosaasad1975
What are greenhouse gasses how they affect the earth and its environment what is the future of the environment and earth how the weather and the climate effects.
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...University of Maribor
Slides from talk:
Aleš Zamuda: Remote Sensing and Computational, Evolutionary, Supercomputing, and Intelligent Systems.
11th International Conference on Electrical, Electronics and Computer Engineering (IcETRAN), Niš, 3-6 June 2024
Inter-Society Networking Panel GRSS/MTT-S/CIS Panel Session: Promoting Connection and Cooperation
https://www.etran.rs/2024/en/home-english/
Or: Beyond linear.
Abstract: Equivariant neural networks are neural networks that incorporate symmetries. The nonlinear activation functions in these networks result in interesting nonlinear equivariant maps between simple representations, and motivate the key player of this talk: piecewise linear representation theory.
Disclaimer: No one is perfect, so please mind that there might be mistakes and typos.
dtubbenhauer@gmail.com
Corrected slides: dtubbenhauer.com/talks.html
The ability to recreate computational results with minimal effort and actionable metrics provides a solid foundation for scientific research and software development. When people can replicate an analysis at the touch of a button using open-source software, open data, and methods to assess and compare proposals, it significantly eases verification of results, engagement with a diverse range of contributors, and progress. However, we have yet to fully achieve this; there are still many sociotechnical frictions.
Inspired by David Donoho's vision, this talk aims to revisit the three crucial pillars of frictionless reproducibility (data sharing, code sharing, and competitive challenges) with the perspective of deep software variability.
Our observation is that multiple layers — hardware, operating systems, third-party libraries, software versions, input data, compile-time options, and parameters — are subject to variability that exacerbates frictions but is also essential for achieving robust, generalizable results and fostering innovation. I will first review the literature, providing evidence of how the complex variability interactions across these layers affect qualitative and quantitative software properties, thereby complicating the reproduction and replication of scientific studies in various fields.
I will then present some software engineering and AI techniques that can support the strategic exploration of variability spaces. These include the use of abstractions and models (e.g., feature models), sampling strategies (e.g., uniform, random), cost-effective measurements (e.g., incremental build of software configurations), and dimensionality reduction methods (e.g., transfer learning, feature selection, software debloating).
I will finally argue that deep variability is both the problem and solution of frictionless reproducibility, calling the software science community to develop new methods and tools to manage variability and foster reproducibility in software systems.
Exposé invité Journées Nationales du GDR GPL 2024
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptxMAGOTI ERNEST
Although Artemia has been known to man for centuries, its use as a food for the culture of larval organisms apparently began only in the 1930s, when several investigators found that it made an excellent food for newly hatched fish larvae (Litvinenko et al., 2023). As aquaculture developed in the 1960s and ‘70s, the use of Artemia also became more widespread, due both to its convenience and to its nutritional value for larval organisms (Arenas-Pardo et al., 2024). The fact that Artemia dormant cysts can be stored for long periods in cans, and then used as an off-the-shelf food requiring only 24 h of incubation makes them the most convenient, least labor-intensive, live food available for aquaculture (Sorgeloos & Roubach, 2021). The nutritional value of Artemia, especially for marine organisms, is not constant, but varies both geographically and temporally. During the last decade, however, both the causes of Artemia nutritional variability and methods to improve poorquality Artemia have been identified (Loufi et al., 2024).
Brine shrimp (Artemia spp.) are used in marine aquaculture worldwide. Annually, more than 2,000 metric tons of dry cysts are used for cultivation of fish, crustacean, and shellfish larva. Brine shrimp are important to aquaculture because newly hatched brine shrimp nauplii (larvae) provide a food source for many fish fry (Mozanzadeh et al., 2021). Culture and harvesting of brine shrimp eggs represents another aspect of the aquaculture industry. Nauplii and metanauplii of Artemia, commonly known as brine shrimp, play a crucial role in aquaculture due to their nutritional value and suitability as live feed for many aquatic species, particularly in larval stages (Sorgeloos & Roubach, 2021).
BREEDING METHODS FOR DISEASE RESISTANCE.pptxRASHMI M G
Plant breeding for disease resistance is a strategy to reduce crop losses caused by disease. Plants have an innate immune system that allows them to recognize pathogens and provide resistance. However, breeding for long-lasting resistance often involves combining multiple resistance genes
bayesImageS: Bayesian computation for medical Image Segmentation using a hidden Potts Model
1. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
bayesImageS: Bayesian computation for
medical image segmentation
using a hidden Potts model
Matt Moores
MRC Biostatistics Unit Seminar Series
July 25, 2017
2. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Acknowledgements
Queensland University of Technology, Brisbane, Australia:
Prof. Kerrie Mengersen
Dr. Fiona Harden
Members of the Volume Analysis Tool project team at the
Radiation Oncology Mater Centre (ROMC):
Cathy Hargrave
A/Prof Michael Poulsen, MD
Timothy Deegan
Emmanuel Baveas
QHealth ethics HREC/12/QPAH/475 and QUT ethics 1200000724
3. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Outline
1 R packages
bayesImageS
2 Medical Imaging
Image-Guided Radiotherapy
Cone-Beam Computed Tomography
3 Statistical Model
Hidden Potts model
Informative priors
4 Bayesian Computation
Chequerboard Gibbs sampler
Pseudolikelihood
5 Experimental Results
ED phantom experiment
Radiotherapy Patient Data
4. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Why write an R package?
Portability
Test bed for new statistical methods
Build on existing code
Research impact
Kudos
Hadley Wickham (2015) R packages
5. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Why C++?
Most statistical algorithms are iterative
Markov chain Monte Carlo
Scalability for large datasets
Rcpp
OpenMP
Eigen or Armadillo
Dirk Eddelbuettel (2013) Seamless R and C++ integration with Rcpp
6. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Inline
One function at a time:
§
library ( i n l i n e )
sum_logs ← cxxfunction ( signature ( log_vec = "numeric") , plugin = "RcppArmadillo" , body=’
arma::vec log_prob = Rcpp::as<arma::vec>(log_vec);
double suml = 0.0;
double maxl = log_prob.max();
for (unsigned i=0; i < log_prob.n_elem; i++)
{
if (arma::is_finite(log_prob(i)))
suml += exp(log_prob(i) - maxl);
}
return Rcpp::wrap(log(suml) + maxl);
’)
7. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Annotations
Rcpp wrappers generated automatically:
compileAttributes("myRcppPackage")
R package documentation generated automatically:
roxygenize("myRcppPackage")
§
/ / ’ Compute the effective sample size (ESS) of the particles.
/ / ’
/ / ’ The ESS is a ‘‘rule of thumb’’ for assessing the degeneracy of
/ / ’’ the importance distribution:
/ / ’ deqn {ESS = frac { ( sum_ { q=1}^Q w_q ) ^ 2 } { sum_ { q=1}^Q w_q ^2}}
/ / ’
/ / ’’ @param log_weights logarithms of the importance weights of each particle.
/ / ’’ @return the effective sample size, a scalar between 0 and Q
/ / ’’ @references
/ / ’’ Liu, JS (2001) "Monte Carlo Strategies in Scientific Computing." Springer’
/ / [ [ Rcpp : : export ] ]
double effectiveSampleSize ( NumericVector log_weights )
{
double sum_wt = sum_logs ( log_weights ) ;
double sum_sq = sum_logs ( log_weights + log_weights ) ;
double res = exp (sum_wt + sum_wt − sum_sq ) ;
i f ( std : : i s f i n i t e ( res ) ) return res ;
else return 0;
}
8. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Package Skeleton
Create a new R package:
package.skeleton("myPackage", path=".")
Specific skeletons for each C++ library:
Rcpp.package.skeleton("myRcppPackage")
RcppArmadillo.package.skeleton("MyArmadilloPackage")
RcppEigen.package.skeleton("MyEigenPackage")
9. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Common Problems
Rcpp parameters are passed by reference (not copied):
Can rely on R for garbage collection
Memory allocation is slower
Can crash R (and Rstudio (and your OS))
R is not thread safe
Cannot call any R functions (even indirectly)
within parallel code!
Drew Schmidt (@wrathematics, 2015) Parallelism, R, and OpenMP
10. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
bayesImageS
An R package for Bayesian image segmentation
using the hidden Potts model:
RcppArmadillo for fast computation in C++
OpenMP for parallelism
§
library ( bayesImageS )
p r i o r s ← l i s t ("k"=3 ,"mu"=rep (0 ,3) ,"mu.sd"=sigma ,
"sigma"=sigma , "sigma.nu"=c (1 ,1 ,1) ,"beta"=c ( 0 , 3 ) )
mh ← l i s t ( algorithm="pseudo" , bandwidth =0.2)
r e s u l t ← mcmcPotts ( y , neigh , block ,NULL,
55000,5000, priors ,mh)
Eddelbuettel & Sanderson (2014) RcppArmadillo: Accelerating R with
high-performance C++ linear algebra. CSDA 71
11. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Bayesian computational methods
bayesImageS supports methods for updating the latent labels:
Chequerboard Gibbs sampling (Winkler 2003)
Swendsen-Wang (1987)
and also methods for updating the smoothing parameter β:
Pseudolikelihood (Rydén & Titterington 1998)
Thermodynamic integration (Gelman & Meng 1998)
Exchange algorithm (Murray, Ghahramani & MacKay 2006)
Approximate Bayesian computation (Grelaud et al. 2009)
Sequential Monte Carlo (ABC-SMC) with pre-computation
(Del Moral, Doucet & Jasra 2012; Moores et al. 2015)
12. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Image-Guided Radiotherapy
Image courtesy of Varian Medical Systems, Inc. All rights reserved.
13. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Segmentation of Anatomical Structures
Radiography courtesy of Cathy Hargrave, Radiation Oncology Mater Centre,
Queensland Health
14. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Physiological Variability
Organ Ant-Post Sup-Inf Left-Right
prostate 0.1 ± 4.1mm −0.5 ± 2.9mm 0.2 ± 0.9mm
seminal vesicles 1.2 ± 7.3mm −0.7 ± 4.5mm −0.9 ± 1.9mm
Table: Distribution of observed translations of the organs of interest
Organ Volume Gas
rectum 35 − 140cm3 4 − 26%
bladder 120 − 381cm3
Table: Volume variations in the organs of interest
Frank, et al. (2008) Quantification of Prostate and Seminal Vesicle
Interfraction Variation During IMRT. IJROBP 71(3): 813–820.
15. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Electron Density phantom
(a) CIRS Model 062 ED phantom (b) Helical, fan-beam CT scanner
16. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Cone-Beam Computed Tomography
(c) Fan-beam CT (d) Cone-beam CT
17. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Distribution of Pixel Intensity
Hounsfield unit
Frequency
−1000 −800 −600 −400 −200 0 200
050001000015000
(a) Fan-Beam CT
pixel intensity
Frequency
−1000 −800 −600 −400 −200 0 200
050001000015000
(b) Cone-Beam CT
18. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Hidden Markov Random Field
Joint distribution of observed pixel intensities y = {yi}n
i=1
and latent labels z = {zi}n
i=1:
p(y, z|µ, σ2
, β) = p(y|µ, σ2
, z)p(z|β) (1)
Additive Gaussian noise:
yi|zi =j
iid
∼ N µj, σ2
j (2)
Potts model:
π(zi|zi, β) =
exp {β i∼ δ(zi, z )}
k
j=1 exp {β i∼ δ(j, z )}
(3)
Potts (1952) Proceedings of the Cambridge Philosophical Society 48(1)
19. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Inverse Temperature
20. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Doubly-intractable likelihood
p(β|z) ∝ C(β)−1
π(β) exp {β S(z)} (4)
The normalising constant has computational complexity O(nkn):
C(β) =
z∈Z
exp {β S(z)} (5)
S(z) is the sufficient statistic of the Potts model:
S(z) =
i∼ ∈L
δ(zi, z ) (6)
where L is the set of all unique neighbour pairs.
21. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Informative Prior for µj and σ2
j
0 1 2 3 4
−1000−800−600−400−2000200
Electron Density
Hounsfieldunit
(a) Fan-Beam CT
0 1 2 3 4
−1000−800−600−400−2000200
Electron Density
pixelintensity
(b) Cone-Beam CT
22. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
External Field
π(zi|αi, β, zi∼ ) ∝ exp αi(zi) + β
i∼
δ(zi, zj) (7)
Isotropic translation:
αi(zi =j) =
1
nj ν∈j
φ ∆(ϑi, ϑν), µ = 1.2, σ2
= 7.32
(8)
where
ν ∈ j are the image voxels ϑν in object j
φ(x, µ, σ2) is the normal density function
∆(u, v) is the Euclidian distance between the coordinates
of voxel u and voxel v
23. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
External Field II
(a) Fan-beam CT (b) External Field
26. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
External Field
Organ- and patient-specific external field (slice 49, 16mm Inf)
28. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Chequerboard Gibbs II
Algorithm 1 Chequerboard sampling for z
1: for all blocks b do
2: for all pixels i ∈ b do
3: for all labels j ∈ 1 . . . k do
4: Compute λj ← p(yi | zi = j)π(zi = j | zi∼ , β)
5: end for
6: Draw zi ∼ Multinomial(λ1, . . . , λk)
7: end for
8: end for
29. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Gibbs sampler in C++
§
void gibbsLabels ( const arma : : umat & neigh , const std : : vector <arma : : uvec> & blocks ,
arma : : umat & z , arma : : umat & alloc , const double beta ,
const arma : : mat & log_ x f i e l d )
{
const Rcpp : : NumericVector randU = Rcpp : : r u n i f ( neigh . n_rows ) ;
for ( unsigned b=0; b < blocks . size ( ) ; b++)
{
const arma : : uvec block = blocks [ b ] ;
arma : : vec log_prob ( z . n_cols ) ;
#pragma omp p a r a l l e l for private ( log_prob )
for ( unsigned i =0; i < block . size ( ) ; i ++)
{
for ( unsigned j =0; j < z . n_cols ; j ++)
{
unsigned sum_neigh = 0;
for ( unsigned k=0; k < neigh . n_cols ; k++)
{
sum_neigh += z ( neigh ( block [ i ] , k ) , j ) ;
}
log_prob [ j ] = log_ x f i e l d ( block [ i ] , j ) + beta∗sum_neigh ;
}
double t o t a l _ l l i k e = sum_logs ( log_prob ) ;
double cumProb = 0.0;
z . row ( block [ i ] ) . zeros ( ) ;
for ( unsigned j =0; j < log_prob . n_elem ; j ++)
{
cumProb += exp ( log_prob [ j ] − t o t a l _ l l i k e ) ;
i f ( randU [ block [ i ] ] < cumProb )
{
z ( block [ i ] , j ) = 1;
a l l o c ( block [ i ] , j ) += 1;
break ;
30. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Pseudolikelihood (PL)
Algorithm 2 Metropolis-Hastings with PL
1: Draw proposal β ∼ q(β |β◦)
2: Approximate p(β |z) and p(β◦|z) using equation (9):
ˆpPL(β|z) ≈
n
i=1
exp{β i∼ δ(zi, z )}
k
j=1 exp{β i∼ δ(j, z )}
(9)
3: Calculate the M-H ratio ρ = ˆpPL(β |z)π(β )q(β◦|β )
ˆpPL(β◦|z)π(β◦)q(β |β◦)
4: Draw u ∼ Uniform[0, 1]
5: if u < min(1, ρ) then
6: β ← β
7: else
8: β ← β◦
9: end if
Rydén & Titterington (1998) JCGS 7(2): 194–211
31. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Pseudolikelihood in C++
§
double pseudolike ( arma : : mat & ne , arma : : uvec & e ,
double b , unsigned n , unsigned k )
{
double num = 0.0;
double denom = 0.0;
#pragma omp p a r a l l e l for reduction ( + :num, denom)
for ( unsigned i =0; i < n ; i ++)
{
num=num+ne ( e [ i ] , i ) ;
double tdenom =0.0;
for ( unsigned j =0; j < k ; j ++)
{
tdenom=tdenom+exp ( b∗ne ( j , i ) ) ;
}
denom=denom+log ( tdenom ) ;
}
return b∗num−denom ;
}
32. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Approximation Error
PL for n = 12, k = 3 in comparison to the exact likelihood
calculated using a brute force method:
0 1 2 3 4
6810121416
β
µ
exact
pseudolikelihood
(a) Expectation
0 1 2 3 4
0.00.51.01.52.02.5
β
σ
exact
pseudolikelihood
(b) Standard deviation
33. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
ED phantom experiment
27 cone-beam CT scans of the ED phantom
Cropped to 376 × 308 pixels and 23 slices
(330 × 270 × 46 mm)
Inner ring of inserts rotated by between 0◦ and 16◦
2D displacement of between 0mm and 25mm
Isotropic external field prior with σ∆ = 7.3mm
9 component Potts model
8 different tissue types, plus water-equivalent background
Priors for noise parameters estimated from 28 fan-beam CT
and 26 cone-beam CT scans
34. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Image Segmentation
35. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Quantification of Segmentation Accuracy
Dice similarity coefficient:
DSCg =
2 × |ˆg ∩ g|
|ˆg| + |g|
(10)
where
DSCg is the Dice similarity coefficient for label g
|ˆg| is the count of pixels that were classified with the
label g
|g| is the number of pixels that are known to truly
belong to component g
|ˆg ∩ g| is the count of pixels in g that were labeled
correctly
Dice (1945) Measures of the amount of ecologic association between
species. Ecology 26(3): 297–302.
36. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Results
Tissue Type Simple Potts External Field
Lung (inhale) 0.540 ± 0.037 0.902 ± 0.009
Lung (exhale) 0.172 ± 0.008 0.814 ± 0.022
Adipose 0.059 ± 0.008 0.704 ± 0.062
Breast 0.077 ± 0.011 0.720 ± 0.048
Water 0.174 ± 0.003 0.964 ± 0.003
Muscle 0.035 ± 0.004 0.697 ± 0.076
Liver 0.020 ± 0.007 0.654 ± 0.033
Spongy Bone 0.094 ± 0.014 0.758 ± 0.018
Dense Bone 0.014 ± 0.001 0.616 ± 0.151
Table: Segmentation Accuracy (Dice Similarity Coefficient ±σ)
Moores, et al. (2014) In Proc. XVII Intl Conf. ICCR; J. Phys: Conf. Ser. 489
38. R packages Medical Imaging Statistical Model Bayesian Computation Experimental Results Conclusion
Summary
Informative priors can dramatically improve segmentation
accuracy for noisy data
inverse regression for µ & σ2
external field prior for z
It is feasible to use MCMC for image analysis of realistic
datasets
but auxiliary variable methods don’t scale well
requires parallelized implementation in C++ or Fortran
RcppArmadillo & OpenMP are a good combination
faster algorithms are available, such as VB or ICM
39. Appendix
For Further Reading I
Moores, Hargrave, Deegan, Poulsen, Harden & Mengersen
An external field prior for the hidden Potts model with application to
cone-beam computed tomography.
CSDA 86: 27–41, 2015.
Moores & Mengersen
bayesImageS: Bayesian methods for image segmentation using a
hidden Potts model.
R package version 0.3-3
https://CRAN.R-project.org/package=bayesImageS
Moores, Drovandi, Mengersen & Robert
Pre-processing for approximate Bayesian computation in image
analysis.
Statistics & Computing 25(1): 23–33, 2015.
Moores, Pettitt & Mengersen
Scalable Bayesian inference for the inverse temperature of a hidden
Potts model.
arXiv:1503.08066 [stat.CO], 2015.
40. Appendix
For Further Reading II
Eddelbuettel & Sanderson
RcppArmadillo: Accelerating R with high-performance C++ linear
algebra.
Comput. Stat. Data Anal. 71: 1054–63, 2014.
Bates & Eddelbuettel
Fast and elegant numerical linear algebra using the RcppEigen
package.
J. Stat. Soft. 52(5): 1–24, 2013.
Eddelbuettel
Seamless R and C++ integration with Rcpp
Springer-Verlag, 2013.
Wickham
R packages
O’Reilly, 2015.
41. Appendix
For Further Reading III
Winkler
Image analysis, random fields and Markov chain Monte Carlo methods
2nd
ed., Springer-Verlag, 2003.
Marin & Robert
Bayesian Essentials with R
Springer-Verlag, 2014.
Roberts & Sahu
Updating Schemes, Correlation Structure, Blocking and
Parameterization for the Gibbs Sampler
J. R. Stat. Soc. Ser. B 59(2): 291–317, 1997.
Rydén & Titterington
Computational Bayesian Analysis of Hidden Markov Models
J. Comput. Graph. Stat. 7(2): 194–211, 1998.