text:
## Introduction

Image-based simulation is the process of performing quantitative numerical calculations, such as 3D finite-element simulations, on geometries constructed directly from 3D imaging techniques, including X-ray computed tomography (CT) and scanning electron microscopy. Image-based simulation has become a crucial part of modern engineering analysis workflows, alongside integrated computational materials engineering (ICME)1 and digital twin2,3,4,5 efforts. It has also been adopted by many disciplines, including medical imaging for patient treatment6,7,8,9,10, improving the manufacturing process of batteries11,12,13,14, composite material development15,16,17,18, biological physics19, neuroscience20,21, and geomechanics22.

Image-based simulation traditionally involves three steps. The first step, image segmentation, is the classification of each voxel (3D pixel) in the image to a distinct class or material (Fig. 1). For instance, the blue and purple regions in Fig. 1b represent two different materials captured in the image in Fig. 1a. The second step is the reconstruction of a computational domain from the image segmentation. The third step is the numerical simulation of physics quantities on this reconstructed domain. The outcome of this image-based simulation (Fig. 2c) is a single value for the physics quantity of interest (Fig. 2d).

For this process (Fig. 2b), traditional image segmentation approaches involve manual segmentation, whereby a person applies a combination of image filtering techniques (e.g., smoothing, noise removal, contrast enhancement, or non-local means filters) and segmentation algorithms (e.g., simple thresholding, watershed, or multi-Otsu thresholding algorithms) to segment the image. However, manual segmentation is fraught with irreproducibility and person-to-person variability. While the tools themselves are scientifically sound, the way that people deploy them makes it more of an art than a science. Two qualified individuals performing segmentation on the same image are likely to choose a different combination of filtering and segmentation techniques (or parameters for those techniques) leading to different segmentations23,24,25,26. While to the human eye, one algorithm may be subjectively better than another algorithm for a given image, each segmentation is a plausible and valid segmentation. This suggests that even when a clear segmentation is achieved (e.g. the black curve in Fig. 1b), it can never be verified as the most correct segmentation. The range of possible segmentations, accounting for all tools and variables, represents the range of image segmentation uncertainty (the yellow regions in Fig. 1b), within which the correct answer will be found. However, because there are infinite combinations of manual segmentation algorithms and parameters, it is difficult to fully characterize segmentation uncertainty using manual segmentation approaches.

Machine learning techniques, and convolutional neural networks (CNNs) in particular, have revolutionized image segmentation by alleviating three main disadvantages in manual segmentations27. First, manual segmentation is a labor-intensive task, and CNNs help to remove this burden. Second, CNNs can often achieve better accuracy than humans28,29, even when trained on imperfect manual segmentations. Third, CNNs produce consistent segmentations that are deterministic at inference, generating reproducible results over many images of a similar domain. Because of these advantages, CNNs have gained immense popularity for image segmentation in a variety of applications, including in energy storage30, materials analyses31,32,33, and medical diagnosis34,35.

However, although CNN-based segmentation has many advantages, it is not without segmentation uncertainty. Strikingly, the same problem that plagues manual segmentation also plagues CNN-based segmentation. For instance, each CNN is designed using different stencils, varying number of layers, and parameterizations, similar to the application of manual segmentation algorithms. In addition, image artifacts, noisy input images, and imperfect manual segmentations used for model training introduce variability in inference samples, resulting in segmentation uncertainty. Therefore, it is rational to ask—how reliable are CNN-based segmentations? In the medical field, such reliability concerns are preventing neural networks from being fully utilized in a clinical setting36,37 and have led to a grand challenge for the quantification of uncertainties in biomedical image quantification38. At present, the most common way to address CNN-based segmentation uncertainty is through Monte Carlo dropout networks (MCDNs)39, which have been applied in numerous disciplines36,40,41,42,43,44. However, MCDNs do not inherently capture segmentation uncertainty within the CNN design; instead, probing segmentation uncertainty through a stochastic sampling of dropout layers is an established approach, albeit with questionable statistical validity45. However, LaBonte et al. 46 has developed a Bayesian CNN (BCNN) that measures uncertainty in the weight space, resulting in statistically justified sample inferences for segmentation uncertainty quantification. While these advances indicate that there is uncertainty in image segmentation and provide a method to visualize it, they provide no quantitative method to propagate the image segmentation uncertainty through physics simulations.

Because image-based simulations use segmented images, uncertainty in those image segmentation will necessarily lead to uncertainty distributions in the physics quantities predicted by image-based simulations. For high-consequence applications, quantifying uncertainty distributions derived from image segmentation uncertainty leads to a credible image-based simulation workflow. To date, this concept has received very little attention in the literature. Very recently the impact of segmentation uncertainty on physics quantities has been acknowledged for manual segmentation9,26,47. However, because these works focus exclusively on manual segmentation, the scope of their proposed solutions is limited to relatively subjective method-to-method comparisons, which are both irrelevant for CNN-based segmentation and potentially overlook the more comprehensive question of how segmentation uncertainty directly impacts the physics simulations. There is clearly a need for a more consistent and systematic approach to quantify the uncertainty distributions of physics quantities resulting from segmentation uncertainty and preferably an approach that makes use of more modern and objective CNN-based image segmentation techniques.

Herein, we address this challenge by presenting a systematic method of quantifying segmentation uncertainty and propagating that uncertainty through image-based simulations to create uncertainty distributions on predicted physics quantities, as illustrated in Fig. 2e–j. Our efficient quantification of uncertainty in image-based physics simulation (EQUIPS) workflow is general in that it is agnostic to the physical system (i.e., material) being studied, the image-segmentation approach, the method for performing the image-based simulation, and the physics quantities. In our workflow, EQUIPS employs both MCDNs and BCNNs to perform image segmentation to quantify segmentation uncertainty, with both approaches creating a set of image segmentation samples (Fig. 2f). These samples are combined to create a single probability map (Fig. 2g) that objectively represents the probability that a certain voxel is in the segmented material class. To explore the impact of segmentation uncertainty on physics quantities, we threshold the probability map at certain percentiles to obtain percentile segmentations (Fig. 2h), which are then used to perform multiple physics simulations (Fig. 2i) and calculate uncertainty distributions in physics quantities of interest (Fig. 2j). In the next section, we describe this approach in more detail, demonstrating the value of EQUIPS by quantifying the effect of segmentation uncertainty on physical quantities in three distinct exemplars: woven composites, battery electrodes, and a human torso.

## Results

We begin by illustrating the EQUIPS workflow for quantifying segmentation uncertainty and propagating it to physics simulations on the exemplar of a woven composite material (Fig. 2). We train a BCNN to segment 3D grayscale CT images (Fig. 2e). The output of the network is a softmax layer that, when thresholded at 0.5, creates a binary representation of voxels that are inside the segmented class. Next, we Monte Carlo sample the network to generate N unique image segmentation samples (Fig. 2f). Each image segmentation sample represents a valid inference through the model, with each sample probing the image and model uncertainty stochastically.

The probability map (ϵ, Fig. 2g) is the per-voxel mean of the N image segmentation samples (Fig. 2f), as mathematically defined in the “Methods” section. Intuitively, the probability map represents the probability that a voxel is in a segmented class. As a result, this per-voxel probability distribution can be probed by thresholding the data with the desired probability value, creating a binarization that represents that probability threshold. For example, thresholding at ϵ ≥ 0.20 generates a binarization containing all voxels that have at least a 20% probability of being in the segmented class. Conceptually, this process can be thought of as probing the cumulative distribution function (CDF) of the segmentation uncertainty, where the chosen probability value represents a percentile in that distribution. The result of this process produces a percentile segmentation, illustrated by each of the image stacks in Fig. 2h. For a multi-class problem, this workflow is repeated on each class individually.

EQUIPS then probes the segmentation uncertainty at three probability values: μσ, μ, and μ + σ, which we will call the standard segmentations (Fig. 2h). Here, μ is the mean, 50.0 percentile, and σ is the standard deviation away from the mean, 15.9 and 84.1 percentiles at μσ and μ + σ, respectively. We chose these particular percentile values to quickly model the uncertainty distribution in a physics quantity using a characteristic distribution. However, any percentile from the probability map could be used to generate an image segmentation representing that probability value.

For each standard segmentation, we perform a physics simulation to predict the physics quantities (Fig. 2i). Each inset in Fig. 2i highlights a region of the domain geometry that undergoes significant alterations. These geometry changes impact the physics quantity behavior and, as a result, these changes manifest in the physics quantity uncertainty distribution. For example, in the μσ case, the middle inset shows a material region that is disconnected from the surrounding region and therefore has low heat flux. In contrast, the μ + σ case shows a material region that is fully connected to its neighbors and therefore has a much higher heat flux.

Throughout this work, we focus on a Normal (Gaussian) distribution as the characteristic distribution to rapidly approximate a physics quantity uncertainty distribution using the fewest possible simulations. Only the three standard segmentation simulations are necessary to specify this characteristic distribution. The physics quantity evaluated using the 50.0 percentile segmentation provides the distribution mean, while the 15.9 and 84.1 percentile segmentations provide the standard deviation. The curve in Fig. 2j is the CDF of the characteristic distribution estimate calculated using this method while the red, black, and green points are the standard segmentation values. This characteristic CDF estimates the uncertainty distribution of a physics quantity as a result of segmentation uncertainty. If the characteristic distribution estimate fits the physics quantity data points well, then the calculation of additional percentile segmentations is likely unnecessary. However, if the characteristic distribution is poor (i.e. the unknown distribution is non-Normal), then additional percentile segmentations are required to capture the underlying physics quantity uncertainty distribution.

In the following discussion, we present three exemplar problems demonstrating the propagation of segmentation uncertainty from image segmentation through physics simulations to physics quantities. In each of these exemplars, simulation conditions and model parameters are held constant to draw attention to the impact that segmentation uncertainty has on the uncertainty distribution of physics quantities.

### Woven composite

In this exemplar, we use 3D CT scans of a woven composite material (Fig. 2e) to simulate thermophysical quantities relevant to its application as a thermal protection system for an atmospheric entry vehicle. In these scans, we segment fabric yarn material from the resin phase. We focus on three physics quantities: fabric volume fraction, effective thermal conductivity, and fluid permeability.

We introduce an uncertainty map (Fig. 3a) to visualize and quantify uncertain regions within the image. We use the probability map ϵ to calculate the voxel-wise uncertainty map using the Shannon entropy. A voxel is most uncertain when it can be assigned to any class with equal probability. Regions with high uncertainty tend to occur at the boundaries between material phases, as these are the voxels in the grayscale image that are the most ambiguous for segmentation. While it is typical that the uncertainty is concentrated near material phase boundaries, it does not necessarily have to be so; CNNs can identify regions that are nominally within a material but whose grayscale image values suggest ambiguity in its assignment to that material. Additionally, the standard segmentation contours (μσ, μ, μ + σ) are overlaid on the probability map as red, blue, and yellow lines, to illustrate their respective class interface boundaries in the probability map using a zoomed-in image section (Fig. 3b).

This segmentation uncertainty affects different physics simulations differently, as we illustrate in Fig. 3c for volume fraction and effective thermal conductivity, with both physics quantities normalized to their mean values. The volume fraction is the natural outcome of image segmentation, as it does not require a physics simulation to calculate and therefore has no potential amplifications or nonlinear interactions with the physics model. Thermal conductivity, however, is more sensitive to small changes in the geometry, as previously illustrated in the insets of Fig. 2i. The addition of only a few voxels to a high conductivity material may connect previously isolated regions, adding a new pathway for heat conduction and drastically increasing the effective thermal conductivity. Fig. 3c shows this to be the case, as the uncertainty distribution in thermal conductivity is nearly twice the uncertainty in volume fraction, with the physics interactions amplifying the uncertainty distribution.

In spite of their varying uncertainty magnitudes, both thermal conductivity and volume fraction follow a Normal distribution. We performed eleven simulations to produce the data points in Fig. 3c. Calculated using only the standard segmentation results (black and green markers), the CDF (solid curves) adequately captures the propagation of segmentation uncertainty to these two physics quantities. We found that the extra percentile segmentation simulation results (red markers), which were not used to calculate the CDF, fall on the CDF curves. Thus, the physics quantity uncertainty distribution that follows this Normal distribution can be adequately represented with only three physics simulations. This outcome validates our choice of this characteristic distribution.

However, three physics simulations are not adequate for fluid permeability, which is better approximated by a beta distribution (Fig. 3d). We hypothesize that the non-Normal uncertainty distributions are often the result of nonlinear physics interactions. For instance, the characteristic Normal distribution suggests that it is possible to have negative permeability, which is physically impossible. In this scenario, we needed to perform 10 percentile segmentations and physics simulations to acquire the uncertainty distribution.

### Graphite electrodes in lithium-ion batteries

For the next exemplar, we studied two visually distinct CT scans of graphite battery electrode microstructures: Electrode I (E1, Fig. 4a) and Electrode II (E2, Fig. 4e), where the segmented class describes the particle phase. This exemplar was selected to explore the role that image quality has on segmentation uncertainty. Subjective visual inspection of these two images suggests that the E2 image is sharper, with more visually distinct particles, while E1 has much less contrast between the particle and void phases and has blurrier edges. This subjective assessment is confirmed with the blind/referenceless image spatial quality evaluator (BRISQUE)48,49, where E1 scores a 159 and E2 scores a 125 (where a smaller BRISQUE score indicates superior perceptual image quality). Additionally, the grayscale histograms of each image (Fig. 4b, f) confirm this assessment, with E1 showing a much broader and single-mode distribution. It would be quite difficult to choose a simple threshold value for image segmentation based solely off of the histogram for E1. Given the qualitative and quantitative image quality differences between these two electrodes, we hypothesized that a credible segmentation uncertainty quantification approach should report a wider uncertainty distribution for a lower quality image such as E1.

It is worth noting that the CNN is performing a non-trivial segmentation. Gray histograms in Fig. 4b, f show the overall distribution of grayscale values for each image. For simple thresholding, the histogram would ideally exhibit a bimodal distribution, and the valley between the two peaks would be chosen as the threshold value. The red and green histograms represent the grayscale values that the network assigned to the particle and void classes, respectively. If a simple threshold had been used, then there would be a sharp vertical delineation between these two histograms. Instead, there is a region of grayscale values showing significant overlap between particle and void phase assignments. The overlap highlights the fact that the CNN is not simply a method for calculating a grayscale threshold; it is actually learning shapes and features in the image. Interestingly, the overlapping region is larger for the lower quality image (E1), confirming that the segmentation of this image is more difficult. Finally, the accuracy of the CNN segmentation is highlighted in Fig. 4c, g which show the μ percentile segmentation overlaid on the grayscale image. While the segmentation is accurate for both images, the accuracy is qualitatively better for the higher quality E2 image.

We chose to characterize two physics quantities relevant to battery performance: effective electrical conductivity and effective tortuosity, whose respective uncertainty distributions are shown in Fig. 4d, h relative to their mean values. The characteristic Normal distribution captures the uncertainty in electrical conductivity well for both electrodes (Fig. 4d), with only the tails deviating slightly from the Normal distribution values. However, the tortuosity uncertainty distribution follows the characteristic distribution less closely (Fig. 4h). For both E1 and E2, the characteristic distribution overestimates the data in the distribution tails.

Even more important are the relative uncertainty distributions between E1 and E2 for both physics quantities. As expected, the lower-quality image E1 has higher uncertainty than E2 for both the electrical conductivity (22.2% higher standard deviation) and the tortuosity (58.7% higher standard deviation). This discrepancy is direct evidence that EQUIPS is capturing the uncertainty associated with image quality (both noise and edge sharpness) and is propagating the uncertainty through the governing physical equations to the physics quantities. Finally, this exemplar provides credibility to EQUIPS, as our results intuitively correlate to both the visual assessment of the quality of the two CT scans (as blurry and sharp, respectively) and their verified BRISQUE scores.

### Human torso

In our final exemplar, we focus on the segmentation and simulation of both the spine and aorta from a human torso. A MCDN is used for this exemplar rather than the BCNN because of its ability to perform multi-class segmentations, but also to highlight the flexibility of EQUIPS, which can work with a variety of segmentation algorithms. We show the spine and aorta as green and orange, respectively, in 2D CT stacked slices to illustrate their location in the 3D image (Fig. 5a). A 3D representation of the μ-percentile segmentation of the spine and aorta class combination is shown in Fig. 5b. While simulations for each of these component organs are performed independently, this exemplar highlights the ability of our MCDN-based approach to perform multi-class analysis, segmenting and assessing the uncertainty of multiple organs simultaneously.

We begin with the spine, where the effective axial Young’s modulus is the scalar physics quantity. Full-field vertical and lateral displacements are visualized in Fig. 5c, d, respectively. Because of the intricately complex structure of the spine, which is comprised of irregular bone segments (vertebrae) connected by small joint regions, this exemplar shows more non-trivial nonlinear solution results than the previous exemplars. This connectivity results in a complex load path that admits numerous rotations of individual vertebrae, with the second vertebra from the bottom showing the highest vertical displacement and the fifth vertebra giving a negative displacement (net downward movement) in the anterior portion. The complex interconnections also result in a lateral bowing displacement on the same order of magnitude as the applied vertical displacement.

The complex spinal load path and displacements predictably lead to complex interactions between segmentation uncertainty and physics simulations, with the modulus distribution estimates shown in Fig. 5e. To accurately resolve the non-trivial physics uncertainty distribution, we ran 25 percentile segmentation simulations rather than the 10 used in previous exemplars. Clearly, the Normal distribution is a particularly poor fit to the simulation data. A half-Cauchy distribution fits much better because the additional voxels segmented as bone above the 75th percentile appears near the free-moving joint regions of the spine, significantly stiffening up the load path. In this case, not all bone is created equal as it contributes to the effective stiffness of the spine.

The aorta investigation focuses on the risk of abdominal aortic aneurysms, quantified by the ratio of the vessel wall area above a threshold shear stress (δτ, yellow regions in Fig. 5f)50. A second physics quantity that we explore is the ratio of outlet flow rates between the side vessel branches and the main aorta (Fig. 5g). Unlike the previous examples, the physics quantities in this exemplar are transient, as they are driven by a time-dependent pulsatile pressure gradient (gray curve in Fig. 5g).

Because of the relatively high flow rates, it takes at least four full pulse periods to reach a pseudo-steady-state flow solution, as shown by the flow-rate ratio in Fig. 5g. Instead of CDFs, which we have shown for scalar and steady-state physics quantities previously, we represent the uncertainty in this flow-rate ratio as a set of transient curves for each of the three standard segmentations, with the orange shaded region representing the μ ± σ uncertainty estimate. Larger percentile segmentations lead to a higher flow-rate ratio, as the added aorta voxels more significantly increase the available vessel flow area for the smaller side-branch vessels than the vertical main branch. Inertial effects of the flow additionally lead to both smoothing and delay in the peak of the flow-rate ratio compared to the applied inlet pressure.

Of all of the physics quantities up to this point, the aorta wall-shear-stress threshold ratio, δτ, shows the most complex (and initially counter-intuitive) interactions with segmentation uncertainty. Figure 5h shows the calculated ratio for each of the 11 calculated percentiles over the final pressure pulse, with line color representing the simulation’s percentile segmentation and thick solid curves representing the standard segmentations. While the behavior and trends during the peak of the flow, where the ratio is the highest, are monotonic and intuitive, the ratio later in time gradually becomes increasingly non-monotonic with the percentile segmentation. Surprisingly, the μ-percentile segmentation’s ratio crosses outside the bounds calculated from the (μ ± σ)-percentile segmentations. This result is unexpected but shows the sensitivity of propagating segmentation uncertainty in image-based simulations to calculated physics quantities, particularly when the physics model is complicated and nonlinear, such as the Navier–Stokes equations at a high Reynolds number.

To help further illustrate this critical result, the region between the (μ + σ)- and (μσ)-percentile segmentation ratio curves are shaded dark gray and the region between the 10- and 90-percentile segmentation curves is shaded light gray. At the ratio peak, the behavior is intuitive (i.e., monotonic) with the shaded regions enveloping all their respective curves. However, later in time, the ratio gradually becomes increasingly non-monotonic with percentile segmentation. At t = 7.8 s the 10- and 90-percentile segmentation ratios fail to bound other percentile segmentation ratios and ultimately intersect each other moments later. Moreover, each ratio becomes progressively intertwined with others, such that it becomes difficult to predict how a new percentile segmentation ratio calculation would fall on this graph.

The δτ curves portrayed in Fig. 5h emphasize the caution required in bounding segmentation uncertainty using only a few simulations. In the first two exemplars, the results are monotonic with increasing percentile segmentations, and the approximation of the uncertainty distribution using a CDF is representative. However, that does not have to be the case with more complicated models. For example, simply using (μ ± σ)-percentile segmentations to bound the segmentation uncertainty not only fails to encompass all of the intermediate percentile values, it also fails to capture the mean behavior. While this does not invalidate our approach to segmentation uncertainty quantification, it does urge caution in blindly performing simulations for only the standard segmentations for a new exemplar without first checking more intermediate segmentations.

## Discussion

In this work, we developed EQUIPS, a framework for quantifying image segmentation uncertainty and propagating that uncertainty to physics simulations to create uncertainty distributions for physics quantities. We demonstrated the general value and flexibility of EQUIPS in a multi-disciplinary context by using three carefully chosen exemplars. First, we used a woven composite material to show that EQUIPS can capture varied uncertainty distributions for different physics quantities, including both Normal and non-Normal distributions. Second, we used a battery electrode to show that lower-quality images have higher segmentation uncertainty than higher-quality images. Third, we applied EQUIPS to both time-dependent and multi-class datasets in a medical context. In doing so, we further discovered that physics simulations can amplify or suppress segmentation uncertainty in both linear and non-linear manners, leading to unpredictable results and requiring caution when simply propagating lower and upper segmentation uncertainty bounds to physics quantities.

We use a characteristic distribution, chosen as Normal distribution, to quickly approximate the underlying uncertainty distribution of a physics quantity using only the standard segmentations, which minimized the number of physics simulations necessary to recover a physics quantity uncertainty distribution from the probability map. If the characteristic distribution fits the data points well, then additional image-based simulations are not necessary. However, when the characteristic distribution fails to adequately capture individual physics quantity data points, then the probability map must be probed further. Using this rapid approach, we show that estimating the uncertainty distribution using the characteristic distribution works wells for some physics quantities. For example, thermal and electrical conductivity calculated from image-based simulations of the woven-composite material and battery electrodes both fit the Normal distribution nicely. However, we also show that the characteristic CDF for permeability of the woven composite and tortuosity of the battery electrodes poorly matches the distribution tails. Thus, EQUIPS is promising but is currently system- and physics-quantity-dependent. Nevertheless, the standard segmentations provide an excellent starting point for quantifying and propagating segmentation uncertainty to a physics quantity in image-based simulations.

Furthermore, in the medical exemplar, we show that the uncertainty distribution is non-trivial and can result in non-monotonic results. This is direct evidence that slightly changing the image segmentation can have drastic changes in the calculated physics quantities. Consequently, we caution against ad-hoc approaches9,26,47 at bounding uncertainty using only a handful of segmentations. Even within EQUIPS, the validity of the characteristic distribution must first be verified for a new exemplar using more percentile segmentations. However, we conjecture that, once the monotonicity and shape of the resulting distribution are confirmed for a specific material class and simulation type, a simpler approach is warranted for future similar images.

In this work, we use CNNs to probe image segmentation uncertainty through Monte Carlo sampling of the network, but CNNs are not a requirement in our workflow. Alternative methods of generating multiple image segmentation samples include the probing of manual segmentation9,51 and Bayesian Markov chain Monte Carlo52 algorithms. While we believe that CNN-based segmentation approaches are generally superior to these other algorithms, some of these approaches may already be in heavy use and their replacement with CNNs would be time-consuming. To quantify segmentation uncertainty using alternative segmentation algorithms, each of their output segmentations could be combined into a probability map by replacing the CNN model inferences in Fig. 2f with the multiple-image segmentations produced by these algorithms. For manual image segmentation, probability maps could be generated by having multiple subject matter experts each segment the image, which would then be combined into a probability map. However, there is a potentially unreasonably large overhead in having enough experts segment images to generate a statistically relevant probability map. In contrast, segmentation approaches such as random walker53 and trainable Weka segmentation54 return a voxel-wise probability map that can replace the probability map in our workflow (Fig. 2g), eliminating the need to generate multiple images segmentation samples. Although we have not demonstrated these approaches, replacing the CNN in our workflow with any of these methods would be relatively straightforward, and this plug-and-play feature of EQUIPS expands our workflow’s applicability beyond the requirements of neural networks.

In this exploration of segmentation uncertainty, we did not differentiate between the effects of aleatoric uncertainty (due to probabilistic events) and epistemic uncertainty (due to uncertainty in system information). Instead, we explored the combined effects in propagating segmentation uncertainty to physics predictions from image-based simulations. Furthermore, our segmentation uncertainty investigation focuses on segmentation uncertainty on a per-voxel level. However, it could be advantageous to understand correlations between the uncertainties of neighboring voxels. Future work on segmentation uncertainty can explore both of these avenues and many more.

In discussing the human torso, we introduced the concept of a multi-class image, one that includes more than one segmented phase. However, in our physics calculations for the torso, each segmented class was treated independently. A generalized approach to probing the segmentation uncertainty of multi-class images, where the physics calculation uses all of the classes in the image, is available in the supplementary information.

As we have shown, plausible changes to segmentations of image data can have a significant influence on physics quantities. This startling revelation suggests that segmentation uncertainty must be included in future image-based simulations to quickly determine whether the underlying governing equations are sensitive to image segmentation or image noise. Image-based simulation workflows with established credibility will spark future innovation in numerous new applications, including reducing drug-development time55, developing patient-specific cancer treatments7,9,56,57, in digital twins, and in qualifying additively manufactured components. While image collection and processing techniques will only improve, this work will set the foundation for realizing the impact that image segmentation uncertainty has on the uncertainty distributions of physics quantities from image-based simulation.

## Methods

### Convolutional neural networks

In this work, we use both MCDNs39 or Bayesian convolutional neural networks (BCNNs)58 to automate the task of CT segmentation. Each model is implemented with a V-Net architecture27 commonly used for 3D image segmentation. The main structural components are described as follows: a V-Net first downsamples the input CT scan volume through multiple resolutions, with each resolution containing convolutional filters ultimately resulting in a larger receptive field. Copies of the resulting outputs of each of these downsampling layers are passed on via skip connections to an upsampling half of the network as features in order to minimize information loss that results from downsampling. After symmetric upsampling, using deconvolutional layers of complementary size to the paired downsampling layer, the resulting output from all of the convolutional layers is of the original input size. Finally, a voxel-wise sigmoid or softmax activation function is applied to the volume, resulting in real-valued output for each voxel with a value between 0 and 1 for each class.

Segmentation uncertainty is inherently captured in both networks. In MCDNs, dropout layers that remove the output from a randomly selected subset of nodes in the neural network during each calculation are active during training (to mitigate overfitting) and during inference (to introduce variance in the model’s predictions). The standard deviation over many model inferences for the same input is a measure of the model’s uncertainty. In contrast, BCNNs frame the process of learning the network parameters as a Bayesian optimization task and, instead of point estimates, they learn a set of parameters—in most cases the mean and variance that define a Normal distribution over each network weight. Intuitively, the magnitude of the standard deviation of every weight’s distribution captures how uncertain the network is for that specific weight. By sampling the network multiple times on the same input, we effectively sample the network weight space. The uncertainty is then quantified in the output space of the network by calculating the variability in the voxel-wise sigmoid outputs over multiple samples of the weight space.

The BCNN46 combines the concepts of a BNN, the V-Net architecture, and several deep learning advances in training paradigms to produce a model capable of binary segmentation. The BCNN places a Gaussian prior distribution over each of the weights in the upsampling layers of the V-Net architecture. These distributions are then optimized to their final values through iterative training with a process known as Bayes by Backprop59. Bayes by Backprop introduces a physics-inspired cost function known as variational free energy, which consists of two terms. The first term is the Kullback–Leibler divergence, which measures the complexity of the learned distribution against the Gaussian prior distribution. The second term is the negative log-likelihood, which measures the error with respect to the training examples.

For training each model, we are faced with memory constraints imposed by GPUs, and we randomly sample uniformly sized subvolumes from the large CT scans to fit the model on the GPUs. For inference, we deduce on CT scan subvolumes (with some overlap) and stitch the results together to generate a complete segmentation prediction, as in LaBonte et al. 46. We generate 48 such predictions for each CT scan (Fig. 2f). Nominal predictions are calculated by turning off dropout in the MCDN and using the mean value of all weights in the BCNN.

Neural network training and inference were performed on two NVIDIA V100 GPUs with 32GB memory each.

### Probability maps and segmentation uncertainty

Consider a collection of N image segmentation samples of a 3D image in the set of classes C = {1, 2, …, nc}. The probability map, ϵv,i, for voxel v and class i is calculated from these N image segmentation samples using

$${\epsilon }_{v,i}=\frac{1}{N}\mathop{\sum }\limits_{k}^{N}{p}_{v,i}^{k}.$$
(1)

Here, $${p}_{v,i}^{k}$$ is the binarized value of voxel v in class i in the kth image segmentation sample, where $${p}_{v,i}^{k}=1$$ if v is in the segmented class and $${p}_{v,i}^{k}=0$$ if not. For a binary image (nc = 2) we only consider a single probability map for class i = 1, ϵv.

Segmentation uncertainty is quantitatively defined from the probability maps using the Shannon entropy measure:

$$H({\epsilon }_{v})=-\mathop{\sum}\limits_{i\in C}{\epsilon }_{v,i}{{{{{\mathrm{log}}}}}\,}_{2}({\epsilon }_{v,i})/{{{{{\mathrm{log}}}}}\,}_{2}({n}_{c}),$$
(2)

where $${{{{{\mathrm{log}}}}}\,}_{2}({n}_{c})$$ is utilized to normalize the uncertainty between 0 and 1. After normalization, a Shannon entropy equal to 1 indicates that the voxel is significantly uncertain, whereas values close to 0 are highly certain. Moreover, we can also quantify the segmentation uncertainty on a per-class basis using

$$H({\epsilon }_{v,i})=-{\epsilon }_{v,i}{{{{{\mathrm{log}}}}}\,}_{2}({\epsilon }_{v,i})/{{{{{\mathrm{log}}}}}\,}_{2}({n}_{c}).$$
(3)

Additional in-depth descriptions and demonstrations of the EQUIPS workflow for multi-class images (nc > 2) can be found in the Supplementary Information.

### Discretization

For the woven composite and medical exemplars, our physics simulation code requires a surface-conformal 3D volumetric mesh (discretization) of the simulation domain. First, a surface mesh is created from the images using the Lewiner marching cubes algorithm implemented in Python’s scikit-image. This algorithm is applied directly to the probability map using a contour level set equal to the percentile threshold value. By applying the marching cubes algorithm to the real-valued probability map, the generated surface mesh is smooth rather than the stair-stepped mesh that would result from applying to a segmented data set. The resulting surface mesh is exported to the Standard Tessellation Library (STL) format.

We create volumetric meshes using the conformal decomposition finite-element method (CDFEM)60, implemented in Sandia’s Sierra/Krino code. First, a background tetrahedral mesh of the entire simulation domain is created at the desired mesh resolution using Cubit 15.5. Next, the STL file surface mesh is overlaid on the background mesh and decomposed using CDFEM.

### Woven composite

A compression-molded silica phenolic composite was used for imaging. The woven composite material is composed of multiple layers of an 8-harness silica fiber cloth (Refrasil) impregnated with a phenolic resin (SC-1008, Durite) and pressed/cured according to Durite manufacturing specifications. It was imaged via X-ray computed tomography at a 7.3 micron resolution with a domain size of 616 × 616 × 979 voxels.

For segmentation, the BCNN was trained using one full CT scan example with a manually generated label. We divided the scan into 64 subvolumes. For training, we used 54 subvolume examples and held 10 for model validation. The model was trained for five epochs with a learning rate of 0.001, and used 64 × 128 × 128 voxel subvolumes of inputs, with a batch size of 8. The BCNN was given a zero mean, unit variance Gaussian prior and a Kullback–Leibler loss coefficient introduced at epoch 2, increasing by 0.25 per epoch thereafter.

Effective thermal conductivity is calculated by solving the steady-state Fourier’s Law in three dimensions. The matrix is isotropic with thermal conductivity of 0.278 W/(m  K), while the fabric material is transversely isotropic with thermal conductivity of 4.0 W/(m  K) in the fabric in-plane direction with half that in the fabric-normal direction. A temperature gradient is applied in the out-of-plane direction using Dirichlet boundary conditions, and there is zero flux through all other boundaries. The effective thermal conductivity is calculated from the mean heat flux through one of the boundaries divided by the imposed temperature gradient.

Permeability of the fabric is calculated by solving for Stokes flow around the fabric phase (assuming the matrix is unfilled). A pressure gradient is imposed in the out-of-plane direction with no-slip boundary conditions imposed on the fabric surfaces and no-flux boundary conditions on the other external boundaries. Permeability is calculated from the resulting fluid flux on an external boundary, the porosity, and the imposed pressure gradient.

All physics simulations are performed using Sandia’s Sierra/Aria Galerkin finite element code.

### Graphite electrodes in lithium-ion batteries

E1 and E2 are commercially available Lithium-ion battery electrodes imaged using X-ray computed tomography. In particular, E1 and E2 represent Electrode IV13 and Litarion26 graphite datasets, respectively. E1 has a voxel size of 0.325 microns and an image size of 1100 × 1100 × 194, while E2 has a voxel size of 0.1625 microns and an image size of 1100 × 1100 × 405.

We trained two BCNN models, one with each of the E1 and E2 battery examples and validated each model using the same examples, but flipped along the x-axis with manually generated labels. Each model was trained for three epochs with a learning rate of 0.001. The inputs in one batch size consisted of 88 × 176 × 176 voxel subvolumes. The BCNN used a zero-mean-unit-variance Gaussian prior and a Kullback–Leibler loss coefficient that started at 0.33. After each epoch, the loss coefficient increased by 0.33.

An in-house finite-volume method code developed by Mistry et al. 61 solves Laplace’s equation for tortuosity and electrical conductivity separately, using a structured voxellated grid (implying that the discretization step described above is not necessary). Simulations involving E1 and E2 are performed on a subdomain size of 84.5 × 84.5 × 68.575 and 84.5 × 84.5 × 65.8125 μm, respectively. Laplace’s equation is solved for both tortuosity and electrical conductivity, with a nondimensional conductivity value of unity for the transporting phase (pore space for tortuosity, particle phase for conductivity) and a value of 10−6 for the non-transporting phase. A potential gradient is applied using Dirichlet boundary conditions on opposing boundaries with no flux on the remaining boundaries. The effective transport property is calculated by dividing the resulting flux by the imposed potential gradient. Similarly, tortuosity is calculated as the porosity over the effective transport property.

### Human torso

Our medical data is taken from an open-source database of anonymous patient medical images consisting of 3D CT scans and manual segmentations of the chest/abdominal region62. Scan 2.2 is used for this exemplar, which has a dimension of 512 × 512 × 219 voxels and per-voxel resolution 0.961 × 0.961 × 2.4 mm.

The MCDN is used for this exemplar because of its ability to perform multi-class (i.e. multi-organ) segmentation, whereas the BCNN currently supports one-class binary segmentation (suitable only for a single organ/material). The model is trained using two labeled examples (scans 2.1 and 2.2) that were normalized and transformed into logarithmic space. Six subvolumes of 64 × 192 × 192 voxels were used for each image, four down- and up-sampling blocks in the V-Net architecture, and a dropout rate of 0.1.

Effective Young’s modulus in the axial (vertical) direction is calculated by solving for the quasi-static conservation of linear momentum using Sandia’s Sierra/Aria Galerkin finite-element code. The bone is considered to be a linear elastic material with bulk modulus of 4.762 GPa and Poisson’s ratio of 0.22. The aorta and other surrounding tissues are omitted from the simulation. The top of the spine is held fixed in space, while a prescribed vertical displacement of 10−4 m is applied to the bottom spine surface. Young’s modulus is calculated using the normal force on the bottom surface, the applied displacement, and the domain length.

Aortic blood flow simulations were performed using Sierra/Fuego. The incompressible Navier–Stokes equations were solved using a Newtonian constitutive model with dynamic viscosity μ = 0.003 kg  m−1 s−1 and blood density ρ = 1060 kg  m−363. No-slip boundary conditions are enforced on the aorta walls and zero-pressure boundary conditions at the outlet surfaces. The inflow pressure is transient to mimic physiological circulation patterns and is estimated from Benim et al. 63 using the Hagen–Poisuille equation to achieve a time-averaged volumetric flow rate of 8 L/min. Simulations are initialized with a stationary fluid and are performed for 10 complete pulses to achieve a pseudo-steady-state flow profile.

We calculate two physics quantities from these aorta simulations. First is the flow-rate ratio, which is the ratio of the flow rate through the smaller side vessels branching off the main abdominal aorta to the flow rate through the main aorta branch vessels. The second is the wall-shear-stress threshold ratio δτ. We compute the wall shear stress on the aorta walls and identify any area with a stress measurement above 0.2 Pa, which indicates a significant risk for aneurysm50. This value is then normalized by the total aorta surface area for the physics quantity that we investigate. The aortic wall shear stress is relevant as an indicator for aneurysms50. Thus, this wall-shear-stress threshold ratio indicates the percentage of the aorta wall vulnerable to aneurysms.


text:
# Capacitor efficiency problem

1. Feb 12, 2007

### map7s

1. The problem statement, all variables and given/known data

A 0.45 µF capacitor is charged by a 1.5 V battery. After being charged, the capacitor is connected to a small electric motor. Assuming 100% efficiency, to what height can the motor lift a 4.7 g mass?

2. Relevant equations

I really need some direction to start off this problem. I think that I probably need to use U=1/2QV=1/2CV^2=Q^2/2C and/or Q=CV but I have no idea how to go about doing this.

2. Feb 12, 2007

### antonantal

The whole idea of this problem is that if the efficiency is 100% no energy will be lost. So all the energy stored in the capacitor will be used to lift that mass. Now what would be the energy necessary to lift that mass to a height h?

3. Feb 12, 2007

### map7s

So...would I have to use Q=CV to find out Q and then use U=1/2QV to find out U ?

4. Feb 12, 2007

### antonantal

You could use any of the 3 formulas you mention, though since you know $$C$$ and $$V$$ the fastest would be to use $$U=\frac{CV^2}{2}$$

format: plain


text:
# Which transformation will result in an image which is similar but not congruent to the pre-image

Which transformation will result in an image which is similar but not congruent to the pre-image

## This Post Has One Comment

1. tatta95 says:

Dilation

Step-by-step explanation:

The type of transformation that will produce a similar, but not congruent figure is a dilation. A dilation is a transformation , with center O and a scale factor of k that is not zero, that maps O to itself and any other point P to P'.


text:
# Is there a relationship between relational algebra/calculus and category theory?

I am aware of at least two different theoretical approaches for understanding relational databases: Codd's relational algebra/calculus, and category theory.

Is there any relationship between these two approaches? Are they in some sense equivalent? Is there any introductory work explaining how both of these frameworks explain relational databases?

Background: A while ago I read David Spivak's Category Theory for Scientists which spent quite some time discussing how category theory could be applied to understand the theory of relational databases. However, having little personal experience about what relational databases are or why they are useful, at the time I did not fully appreciate the depths of insight found in the book.

However, recently I have been learning about SQL queries and two R packages for data manipulation: dplyr and data.table. SQL can apparently express much of the ideas of Codd's relational algebra/calculus/model, but not all. Moreover, the author of dplyr, Hadley Wickham, has stated explicitly that his philosophy underlying the package is based on Codd's work on relational algebra, and the basic commands of data.table map fairly well to commands in SQL and dplyr.

I also know that category theory influences a lot of programmers using functional programming languages like Haskell. However, I am not really aware of there being any use of functional programming for data manipulation or data science, besides Hadley Wickham's purrr package for R, the fact that Apache Spark is written in Scala, and technologies related to MapReduce.

All of this sort of suggests to me that there should be some sort of relationship between category theory and Codd's relational algebra/calculus, but I have never heard of anyone making such a connection explicit or explain how it underlies the design decisions in popular data manipulation and relational database technologies. So I also suspect I could be entirely wrong.

EDIT: Apparently David Spivak has worked on a "functorial query language (FQL)". This sounds like it might be an application of such a theoretical connection, provided it exists.

Note: I am not sure if "relational-structures" is the appropriate tag for discussion of relational databases or relational algebra/calculus. This Wikipedia article suggests they might be connected, but ultimately I don't know what the phrase "relational structure" means. Please feel free to re-tag.

Categorical approaches to query languages is a bit of a niche interest, but I think it's a very interesting niche!

Two of the key figures in this area are Peter Buneman and Torsten Grust. Obviously, they didn't do all the work, but if you start with their papers and trace out the citation graph, you'll get pretty good coverage of the area.

The central observation that they work from is that since a relation can be viewed as a set of tuples, the powerset functor can be interpreted as taking a tuple type to the type of relations over that tuple. Then, the fact that the powerset functor forms a monad means that you can use ideas inspired by Philip Wadler's monad comprehension syntax to give a categorically-inspired calculus for queries with a rich equational theory.

Indeed, Buneman et al's query system Kleisli got its name from the fact that monads are sometimes called "Kleisli triples".

Grust's PhD thesis, Comprehending Queries, works this out these ideas in detail, including the use of monad morphisms to model aggregation operators (like sum and count). Grust and his group also built a system, Ferry, which studied how to integrate databases into programming languages.

One of the main issues in this work (and also in Kleisli, if memory serves), is that monadic query languages tend to be a bit more expressive than relational algebra -- they permit queries to handle sets of sets. Compiling this to SQL or relational algebra requires some care (for example, see Cheney et al's A practical theory of language-integrated query), but the basic issue has a very nice categorical formulation. Relational algebra only uses the monoidal structure of the powerset functor, i.e., the existence of a cartesian product natural transformation $(\bullet) : \mathcal{P}(X) \times \mathcal{P}(Y) \to \mathcal{P}(X \times Y)$; and monadic query languages also demand the join, $\mu : \mathcal{P}(\mathcal{P}(X)) \to \mathcal{P}(X)$.

That's probably the primary stream of work on categorical approaches to query languages.

A new idea (which unfortunately hasn't gotten as much traction as I think it deserves) is David Spivak's work on using simplicial sets to model databases -- see Simplicial Databases. The central innovation is that the simplicial structure permits explicitly modelling the whole database schema including the relationships between tables (eg, the system of foreign keys), and this enables giving semantics to schema update operations.

Another deviation from standard query languages are restricted logic programming languages such as Datalog, which can be understood as relational algebra plus a fixed point operator. Fixed points permit expressing things like transitive closure queries, and so new databases like Datomic feature query languages based on Datalog. My PhD student, Michael Arntzenius, and I have studied the semantics of Datalog, and come up with a functional analogue we call Datafun, which has a pretty categorical interpretation in terms of the categories of posets and semilattices.


text:
Criteria for Lipschitz continuity - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-21T12:49:23Z http://mathoverflow.net/feeds/question/109613 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/109613/criteria-for-lipschitz-continuity Criteria for Lipschitz continuity djoke 2012-10-14T13:54:57Z 2012-10-17T07:54:36Z
Is the following statement true. Assume that $f:[0,1]\to [0,1]$ is a continuous function such that $$\sup_t\lim\sup_{s\to t}\frac{|f(s)-f(t)|}{|t-s|}<\infty,$$ then $f$ is Lipchitz continuous.
 http://mathoverflow.net/questions/109613/criteria-for-lipschitz-continuity/109744#109744 Answer by Misha for Criteria for Lipschitz continuity Misha 2012-10-15T18:40:09Z 2012-10-15T18:40:09Z
Even more is true: Suppose that $E$ is a measurable subset of an interval, $f$ is a function on $E$ so that for every $x\in E$, $|D^+(f)(x)|\le M$ (the quantity $|D^+(f)|$ is defined below). Then $$mes(f(E))\le M \cdot mes(E),$$ see e.g. the proof of Lemma 3.13 in http://www.ams.org/bookstore/pspdf/gsm-105-prev.pdf ("A First Course in Sobolev Spaces" by G.Leoni). Here $mes$ is the (outer) Lebesgue measure and $$|D^+(f)(x)|= \lim sup_{y\to x} \frac{|f(x)-f(y)|}{|x-y|}$$ Note that Lemma 3.13 assumes that $f$ is differentiable, but the proof uses only the upper bound $|D^+(f)(x)|\le M$ for all $x$. In your case, $E$ is an interval $[s,t]$ in $[0,1]$ and $$M= \sup_{x} \lim sup_{y\to x} \frac{|f(x)-f(y)|}{|x-y|}$$ Then, you conclude that for every $s$ and $t$ in the interval $[0,1]$, $$|f(s)-f(t)|\le mes (f([s,t])) \le M |s-t|$$ and, hence, your function $f$ is $M$-Lipschitz.
 http://mathoverflow.net/questions/109613/criteria-for-lipschitz-continuity/109768#109768 Answer by Pietro Majer for Criteria for Lipschitz continuity Pietro Majer 2012-10-15T22:49:21Z 2012-10-17T07:54:36Z
Yes, it's not hard to show that $f$ is Lipschitz of constant $$k:=\sup_t\lim\sup_{s\to t}\frac{|f(s)-f(t)|}{|t-s|}\ .$$

Indeed, let's take any $l > k$. By assumption, any $t\in I:=[0,1]$ has a nbd $J_t:=]t',t''[\cap I$ such that for any $s\in J_t$ one has $|f(s)-f(t)|\le l|t-s|$. Extract a finite covering of $I$ by these nbd's, say $J_{t_0}\dots J_{t_{n }}$ with $0:=t_0 < t_1 < t_2 <\dots < t_n:= 1$, and assume it is minimal. By minimality, it follows $J_{t_i}\cap J_{t_{i+1}}\neq\emptyset$ for all $0\le i < n$. As a consequence, there is a sequence $0:=s_0 \le s_1 \le \dots \le s_{2n}:=1$ such that $s_{2i}=t_i$ and $s_{2i+1}\in J_{t_i}\cap J_{t_{i+1}}$, Therefore, since any two consecutive $s_j$'s are (in some order) a $t_i$ and an element of $J_{t_i}$, we have $$|f(1)-f(0)|\le \sum_{i=0}^{2n-1}\big|f(s_{i+1}) - f(s_i)\big|\le l\sum_{ i = 0 }^{2n-1} (s_{i+1} - s_i)=l\ ,$$ and in fact $|f(1)-f(0)|\le k$ because the above inequality holds for any number $l > k$. This also implies, by rescaling and localizing, $$|f(b)-f(a)|\le k |b-a|$$ for all $a$ and $b$ in $I$. $$*$$  I realize now that there is another proof (which is, in a sense, the true proof) that follows from a beautiful theorem by Antoni Zygmund. Let $D f$ represent any of the Dini's derivatives of $f$ .

Theorem. Let $f:[a,b]\rightarrow\mathbb{R}$ be continuous, and assume that the set $f(\{Df \le 0\} )$ is nowhere dense. Then $f$ is increasing.

What is great of this theorem is the statement, natural and powerful; once you know the statement, the proof is not difficult by a nice argument by contradiction (assume that e.g. $f(a) > f(b)$ and consider a value $\lambda\in \big( f(b), f(a) \big)\setminus f(\{Df \le 0\} )$; then argue on the larger $t$ such that $f(t)=\lambda$...). There should be a proof in Mc Shane and Botts' Real Analysis, I think.

In your case, apply Zygmund's theorem to the functions $t\mapsto lt\pm f(t)$, with any $l > k$, as above and conclude that $f$ is $k$ Lipschitz.

Another well-known application of this theorem:

Theorem. Let $f:[a,b]\rightarrow\mathbb{R}$ be continuous and admit $f'(t) \ge0$ up to countably many points; or either, absolutely continuous and $f'(t)\ge 0$ a.e. Then $f$ is increasing.

(as before life is simpler applying Zygmund's theorem first to $t\mapsto f+\epsilon t$ with $\epsilon > 0$).


text:
# matplotlib.pyplot.specgram¶

matplotlib.pyplot.specgram(x, NFFT=None, Fs=None, Fc=None, detrend=None, window=None, noverlap=None, cmap=None, xextent=None, pad_to=None, sides=None, scale_by_freq=None, mode=None, scale=None, vmin=None, vmax=None, *, data=None, **kwargs)[source]

Plot a spectrogram.

Compute and plot a spectrogram of data in x. Data are split into NFFT length segments and the spectrum of each section is computed. The windowing function window is applied to each segment, and the amount of overlap of each segment is specified with noverlap. The spectrogram is plotted as a colormap (using imshow).

Parameters: x1-D array or sequenceArray or sequence containing the data. Fsfloat, default: 2The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. windowcallable or ndarray, default: window_hanningA function or a vector of length NFFT. To create window vectors see window_hanning, window_none, numpy.blackman, numpy.hamming, numpy.bartlett, scipy.signal, scipy.signal.get_window, etc. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. sides{'default', 'onesided', 'twosided'}, optionalWhich sides of the spectrum to return. 'default' is one-sided for real data and two-sided for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. pad_toint, optionalThe number of points to which the data segment is padded when performing the FFT. This can be different from NFFT, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the n parameter in the call to fft(). The default is None, which sets pad_to equal to NFFT NFFTint, default: 256The number of data points used in each block for the FFT. A power 2 is most efficient. This should NOT be used to get zero padding, or the scaling of the result will be incorrect; use pad_to for this instead. detrend{'none', 'mean', 'linear'} or callable, default 'none'The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the detrend parameter is a vector, in Matplotlib is it a function. The mlab module defines detrend_none, detrend_mean, and detrend_linear, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls detrend_none. 'mean' calls detrend_mean. 'linear' calls detrend_linear. scale_by_freqbool, default: TrueWhether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz^-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. mode{'default', 'psd', 'magnitude', 'angle', 'phase'}What sort of spectrum to use. Default is 'psd', which takes the power spectral density. 'magnitude' returns the magnitude spectrum. 'angle' returns the phase spectrum without unwrapping. 'phase' returns the phase spectrum with unwrapping. noverlapintThe number of points of overlap between blocks. The default value is 128. scale{'default', 'linear', 'dB'}The scaling of the values in the spec. 'linear' is no scaling. 'dB' returns the values in dB scale. When mode is 'psd', this is dB power (10 * log10). Otherwise this is dB amplitude (20 * log10). 'default' is 'dB' if mode is 'psd' or 'magnitude' and 'linear' otherwise. This must be 'linear' if mode is 'angle' or 'phase'. Fcint, default: 0The center frequency of x, which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. cmapColormap, default: rcParams["image.cmap"] (default: 'viridis') xextentNone or (xmin, xmax)The image extent along the x-axis. The default sets xmin to the left border of the first bin (spectrum column) and xmax to the right border of the last bin. Note that for noverlap>0 the width of the bins is smaller than those of the segments. **kwargsAdditional keyword arguments are passed on to imshow which makes the specgram image. spectrum2-D arrayColumns are the periodograms of successive segments. freqs1-D arrayThe frequencies corresponding to the rows in spectrum. t1-D arrayThe times corresponding to midpoints of segments (i.e., the columns in spectrum). imAxesImageThe image created by imshow containing the spectrogram.

psd
Differs in the default overlap; in returning the mean of the segment periodograms; in not returning times; and in generating a line plot instead of colormap.
magnitude_spectrum
A single spectrum, similar to having a single segment when mode is 'magnitude'. Plots a line instead of a colormap.
angle_spectrum
A single spectrum, similar to having a single segment when mode is 'angle'. Plots a line instead of a colormap.
phase_spectrum
A single spectrum, similar to having a single segment when mode is 'phase'. Plots a line instead of a colormap.

Notes

The parameters detrend and scale_by_freq do only apply when mode is set to 'psd'.

Note

In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments can also be string s, which is interpreted as data[s] (unless this raises an exception): x.

Objects passed as data must support item access (data[s]) and membership test (s in data).


text:
# Integrable in the extended sense: Question about Spivak “Calculus on Manifolds” definition.

On Spivak "Calculus on Manifolds" he builds the concept of integration on an incremental fashion:

• He starts by defining the integral $$\int_R f$$ on a rectangle R;

• Next he define the concept of characteristic function: $$$$X_C = 1 \text{ if }x\in C \text{ else } 0.$$$$ And use this concept for generalize the definition of integral for a region $$C$$, by defining $$\int_C f = \int_R f \cdot X_C$$ for $$C$$ contained in a rectangle $$R$$. This concept works for all the cases when C boundary has measure 0 and $$X_C$$ is integrable (see theorem 3-9 of the same book).

• Then he defines partitions of the unit to generalize this concept even further. Using the concept of partition of the unit he defines the integral in the extended sense as: $$$$\sum_{\phi \in \Phi}\int_A\phi \cdot f$$$$ where $$\Phi$$ is a collection of functions such that $$\phi \in \Phi$$. Some properties of this functions are described next

Be $$A$$ a bonded region and $$O$$ and open cover to it, it can be proved that (see theorem 3-11 of the same book) there exist a collection $$\Phi$$ of $$C^\infty$$ functions such:

• $$0 \le\phi(x) \le 1$$
• A finite number of $$\phi(x)$$ is different than zero in a open set containing $$x \in A$$
• $$\sum_{\phi \in \Phi} \phi(x) = 1$$
• For each $$\phi \in \Phi$$ there is an open set $$U \in O$$ such that $$\phi=0$$ outside of some closed set contained in $$U$$. Let us call this closed set $$C$$.

So my question is: how can we prove $$\int_A\phi \cdot f$$ is integrable?

My understanding about the question is the following: From the above definition it follows that $$\int_A\phi \cdot f = \int_C\phi \cdot f$$. So if $$C$$ boundary has measure $$0$$ we could use the previous definition of integration to say this function is integrable in this region...But how can we prove that this is indeed the case?

I studied from Calculus on Manifolds this year, and in this section, I found that his treatment was a little sloppy. First, there is a huge error in the entire section of partitions of unity: in property ($$4$$) of Theorem $$3$$-$$11$$, "... outside of some closed set contained in $$U$$", the word "closed" should be replaced with "compact". So, property (4) can be rephrased equivalently by requiring that the support of $$\varphi$$ be a compact subset of $$U$$, where the support is defined as the topological closure of the set of points where $$\varphi$$ is non-zero. $$$$\text{supp}(\varphi) := \overline{\{ x \in \mathbb{R^n}: \varphi(x)\neq 0\}}.$$$$

Next, to define the extended integral, I think this is a better definition (it's almost the same, but there are a few subtle differences):

Definition/Proposition:

Let $$A$$ be an open subset of $$\mathbb{R^n}$$, $$\mathcal{O}$$ an admissible open cover for $$A$$, and $$\Phi$$ be a $$\mathcal{C^0}$$ partition of unity for $$A$$ subordinate to $$\mathcal{O}$$, with compact support. Let $$f: A \to \mathbb{R}$$ be a locally bounded function (every point has a neighbourhood on which $$f$$ is bounded) such that $$\mathcal{D}_f$$, the set of discontinuities of $$f$$ has measure zero. Then, for every $$\varphi \in \Phi$$, the integrals $$$$\int_{\text{supp}(\varphi)} \varphi \cdot |f| \qquad \text{and} \qquad \int_{\text{supp}(\varphi)} \varphi \cdot f$$$$ exist according to the old definition (the one involving characteristic functions). We define $$f$$ to be integrable on $$A$$, in the extended sense if $$$$\sum_{\varphi \in \Phi} \int_{\text{supp}(\varphi)} \varphi \cdot |f|$$$$ converges. In this case, we define $$$$(\text{extended}) \int_{A} f = \sum_{\varphi \in \Phi} \int_{\text{supp}(\varphi)} \varphi \cdot f$$$$

The two differences are: I only required $$\Phi$$ to be $$\mathcal{C^0}$$, not $$\mathcal{C^{\infty}}$$, and second, I put $$\displaystyle \int_{\text{supp}(\varphi)} \varphi \cdot |f|$$ rather than $$\displaystyle \int_{A} \varphi \cdot |f|$$. The reason I made the second change is because the purpose of this definition is to define integration on an open set (which may be unbounded), so writing $$\displaystyle \int_{A} \varphi \cdot |f|$$ isn't even defined based on all the old definitions. However, this isn't a huge deal, because later on we can show that $$$$(\text{extended})\displaystyle \int_{A} \varphi \cdot |f| = (\text{old}) \displaystyle \int_{\text{supp}(\varphi)} \varphi \cdot |f|$$$$ But, from a logical standpoint, we should not use the symbol $$\displaystyle \int_A \varphi \cdot f$$ in a definition where we're trying to define the meaning of integration on $$A$$ (note that we have to use another partition of unity $$\Psi$$ to make sense of the LHS above).

Proof $$\displaystyle \int_{\text{supp}(\varphi)} \varphi \cdot f$$ exists according to old definition:

To prove this, we need to show that $$\varphi f$$ is bounded on a rectangle $$R$$ containing supp$$(\varphi)$$, and that $$\varphi f \cdot \chi_{\text{supp}(\varphi)}$$ is integrable on $$R$$. To prove boundedness, note that for each $$x \in \text{supp}(\varphi)$$, since $$f$$ is locally bounded, there is an open neighbourhood $$V_x$$ of $$x$$, and a number $$M_x > 0$$ such that $$|f| \leq M_x$$ on $$V_x$$. The collection of all such $$V_x$$ forms an open cover of $$\text{supp}(\varphi)$$, hence by compactness, there is a finite subcover, say by $$V_{x_1}, \dots, V_{x_k}$$. Then $$f$$ is bounded by $$M = \max \{M_{x_i} \}_{i=1}^k$$ on supp($$\varphi$$). Since $$\varphi = 0$$ outside $$\text{supp}(\varphi)$$, it follows that $$\varphi \cdot f$$ is bounded everywhere (by $$M$$).

Next, let $$R$$ be a closed rectangle containing $$\text{supp}(\varphi)$$. It is easy to verify that \begin{align} \varphi f \cdot \chi_{\text{supp}(\varphi)} = \varphi f \tag{*} \end{align} (because outside the support, both sides are $$0$$). Also, since $$f$$ has a discontinuity set of measure zero, and since $$\varphi$$ is continuous, it follows that $$\varphi f \cdot \chi_{\text{supp}(\varphi)} = \varphi f$$ also has a discontinuity set of measure zero; hence $$\varphi f \cdot \chi_{\text{supp}(\varphi)}$$ is integrable on $$R$$ according to the very first definition. This proves $$\displaystyle \int_{\text{supp}(\varphi)} \varphi \cdot f$$ exists according to the old definition. By replacing $$f$$ with $$|f|$$ everywhere, you can see that $$\displaystyle \int_{\text{supp}(\varphi)} \varphi \cdot |f|$$ also exists according to the old definition.

Remarks:

• Notice that because of (*), it doesn't matter whether or not the boundary of $$\text{supp}(\varphi)$$ has measure zero. $$\varphi \cdot f$$ is integrable on $$\text{supp}(\varphi)$$ anyway.
• Notice that by definition, $$\text{supp}(\varphi)$$ is the closure of a set and hence closed. But this is not good enough, we need it to be compact so that the boundedness argument above works.
• If $$V \subset A$$ is a bounded open set containing $$\text{supp}(\varphi)$$, then $$\displaystyle \int_V \varphi \cdot f$$ exists according to the old definition; this should be immediate since $$\displaystyle \int_{\text{supp}(\varphi)} \varphi \cdot f$$ has already been shown to exist. In this case, $$$$\int_V \varphi \cdot f = \int_{\text{supp}(\varphi)} \varphi \cdot f$$$$

Spivak often skips many steps and you have to read every sentence leading up to a theorem carefully.

The discussion of the definition and convergence of the extended integral $$\sum_{\phi \in \Phi}\int_A\phi \cdot f$$ uses the fact that the integral $$\int_A \phi \cdot f$$ exists. This in turn is based on the assumptions stated in the first sentence on page 65:

An open cover $$\mathcal{O}$$ of an open set $$A \subset \mathbb{R}^n$$ is admissible if each $$U \in \mathcal{O}$$ is contained in $$A$$.

Note that $$A$$ is assumed to be open and $$\mathcal{O}$$ is assumed to be admissible, meaning that $$A$$ is covered by open subsets $$U \subset A$$.

Spivak goes on to say:

If $$\Phi$$ is subordinate to $$\mathcal{O}$$, $$f:A \to \mathbb{R}$$ is bounded in some open set around each point of $$A$$, and $$\{x: f \text{ is discontinuous at } x\}$$ has measure $$0$$, then $$\int_A \phi \cdot |f|$$ exists.

Implicit in this statement is the existence of $$\int_A \phi \cdot f$$ which implies the existence of $$\int_A \phi \cdot |f|$$.

Given that $$A$$ is open and $$\mathcal{O}$$ is admissible, we can proceed to prove the existence of the integral. Since $$\Phi$$ is subordinate to $$\mathcal{O}$$, for each $$\phi \in \Phi$$ there is some open set $$U \in \mathcal{O}$$ and some closed set $$F$$ such that $$F \subset U \subset A$$ and $$\phi = 0$$ outside of $$F$$.

Hence, $$\phi \,$$ vanishes in $$A \setminus U,$$ and $$\int_{A \setminus U} \phi \cdot f$$ exists regardless of the measure of the boundary of A. Also $$\phi \cdot f$$ vanishes on the boundary of $$U$$ and is continuous almost everywhere in $$U$$ (since $$\phi \in C^\infty$$ with compact support in $$U$$). Thus, $$\int_U \phi \cdot f$$ exists and, regardless of the Jordan-measurability of $$A$$, it follows that

$$\int_A \phi \cdot f = \int_U \phi \cdot f + \int_{A \setminus U} \phi \cdot f$$

Spivak then defines $$f$$ to be integrable in the extended sense if $$\sum_{\phi \in \Phi} \int_A \phi \cdot |f|$$ (with $$\phi$$ arranged in a sequence) converges. Since $$\left| \int_A \phi \cdot f\right| \leqslant \int_A \phi \cdot |f|$$, the series $$\sum_{\phi \in \Phi} \int_A \phi \cdot f$$ is absolutely convergent.


text:
# PID Control: Is adding a delay before the next loop a good idea?

I am implementing PID control in c++ to make a differential drive robot turn an accurate number of degrees, but I am having many issues.

Exiting control loop early due to fast loop runtime

If the robot measures its error to be less than .5 degrees, it exits the control loop and consider the turn "finished" (the .5 is a random value that I might change at some point). It appears that the control loop is running so quickly that the robot can turn at a very high speed, turn past the setpoint, and exit the loop/cut motor powers, because it was at the setpoint for a short instant. I know that this is the entire purpose of PID control, to accurately reach the setpoint without overshooting, but this problem is making it very difficult to tune the PID constants. For example, I try to find a value of kp such that there is steady oscillation, but there is never any oscillation because the robot thinks it has "finished" once it passes the setpoint. To fix this, I have implemented a system where the robot has to be at the setpoint for a certain period of time before exiting, and this has been effective, allowing oscillation to occur, but the issue of exiting the loop early seems like an unusual problem and my solution may be incorrect.

D term has no effect due to fast runtime

Once I had the robot oscillating in a controlled manner using only P, I tried to add D to prevent overshoot. However, this was having no effect for the majority of the time, because the control loop is running so quickly that 19 loops out of 20, the rate of change of error is 0: the robot did not move or did not move enough for it to be measured in that time. I printed the change in error and the derivative term each loop to confirm this and I could see that these would both be 0 for around 20 loop cycles before taking a reasonable value and then back to 0 for another 20 cycles. Like I said, I think that this is because the loop cycles are so quick that the robot literally hasn't moved enough for any sort of noticeable change in error. This was a big problem because it meant that the D term had essentially no effect on robot movement because it was almost always 0. To fix this problem, I tried using the last non-zero value of the derivative in place of any 0 values, but this didn't work well, and the robot would oscillate randomly if the last derivative didn't represent the current rate of change of error.

Note: I am also using a small feedforward for the static coefficient of friction, and I call this feedforward "f"

I realized that I think the source of both of these issues is the loop running very very quickly, so something I thought of was adding a wait statement at the end of the loop. However, it seems like an overall bad solution to intentionally slow down a loop. Is this a good idea?

turnHeading(double finalAngle, double kp, double ki, double kd, double f){
std::clock_t timer;
timer = std::clock();

double pastTime = 0;
double currentTime = ((std::clock() - timer) / (double)CLOCKS_PER_SEC);

finalAngle = angleWrapDeg(finalAngle);

const double initialAngleDiff = initialHeading - finalAngle;
double pastError = error;

double firstTimeAtSetpoint = 0;
double timeAtSetPoint = 0;
bool atSetpoint = false;

double integral = 0;
double derivative = 0;
double lastNonZeroD = 0;

while (timeAtSetPoint < .05)
{

currentTime = ((std::clock() - timer) / (double)CLOCKS_PER_SEC);
double dt = currentTime - pastTime;

double proportional = error / fabs(initialAngleDiff);
integral += dt * ((error + pastError) / 2.0);
double derivative = (error - pastError) / dt;

//FAILED METHOD OF USING LAST NON-0 VALUE OF DERIVATIVE
// if(epsilonEquals(derivative, 0))
// {
//     derivative = lastNonZeroD;
// }
// else
// {
//     lastNonZeroD = derivative;
// }

double power = kp * proportional + ki * integral + kd * derivative;

if (power > 0)
{
setMotorPowers(-power - f, power + f);
}
else
{
setMotorPowers(-power + f, power - f);
}

if (fabs(error) < 2)
{
if (!atSetpoint)
{
atSetpoint = true;
firstTimeAtSetpoint = currentTime;
}
else //at setpoint
{
timeAtSetPoint = currentTime - firstTimeAtSetpoint;
}
}
else //no longer at setpoint
{
atSetpoint = false;
timeAtSetPoint = 0;
}
pastTime = currentTime;
pastError = error;
}
setMotorPowers(0, 0);
}


text:
Production of associated $\Upsilon$ and open charm hadrons in $pp$ collisions at $\sqrt{s}=7$ and $8$TeV via double parton scattering

LHCb Collaboration; Bernet, R; Müller, K; Steinkampf, O; Straumann, U; Vollhardt, A; et al (2016). Production of associated $\Upsilon$ and open charm hadrons in $pp$ collisions at $\sqrt{s}=7$ and $8$TeV via double parton scattering. Journal of High Energy Physics, 2016(7):52.

Abstract

Associated production of bottomonia and open charm hadrons in $pp$ collisions at $\sqrt{s}=7$ and $8$TeV is observed using data corresponding to an integrated luminosity of 3$fb^{-1}$ accumulated with the LHCb detector. The observation of five combinations, $\Upsilon(1S)D^0$, $\Upsilon(2S)D^0$, $\Upsilon(1S)D^+$, $\Upsilon(2S)D^+$ and $\Upsilon(1S)D^+_{s}$, is reported. Production cross-sections are measured for $\Upsilon(1S)D^0$ and $\Upsilon(1S)D^+$ pairs in the forward region. The measured cross-sections and the differential distributions indicate the dominance of double parton scattering as the main production mechanism. This allows a precise measurement of the effective cross-section for double parton scattering.

Abstract

Associated production of bottomonia and open charm hadrons in $pp$ collisions at $\sqrt{s}=7$ and $8$TeV is observed using data corresponding to an integrated luminosity of 3$fb^{-1}$ accumulated with the LHCb detector. The observation of five combinations, $\Upsilon(1S)D^0$, $\Upsilon(2S)D^0$, $\Upsilon(1S)D^+$, $\Upsilon(2S)D^+$ and $\Upsilon(1S)D^+_{s}$, is reported. Production cross-sections are measured for $\Upsilon(1S)D^0$ and $\Upsilon(1S)D^+$ pairs in the forward region. The measured cross-sections and the differential distributions indicate the dominance of double parton scattering as the main production mechanism. This allows a precise measurement of the effective cross-section for double parton scattering.

Statistics

Citations

Dimensions.ai Metrics
14 citations in Web of Science®
17 citations in Scopus®
14 citations in Microsoft Academic

Altmetrics

12 downloads since deposited on 27 Dec 2016
Detailed statistics


text:
# What are the zeros of the function? What are their multiplicities? f(x)=x^4-4x+3x^2

Nov 25, 2017

#### Answer:

$x = 0 , x = 1 \text{ and } x = - \frac{1}{2} \pm \frac{\sqrt{15}}{2} i$

#### Explanation:

$f \left(x\right) = {x}^{4} + 3 {x}^{2} - 4 x$

$\textcolor{w h i t e}{f \left(x\right)} = x \left({x}^{3} + 3 x - 4\right)$

$\text{the coefficients of } {x}^{3} + 3 x - 4$

$1 + 3 - 4 = 0 \Rightarrow x = 1 \text{ is a root and "(x-1)" is a factor}$

$\textcolor{red}{{x}^{2}} \left(x - 1\right) \textcolor{m a \ge n t a}{+ {x}^{2}} + 3 x - 4$

$= \textcolor{red}{{x}^{2}} \left(x - 1\right) \textcolor{red}{+ x} \left(x - 1\right) \textcolor{m a \ge n t a}{+ x} + 3 x - 4$

$= \textcolor{red}{{x}^{2}} \left(x - 1\right) \textcolor{red}{+ x} \left(x - 1\right) \textcolor{red}{+ 4} \left(x - 1\right) \cancel{\textcolor{m a \ge n t a}{+ 4}} \cancel{- 4}$

$= \textcolor{red}{{x}^{2}} \left(x - 1\right) \textcolor{red}{+ x} \left(x - 1\right) \textcolor{red}{+ 4} \left(x - 1\right) + 0$

$\Rightarrow x \left(x - 1\right) \left({x}^{2} + x + 4\right) = 0$

$\Rightarrow x = 0 , x = 1 \to \left(\text{with multiplicity of 1}\right)$

$\text{check the "color(blue)"discriminant "" of } {x}^{2} + x + 4$

$\text{with } a = 1 , b = 1 , c = 4$

$\Delta = {b}^{2} - 4 a c = 1 - 16 = - 15$

$\text{indicating there are 2 complex roots}$

$\text{using the "color(blue)"quadratic formula}$

$x = \frac{- 1 \pm \sqrt{- 15}}{2}$

$\Rightarrow x = - \frac{1}{2} \pm \frac{\sqrt{15}}{2} i$

$\text{there are 2 real zeros and 2 complex zeros}$


text:
# Special Sessions - May 17, 2009

This is a listing of the Special Sessions for May 17, 2009, both morning and afternoon sessions. You can register for any of these Special Sessions by clicking here.

## TURNING ORIGAMI INTO WEARABLE ART

Date:
May 17, 2009 at 10:30 AM - 12:30 PM
Level:
NOT RATED
Teacher:
Katherine Riley

## MULTILAYER HEXAGONAL FLOWER

Date:
May 17, 2009 at 10:30 AM - 12:30 PM
Level:
INTERMEDIATE
Teacher:
Jinni Xu
Is it a flower, a snowflake, an ornament, a decoration? It can be all these things! Twist-folded from a hexagon, this wonderful model by Tomoko Fuse is a 3-layered flower with multiple petals. Variations to the center will be taught as time permits.

## CABALLO

Date:
May 17, 2009 at 10:30 AM - 12:30 PM
Level:
HIGH INTERMEDIATE
Teacher:
Alfred Kwan
Caballo means horse and this amazing 3D, freestanding horse is Alfred’s favorite. It sports a full mane and long tail. The folding sequence is fun and has one challenging sink fold. Special paper will be provided. Alfred will show you techniques so that you can make your horse jump to life by dry-folding and then wet-shaping it.

## HOW TO FOLD THIS AND THAT FROM A TRADITIONAL PAPER HAT

Date:
May 17, 2009 at 2:30 PM - 5:00 PM
Level:
LOW INTERMEDIATE
Teacher:
Laura Kruskal
Using the Traditional Paper Hat as a base, Laura will teach her original Gift Boxes, Letterfold, Party Dish, Dancer’s Hat, Vase, Action Model, and Picture Frame. More models will be offered as time permits.

## PEACOCKS

Date:
May 17, 2009 at 2:30 PM - 5:00 PM
Level:
INTERMEDIATE
Teacher:
Bob Voelker
Here’s what you can do with all that pretty paper sitting in your closet. Bob will show you how to make two different peacocks, one by Kitamura, and another, which has a color change in the bird and tail. Other birds will be taught as time permits.

## PENTAGONAL SAAR STAR EARRINGS

Date:
May 17, 2009 at 2:30 PM - 5:00 PM
Level:
INTERMEDIATE
Teacher:
Ros Joyce
You’ll be the belle of the ball in these glittering earrings of pentagonal stars. Ros will discuss how to bend wires, show you different findings (hardware) that you can use and demonstrate assembly. Students should have the ability to make small, precise folds, and know a bird base, sinks, and rabbit ears. With time permitting, a crane hairclip will also be taught. A \$2 materials fee will be collected in class.

## RAT

Date:
May 17, 2009 at 2:30 PM - 5:00 PM
Level:
HIGH INTERMEDIATE
Teacher:
Seth Friedman
Learn a brand new design by Seth, a young creator who will teach a unique and fun rat. Unlike many other complicated models created nowadays, which require the folder to do tremendous amounts of pre-creasing, this model (reminiscent of the work of Hideo Komatsu) has a pleasurable folding sequence, and a minimal amount of sculptural artistry necessary for a pleasing finished product. Partial diagrams will be provided as well as explanations about the design process.

## TURTLE

Date:
May 17, 2009 at 2:30 PM - 5:00 PM
Level:
HIGH INTERMEDIATE
Teacher:


text:
qqbarthreshold is hosted by Hepforge, IPPP Durham
 QQbar_threshold
residues.hpp File Reference

Functions to calculate the residues of $$q\bar{q}$$ bound states. More...

Go to the source code of this file.

QQbar_threshold

## Functions

double ttbar_residue (int n, double mu, double m, order o, options opt=top_options())
Computes the residue $$Z_n$$ of an S-wave $$t\bar{t}$$ bound state. More...

double bbbar_residue (int n, double mu, double m, order o, options opt=bottom_options())
Computes the residue $$Z_n$$ of an S-wave $$b\bar{b}$$ bound state. More...

## Detailed Description

Functions to calculate the residues of $$q\bar{q}$$ bound states.

Version
1.1.0

# LICENSE

Copyright 2014, 2015, 2016 Andreas Maier

This file is part of the QQbar_threshold library.

The QQbar_threshold library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

The QQbar_threshold library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the QQbar_threshold library. If not, see http://www.gnu.org/licenses/.


text:
Walking in the Shadow: A New Perspective on Descent Directions for Constrained Minimization

# Walking in the Shadow: A New Perspective on Descent Directions for Constrained Minimization

Dec 06, 2020
|
33 views
|
###### Details
Descent directions such as movement towards Frank-Wolfe vertices, away steps, in-face away steps and pairwise directions have been an important design consideration in conditional gradient descent (CGD) variants. In this work, we attempt to demystify the impact of movement in these directions towards attaining constrained minimizers. The best local direction of descent is the directional derivative of the projection of the gradient, which we refer to as the $\textit{shadow}$ of the gradient. We show that the continuous-time dynamics of moving in the shadow are equivalent to those of PGD however non-trivial to discretize. By projecting gradients in PGD, one not only ensures feasibility but also is able to "wrap" around the convex region. We show that Frank-Wolfe (FW) vertices in fact recover the maximal wrap one can obtain by projecting gradients, thus providing a new perspective to these steps. We also claim that the shadow steps give the best direction of descent emanating from the convex hull of all possible away-vertices. Opening up the PGD movements in terms of shadow steps gives linear convergence, dependent on the number of faces. We combine these insights into a novel $S\small{HADOW}$-$CG$ method that uses FW steps (i.e., wrap around the polytope) and shadow steps (i.e., optimal local descent direction), while enjoying linear convergence. Our analysis develops properties of directional derivatives of projections (which may be of independent interest), while providing a unifying view of various descent directions in the CGD literature. Speakers: Hassan Mortagy, Swati Gupta, Sebastian Pokutta


text:
## find the expected value of g(x)

Standard deviation, mean, variance, z-scores, t-tests, etc.
zorro
Posts: 28
Joined: Sat Jun 12, 2010 9:26 am
Contact:

### find the expected value of g(x)

Problem : If the probability of X is given by
$f(x) =
\begin{cases}
x/2, & 0 < x < 1 \\
1/2, & 1 < x < 2 \\
(3-x)/2, & 2 < x < 3 \\
0 & elsewhere
\end{cases}$

find the expected value of $g(x) = X^2 - 5X + 3$

Solution :

$\int\limits_{0}^{1} . g(x) \frac{x}{2}, dx + \int\limits_{1}^{2} . g(x) \frac{1}{2}, dx + \int\limits_{2}^{3} g(x) \frac{3-x}{2}, dx$

is this process which i am following is it correct or no?

jk22
Posts: 10
Joined: Sat Jun 26, 2010 10:39 am
Contact:

### Re: find the expected value of g(x)

Hallo, nice to meet you. >I'm new on this forum.

For me this process of calculation is correct, even if there is a way to see the things that I'm not sure about :

We need <g(X)=Y>=<Y>, and then we need the probability density of Y. I don't know if this gives the same result. (We know that Y runs over [-13/4;3] if x runs over [0;3]).

From this we see there could appear a problem if g were not bijective.

See you soon, with friendly greetings.
Last edited by jk22 on Sat Jun 26, 2010 1:55 pm, edited 1 time in total.

maggiemagnet
Posts: 350
Joined: Mon Dec 08, 2008 12:32 am
Contact:

### Re: find the expected value of g(x)

According to this Wikipedia article, yes, it looks like you have set this up correctly. Do you need any help with the integrations?

jk22
Posts: 10
Joined: Sat Jun 26, 2010 10:39 am
Contact:

### Re: find the expected value of g(x)

Hallo, nice to meet you too.

Thanks for the reference. Me I lost myself in : should I calculate like this :

y=g(x), then :

$==\int yf_y(y)dy=\int_3^1yf_y(y)dy+...\textrm{other sections}=\int_0^1 g(x)f_y(g(x))g'(x)dx+...=\int_0^1g(x)f(x)dx+...$

and hence we find the distribution of Y : f_y(g(x))g'(x)=f(x), or f_y(y)=f(g^-1(y))/g'(g^-1(y)), to get the same as above.

zorro
Posts: 28
Joined: Sat Jun 12, 2010 9:26 am
Contact:

### Re: find the expected value of g(x)

THANKS GUYS FOR ALL UR POST ......I JUST NEEDED TO CHECK IF I WAS DOING IT CORRECTLY OR NO ......