text:
# Extended Stochastic Gradient MCMC for Large-Scale Bayesian Variable Selection

Stochastic gradient Markov chain Monte Carlo (MCMC) algorithms have received much attention in Bayesian computing for big data problems, but they are only applicable to a small class of problems for which the parameter space has a fixed dimension and the log-posterior density is differentiable with respect to the parameters. This paper proposes an extended stochastic gradient MCMC lgoriathm which, by introducing appropriate latent variables, can be applied to more general large-scale Bayesian computing problems, such as those involving dimension jumping and missing data. Numerical studies show that the proposed algorithm is highly scalable and much more efficient than traditional MCMC algorithms. The proposed algorithms have much alleviated the pain of Bayesian methods in big data computing.

## Authors

• 16 publications
• 16 publications
• 25 publications
• 17 publications
• ### Multilevel Monte Carlo for Scalable Bayesian Computations

Markov chain Monte Carlo (MCMC) algorithms are ubiquitous in Bayesian co...
09/15/2016 ∙ by Mike Giles, et al. ∙ 0

• ### Big Learning with Bayesian Methods

Explosive growth in data and availability of cheap computing resources h...
11/24/2014 ∙ by Jun Zhu, et al. ∙ 0

• ### High-Order Stochastic Gradient Thermostats for Bayesian Learning of Deep Models

Learning in deep models using Bayesian methods has generated significant...
12/23/2015 ∙ by Chunyuan Li, et al. ∙ 0

• ### Non-convex Learning via Replica Exchange Stochastic Gradient MCMC

Replica exchange Monte Carlo (reMC), also known as parallel tempering, i...
08/12/2020 ∙ by Wei Deng, et al. ∙ 12

Bayesian approaches have been successfully integrated into training deep...
10/03/2020 ∙ by Yating Wang, et al. ∙ 0

• ### Bayesian Levy-Dynamic Spatio-Temporal Process: Towards Big Data Analysis

In this era of big data, all scientific disciplines are evolving fast to...
05/18/2021 ∙ by Sourabh Bhattacharya, et al. ∙ 0

• ### Deep Latent Dirichlet Allocation with Topic-Layer-Adaptive Stochastic Gradient Riemannian MCMC

It is challenging to develop stochastic gradient based scalable inferenc...
06/06/2017 ∙ by Yulai Cong, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

After six decades of continual development, MCMC has proven to be a powerful and typically unique computational tool for analyzing data of complex structures. However, for large datasets, its computational cost can be prohibitive as it requires all of the data to be processed at each iteration. To tackle this difficulty, a variety of scalable algorithms have been proposed in the recent literature. According to the strategies they employed, these algorithms can be grouped into a few categories, including stochastic gradient MCMC algorithms (Welling & Teh, 2011; Ding et al., 2014; Ahn et al., 2012; Chen et al., 2014; Betancourt, 2015; Ma et al., 2015; Nemeth & Fearnhead, 2019), split-and-merge algorithms (Scott et al., 2016; Srivastava et al., 2018; Xue & Liang, 2019), mini-batch Metropolis-Hastings algorithms (Chen et al., 2016; Korattikara et al., 2014; Bardenet et al., 2014; Maclaurin & Adams, 2014; Bardenet et al., 2017), nonreversible Markov process-based algorithms (Bierkens et al., 2019; Bouchard Coté et al., 2018), and some discrete sampling algorithms based on the multi-armed bandit (Chen & Ghahramani, 2016).

Although scalable algorithms have been developed for both continuous and discrete sampling problems, they are hard to be applied to dimension jumping problems. Dimension jumping is characterized by variable selection where the number of parameters changes from iteration to iteration in MCMC simulations. Under their current settings, the stochastic gradient MCMC and nonreversible Markov process-based algorithms are only applicable to problems for which the parameter space has a fixed dimension and the log-posterior density is differentiable with respect to the parameters. For the split-and-merge algorithms, it is unclear how to aggregate samples of different dimensions drawn from the posterior distributions based on different subset data. The multi-armed bandit algorithms are only applicable to problems with a small discrete domain and can be extremely inefficient for high-dimensional variable selection problems. The mini-batch Metropolis-Hastings algorithms are in principle applicable to dimension jumping problems. However, they are generally difficult to use. For example, the algorithms by Chen et al. (2016), Korattikara et al. (2014), and Bardenet et al. (2014) perform approximate acceptance tests using subset data. The amount of data consumed for each test varies significantly from one iteration to another, which compromise their scalability. The algorithms by Maclaurin & Adams (2014) and Bardenet et al. (2017) perform exact tests but require a lower bound on the parameter distribution across its domain. Unfortunately, the lower bound is usually difficult to obtain.

This paper proposes an extended stochastic gradient Langevin dynamics algorithm which, by introducing appropriate latent variables, extends the stochastic gradient Langevin dynamics algorithm to more general large-scale Bayesian computing problems such as variable selection and missing data. The extended stochastic gradient Langevin dynamics algorithm is highly scalable and much more efficient than traditional MCMC algorithms. Compared to the mini-batch Metropolis-Hastings algorithms, the proposed algorithm is much easier to use, which involves only a fixed amount of data at each iteration and does not require any lower bound on the parameter distribution.

## 2 A Brief Review of Stochastic Gradient Langevin Dynamics

Let , denote a set of independent and identically distributed samples drawn from the distribution , where is the sample size and is the parameter. Let denote the likelihood function, let denote the prior distribution of , and let denote the log-posterior density function. If has a fixed dimension and is differentiable with respect to , then the stochastic gradient Langevin dynamics algorithm (Welling & Teh, 2011) can be applied to simulate from the posterior, which iterates by

 θt+1=θt+ϵt+12ˆ∇θlogπ(θt|XN)+√(ϵt+1τ)ηt+1,ηt+1∼N(0,Id), (1)

where is the dimension of , is an

is the step size (also known as the learning rate), is the temperature, and

denotes an estimate of

based on a mini-batch of samples. The learning rate can be decreasing or kept as a constant. For the former, the convergence of the algorithm was studied in Teh et al. (2016). For the latter, the convergence of the algorithm was studied in Sato & Nakagawa (2014) and Dalalyan & Karagulyan (2017). Refer to Nemeth & Fearnhead (2019) for more discussions on the theory, implementation and variants of this algorithm.

## 3 An Extended Stochastic Gradient Langevin Dynamics Algorithm

To extend the applications of the stochastic gradient Langevin dynamics algorithm to varying-dimensional problems such as variable selection and missing data, we first establish an identity for evaluating in presence of latent variables. As illustrated below, the latent variables can be the model indicator in the variable selection problems or missing values in the missing data problems.

###### Lemma 1

For any latent variable ,

 ∇θlogπ(θ∣XN)=∫∇θlogπ(θ∣ϑ,XN)π(ϑ∣θ,XN)dϑ, (2)

where and denote the conditional distribution of and , respectively.

Lemma 1 provides us a Monte Carlo estimator for by averaging over the samples drawn from the conditional distribution . The identity (2) is similar to Fisher’s identity. The latter has been used in evaluating the gradient of the log-likelihood function in presence of latent variables, see e.g. Cappé et al. (2005). When is large, the computation can be accelerated by subsampling. Let denote a subsample, where denotes the subsample size. Without loss of generality, we assume that is a multiple of , i.e., is an integer. Let denote a duplicated dataset with the subsample, whose total sample size is also . Following from (2), we have

 ∇θlogπ(θ∣Xn,N)=∫∇θlogπ(θ∣ϑ,Xn,N)π(ϑ∣θ,Xn,N)dϑ. (3)

Since is true and is unbiased for ,

forms an unbiased estimator of

. Sampling from can be much faster than sampling from as for the former the likelihood only needs to be evaluated on a mini-batch of samples.

### 3.1 Bayesian Variable Selection

As an illustrative example, we consider the problem of variable selection for linear regression

 Y=zTβ+ε, (4)

where

is a zero-mean Gaussian random error with variance

,

is the vector of regression coefficients, and

is the vector of explanatory variables. Let be a binary vector indicating the variables included in model , and let be the vector of regression coefficients associated with the model

. From the perspective of Bayesian statistics, we are interested in estimating the posterior probability

for each model and the posterior mean for some integrable function , where comprises models. Both quantities can be estimated using the reversible jump Metropolis-Hastings algorithm (Green, 1995) by sampling from the posterior distribution . However, when is large, the algorithm can be extremely slow due to repeated scans of the full dataset in simulations.

As aforementioned, the existing stochastic gradient MCMC algorithms cannot be directly applied to simulate of due to the dimension jumping issue involved in model transition. To address this issue, we introduce an auxiliary variable , which links and through

 βS=θ∗γS=(θ1γ1S,θ2γ2S,…,θpγpS), (5)

where denotes elementwise multiplication. Let and be subvectors of corresponding to the nonzero and zero elements of , respectively. Note that is sparse with all elements in being zero, while can be dense. Based on the relation (5), we suggest to simulate from using the stochastic gradient Langevin dynamic algorithm, for which the gradient can be evaluated using Lemma 1 by treating as the latent variable. Let denote the prior of . To simplify the computation of , we further assume the a priori independence that . Then it is easy to derive

 ∇θlogπ(θ∣γS,XN)={∇θ[S]logp(XN|θ[S],γS)+∇θ[S]π(θ[S]|γS),for component θ[S],∇θ[−S]logπ(θ[−S]|γS),for % component θ[−S],

which can be used in evaluating by Lemma 1. If a mini-batch of data is used, the gradient can be evaluated based on (3). This leads to an extended stochastic gradient langevin dynamics algorithm.

[Extended Stochastic Gradient Langevin Dynamics for Bayesian Variable Selection]

• (Subsampling) Draw a subsample of size (with or without replacement) from the full dataset at random, and denote the subsample by , where indexes the iteration.

• (Simulating models) Simulate models from the conditional posterior by running a short Markov chain, where and is the sample of at iteration .

• (Updating ) Update by setting , where is the learning rate, , is the temperature, and is the dimension of .

Theorem 1 justifies the validity of this algorithm with the proof given in the Appendix.

###### Theorem 1

Assume that the conditions (A.1)-(A.3) (given in Appendix) hold, , , are increasing with such that , , and a constant learning rate is used. Then, as ,

• as , where denotes the distribution of , , and denotes the second order Wasserstein distance between two distributions.

• If is -Lipschitz for some constant , then as , where denotes convergence in probability and .

• If (A.4) further holds, as .

Part (i) establishes the weak convergence of ; that is, if the total sample size and the iteration number are sufficiently large, and the subsample size and the number of models simulated at each iteration are reasonably large, then will converge to the true posterior in 2-Wasserstein distance. Refer to Gibbs & Su (2002) for discussions on the relation between Wasserstein distance and other probability metrics. Parts (ii) & (iii) address our general interests on how to estimate the posterior mean and posterior probability, respectively, based the samples simulated by Algorithm 3.1. For parts (i), (ii) and (iii), the explicit convergence rates are given in equations (8), (10) and (15), respectively.

For the choice of , can be approximately treated as the maximum size of the models under consideration, which is of the same order as the true model. Therefore, can be pretty small under the model sparsity assumption. Theorem 1 is established with a constant learning rate. In practice, one may use a decaying learning rate, see e.g. Teh et al. (2016), where it is suggested to set for some . For the decaying learning rate, Teh et al. (2016) recommended some weighted averaging estimators for . Theorem 2 shows that the unweighted averaging estimators used above still work if the learning rate slowly decays at a rate of for . However, if , the weighted averaging estimators are still needed. The proof of Theorem 2 is given in the supplementary material.

###### Theorem 2

Assume the conditions of Theorem 1 hold. If a decaying learning rate is used for some , then parts (i), (ii) and (iii) of Theorem 1 are still valid.

### 3.2 Missing Data

Missing data are ubiquitous over all fields from science to technology. However, under the big data scenario, how to conduct Bayesian analysis in presence of missing data is still unclear. The existing data-augmentation algorithm (Tanner & Wong, 1987) is full data based and thus can be extremely slow. In this context, we let denote the incomplete data and let denote the model parameters. If we treat the missing values as latent variables, then Lemma 1 can be used for evaluating the gradient . However, Algorithm 3.1

cannot be directly applied to missing data problems, since the imputation of the missing data might depend on the subsample only. To address this issue, we propose Algorithm S1 (given in the Supplementary material), where the missing values

are imputed from at each iteration. Theorem 1 and Theorem 2 are still applicable to this algorithm.

## 4 An Illustrative Example

This section illustrates the performance of Algorithm 3.1 using a simulated example. More numerical examples are presented in the supplementary material. Ten synthetic datasets were generated from the model (4) with , , , , , and , where

is assumed to be known, and the explanatory variables are normally distributed with a mutual correlation coefficient of 0.5. A hierarchical prior was assumed for the model and parameters with the detail given in the supplementary material. For each dataset, Algorithm

3.1 was run for 5000 iterations with , , and the learning rate , where the first 2000 iterations were discarded for the burn-in process and the samples generated from the remaining iterations were used for inference. At each iteration, the reversible jump Metropolis-Hastings algorithm (Green, 1995) was used for simulating the models , with the detail given in the supplementary material.

Table 1 summarizes the performance of the algorithm, where the false selection rate (FSR), negative selection rate (NSR), mean squared errors for false predictors () and mean squared errors for true predictors () are defined in the supplementary material. The variables were selected according to the median posterior probability rule (Barbieri & Berger, 2004), which selects only the variables with the marginal inclusion probability greater than 0.5. The Bayesian estimates of parameters were obtained by averaging over a set of thinned (by a factor of 10) posterior samples. For comparison, some existing algorithms were applied to this example with the results given in Table 1 and the implementation details given in the supplementary material. The comparison show that the proposed algorithm has much alleviated the pain of Bayesian methods in big data analysis.

## 5 Discussion

This paper has extended the stochastic gradient Langevin dynamics algorithm to general large-scale Bayesian computing problems, such as those involving dimension jumping and missing data. To the best of our knowledge, this paper provides the first Bayesian method and theory for high-dimensional discrete parameter estimation with mini-batch samples, while the existing methods work for continuous parameters or very low dimensional discrete problems only. Other than generalized linear models, the proposed algorithm can have many applications in data science. For example, it can be used for sparse deep learning and accelerating computation for statistical models/problems where latent variables are involved, such as hidden Markov models, random coefficient models, and model-based clustering problems.

Algorithm 3.1 can be further extended by updating using a variant of stochastic gradient Langevin dynamics, such as stochastic gradient Hamiltonian Monte Carlo (Chen et al., 2014), stochastic gradient thermostats (Ding et al., 2014), stochastic gradient Fisher scoring (Ahn et al., 2012), or preconditioned stochastic gradient Langevin dynamics (Li et al., 2016). We expect that the advantages of these variants (over stochastic gradient Langevin dynamics) can be carried over to the extension.

## Acknowledgements

This work was partially supported by the grants DMS-1811812, DMS-1818674, and R01-GM126089. The authors thank the editor, associate editor and referees for their insightful comments/suggestions.

## Appendix

### .1 Proof of Lemma 1

###### Proof

Let denote the prior density of , and let denote the density of . Then

 ∇θlogπ(θ|XN)=∇θlogp(XN∣θ)+∇θlogπ(θ)=1p(XN∣θ)∇θ∫p(XN,ϑ∣θ)dϑ+∇θlogπ(θ)=∫p(XN,ϑ∣θ)p(XN∣θ)∇θlogp(XN,ϑ∣θ)dϑ+∇θlogπ(θ)=∫π(ϑ∣θ,XN)∇θ[logp(XN∣θ,ϑ)+logπ(θ∣ϑ)+logπ(ϑ)−logπ(θ)]dϑ+∇θlogπ(θ)=∫∇θlogπ(θ∣ϑ,XN)π(ϑ∣θ,XN)dϑ,

where the second and third equalities follow from the relation (for an appropriate function ), and the fourth and fifth equalities are by direct calculations of the conditional distributions.

### .2 Proof of Theorem 1

Let denote the posterior density function of , and let denote the density of generated by Algorithm 3.1 at iteration . We are interested in studying the discrepancy between and in the 2nd order Wasserstein distance. The following conditions are assumed.

• The posterior is strongly log-concave and gradient-Lipschitz:

 f(θ)−f(θ′)−∇f(θ′)T(θ−θ′)≥qN2∥θ−θ′∥22,∀θ,θ′∈Θ, (6) ∥∇f(θ)−∇f(θ′)∥2≤QN∥θ−θ′∥2,∀θ,θ′∈Θ, (7)

where , and for some positive constants and .

• The posterior

has bounded second moment:

.

• , where denotes expectation with respect to the distribution of , and denotes the set of all possible models.

• Let and let be the descending order statistics of . Assume that there exists a constant such that .

###### Proof

Part (i). In Algorithm 3.1, the gradient is estimated by running a short Markov chain with a mini-batch of data. Since the initial distribution of the Markov chain might not coincide with its equilibrium distribution, the resulting gradient estimate can be biased. Let . Following from (A.3), we have

 ∥E(ζ(t)|θ(t))∥2=O[N2(∥θ(t)∥2+p)m2],E∥ζ(t)−E(ζ(t)|θ(t))∥2=O[N2(∥θ(t)∥2+p)mn].

Following from Lemma S2 in the supplementary material, if , and holds, then

 (8)

for some , since and hold by conditions (A.1) and (A.2).

Part (ii). Since is -Lipschitz, we have for some constant . Further, is strongly log-concave, so , i.e., is -integrable. On the other hand,

 ∥∫ρ(θ)dπ∗(θ)−∫ρ(~θ)dπt(~θ)∥=∥Eρ(θ)−Eρ(~θ)∥≤E∥ρ(θ)−ρ(~θ)∥≤αE∥θ−~θ∥2≤α{E∥θ−~θ∥22}1/2=αW2(π∗,πt)=o(1),   (due to eq. (???)). (9)

where and

are two random variables whose marginal distributions follow

and respectively,

denotes expectation with respect to the joint distribution of

and , and . This implies that is also -integrable and as .

Further, by the property of Markov chain, WLLN applies and thus . Combining it with the above result leads to

 T∑t=1ρ(θ(t))/T−π∗(ρ)=Op(T−1/2)+αT∑t=1W2(π∗,πt)/T→0. (10)

Part (iii). To establish the convergence of , we define , , and for any . For each , is approximately Gaussian with and . Therefore, for any positive , with probability , is bounded by according to the tail probability of the Gaussian. It implies, with high probability, that if is the most likely model, i.e., , then

if (i.e., ) and , where the second equality follows from the mean-value theorem by viewing ’s as the arguments of , and denotes a value between and . Similarly, if is not the most likely model, then we denote as the most likely model and, by the mean-value theorem,

 |π(γS|X(t)n,N,θ(t))−π(γS|XN,θ(t))|=∣∣∣eN(LN(γS,θ(t))−LN(γS∗,θ(t))+ξn,S−ξn,S∗)1+∑S′≠SeN(LN(γS′,θ(t))−LN(γS∗,θ(t))+ξn,S′−ξn,S∗)−eN(LN(γS,θ(t))−LN(γS∗,θ(t)))1+∑S′≠SeN(LN(γS′,θ(t))−LN(γS∗,θ(t))∣∣∣≤[1+(2p−1)e−N(δ−2δn)+e2Nδn]e−N(δ−2δn)N2δn≤e−Nδ/2→0.

In conclusion, with probability , for all , any iteration and any . Then, one could choose some , such that is bounded by

 maxSE|π(γS|X(t)n,N,θ(t))−π(γS|XN,θ(t))|≤exp(−Nδ/2)+1/|S|ν→0, (11)

for any iteration . Conditioned on , ’s are independent and each is bounded by 1, so WLLN applies. Therefore, for any , by WLLN,

 1TT∑t=1π(γS|X(t)n,N,θ(t))−1TT∑t=1π(γS|XN,θ(t))=Op(T−1/2)+exp(−Nδ/2)+1/|S|ν→0, (12)

provided . Since forms a time-homogeneous Markov chain, whose convergence is measured by (8), and the function is bounded and continuous in ,

 1TT∑t=1π(γS|XN,θ(t))−π(γS|XN)=Op(T−1/2), (13)

holds for any . Combining (13) with (12) leads to

 1TT∑t=1π(γS|X(t)n,N,θ(t))−π(γS|XN)=Op(T−1/2)+exp(−Nδ/2)+1/|S|ν→0. (14)

Conditioned on and , by the standard theory of MCMC, forms a consistent estimator of with an asymptotic bias of . Since is increasing with and , the estimator is asymptotically unbiased. Combining this result with (14) leads to

 1mTT∑t=1m∑i=1I(γ(t)Si,n=γS)−π(γS|XN)=Op(T−1/2)+exp(−Nδ/2)+1/|S|ν+Op(m−1/2), (15)

which converges to 0 as and .

## References

• Ahn et al. (2012) Ahn, S., Balan, A. K. & Welling, M. (2012). Bayesian posterior sampling via stochastic gradient Fisher scoring. In ICML.
• Barbieri & Berger (2004) Barbieri, M. & Berger, J. (2004). Optimal predictive model selection. Annals of Statistics 32, 870–897.
• Bardenet et al. (2014) Bardenet, R., Doucet, A. & Holmes, C. (2014). Towards scaling up Markov chain Monte Carlo: an adaptive subsampling approach. In ICML.
• Bardenet et al. (2017) Bardenet, R., Doucet, A. & Holmes, C. C. (2017). On Markov chain Monte Carlo methods for tall data.

Journal of Machine Learning Research

18, 47:1–47:43.
• Betancourt (2015) Betancourt, M. (2015). The fundamental incompatibility of scalable Hamiltonian Monte Carlo and naive data subsampling. In ICML.
• Bierkens et al. (2019) Bierkens, J., Fearnhead, P. & Roberts, G. (2019). The zig-zag process and super-efficient Monte Carlo for Bayesian analysis of big data. Annals of Statistics 47, 1288–1320.
• Bouchard Coté et al. (2018) Bouchard Coté, A., Vollmer, S. & Doucet, A. (2018). The bouncy particle sampler: A nonreversible rejection-free Markov chain Monte Carlo method. Journal of the American Statistical Association 113, 855–867.
• Cappé et al. (2005) Cappé, O., Moulines, E. & Ryden, T. (2005). Inference in Hidden Markov Models. New York: Springer.
• Chen et al. (2016) Chen, H., Seita, D., Pan, X. & Canny, J. (2016). An efficient minibatch acceptance test for Metropolis-Hastings. arXiv:1610.06848 .
• Chen et al. (2014) Chen, T., Fox, E. B. & Guestrin, C. (2014). Stochastic gradient Hamiltonian Monte Carlo. In ICML.
• Chen & Ghahramani (2016) Chen, Y. & Ghahramani, Z. (2016). Scalable discrete sampling as a multi-armed bandit problem. In ICML.
• Dalalyan & Karagulyan (2017) Dalalyan, A. S. & Karagulyan, A. G. (2017). User-friendly guarantees for the Langevin Monte Carlo with inaccurate gradient. CoRR abs/1710.00095.
• Ding et al. (2014) Ding, N., Fang, Y., Babbush, R., Chen, C., Skeel, R. D. & Neven, H. (2014). Bayesian sampling using stochastic gradient thermostats. In NIPS.
• Gibbs & Su (2002) Gibbs, A. & Su, F. (2002). On choosing and bounding probability metrics. International Statistical Review 70, 419–435.
• Green (1995) Green, P. (1995). Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika 82, 711–732.
• Korattikara et al. (2014) Korattikara, A., Chen, Y. & Welling, M. (2014). Austerity in MCMC land: Cutting the Metropolis-Hastings budget. In ICML.
• Li et al. (2016) Li, C., Chen, C., Carlson, D. E. & Carin, L. (2016).

Preconditioned stochastic gradient Langevin dynamics for deep neural networks.

In AAAI.
• Ma et al. (2015) Ma, Y.-A., Chen, T. & Fox, E. B. (2015). A complete recipe for stochastic gradient MCMC. In NIPS.
• Maclaurin & Adams (2014) Maclaurin, D. & Adams, R. P. (2014). Firefly Monte Carlo: Exact MCMC with subsets of data. In IJCAI.
• Nemeth & Fearnhead (2019) Nemeth, C. & Fearnhead, P. (2019). Stochastic gradient Markov chain Monte Carlo. arXiv:1907.06986 .
• Sato & Nakagawa (2014) Sato, I. & Nakagawa, H. (2014). Approximation analysis of stochastic gradient Langevin dynamics by using Fokker-Planck equation and Ito process. In ICML.
• Scott et al. (2016) Scott, S. L., Blocker, A. W., Bonassi, F. V., Chipman, H. A., George, E. I. & McCulloch, R. E. (2016). Bayes and big data: The consensus Monte Carlo algorithm. International Journal of Management Science and Engineering Management 11, 78–88.
• Srivastava et al. (2018) Srivastava, S., Li, C. & Dunson, D. B. (2018). Scalable Bayes via Barycenter in Wasserstein space. Journal of Machine Learning Research 19, 1–35.
• Tanner & Wong (1987) Tanner, M. & Wong, W. (1987). The calculation of posterior distributions by data augmentation (with Discussions). Journal of the American Statistical Association 82, 528–540.
• Teh et al. (2016) Teh, W., Thiery, A. & Vollmer, S. (2016). Consistency and fluctuations for stochastic gradient Langevin dynamics. Journal of Machine Learning Research 17, 1–33.
• Welling & Teh (2011) Welling, M. & Teh, Y. W. (2011). Bayesian learning via stochastic gradient Langevin dynamics. In ICML.
• Xue & Liang (2019) Xue, J. & Liang, F. (2019). Double-parallel Monte Carlo for Bayesian analysis of big data. Statistics and Computing 29, 23–32.


text:
# Correctness of Linearizability vs Sequential consistency in replication

I'm currently studying Sequential consistency vs linearizability:

I know that SC has to be consistent with the order of how the individual client issued them, and for linearizability, it's with the real-time ordering.

What I don't understand is:

"The interleaved sequence of operations meets the specification of a (single) correct copy of the objects. "

Which is the first property of both Sequential consistency and linearizability

For me, it sounds like that if 2 clients communicate with some system, the state of the objects should be the same on a single server and on a system with multiple replica managers RM.

But if that is true, how is this example SC:

Client 1:

SetBalance x in RM B to 1

Client 2:

getBalance y in RM A = 0 getBalance x in RM A = 0

Client 1:

SetBalance y in RM A to 2

But if the above example is true, that means my understanding of "The interleaved sequence..." is wrong. since that would imply that the second get balance of client 2 should be 1 ( but at the same time, that means that the system is linearizable since that follows real-time ordering).

So what does:

"The interleaved sequence of operations meets the specification of a (single) correct copy of the objects. "

Mean? and why is it used to determine the correctness of replication

A Sequential Consistent (SC) system should behave as if there is just a single copy of the data.

So lets try to determine a possible memory order for your scenario:

1:client2:read(y=0)
3:client1:write(x=1)
4:client1:write(y=2)

This is valid according to SC. Keep in mind that the real time order of requests, doesn't need to preserved. So perhaps the client2.read(x=1) happened later than the client1.write(x=1), it can be ordered in the memory order before the write.

Lets change the example a bit to make it more interesting:

1:client1:write(x=1)
2:client1:write(y=2)

format: plain


text:
Unified Form Language

## Project description

The Unified Form Language (UFL) is a domain specific language for declaration of finite element discretizations of variational forms. More precisely, it defines a flexible interface for choosing finite element spaces and defining expressions for weak forms in a notation close to mathematical notation.

UFL is part of the FEniCS Project. For more information, visit https://www.fenicsproject.org

## Documentation

Documentation can be viewed at https://fenics-ufl.readthedocs.org/.

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

This program 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

## Project details

Uploaded source
Uploaded py3


text:
×

# Discontinuity

How many points is f(X) = tan(1/x) discontinous from [0 , 100 ] (both included.

Note by Sridhar Thiagarajan
4 years, 1 month ago

Sort by:

Continuity of a function is defined on numbers that are in it's domain... And the function f that you have stated, tan(1/x), the function is not defined at 2 / ( pi(2n+1))..n=0,1,2,.... So, your domain of definition is incorrect... · 4 years, 1 month ago

Infinitely many. · 4 years, 1 month ago

Zero is not in the domain of f · 4 years, 1 month ago


text:
ANEDO submission on the draft Terms of Reference for a strategic assessment of the environmental management authorisation process for petroleum activities administered by NOPSEMA under the Offshore Petroleum and Greenhouse Gas Storage Act 2006 - EDO NSW

# ANEDO submission on the draft Terms of Reference for a strategic assessment of the environmental management authorisation process for petroleum activities administered by NOPSEMA under the Offshore Petroleum and Greenhouse Gas Storage Act 2006

ANEDO submission on the draft Terms of Reference for a strategic assessment of the environmental management authorisation process for petroleum activities administered by NOPSEMA under the Offshore Petroleum and Greenhouse Gas Storage Act 2006


text:
CSES - Dynamic Lines
• Time limit: 2.00 s
• Memory limit: 512 MB
In this task you are given $n$ lines, and have to answer a total of $q$ queries of three types.
• 1. Activate line with index $i$. It is guaranteed that the line is inactive.
• 2. Deactivate line with index $i$. It is guaranteed that the line is active.
• 3. What is the lowest value any active line has at a given $x$-coordinate? The value of line $i$ at point $x$ is $f_{i}(x) = a_{i} x + b_{i}$. It is guaranteed at least one line is active.
Initially all lines are inactive.

Input

The first line contains two integers $n, q$: the number of lines and the number of queries.
the second line contains $n$ integers $a_1, \dots, a_n$.
the third line contains $n$ intergets $b_1, \dots, b_n$.

$q$ lines follow, describing the queries. Each line contains two integers $t$ $v$: The query is of type $t$. If $t = 1$ or $t = 2$, $i = v$. If $t = 3$, $x = v$.

Output

Output the answer to each query of type $3$.

Constraints
• $1 \leq n, q \leq 4 \cdot 10^{5}$
• $-10^9 \leq x, a, b \leq 10^{9}$
• $1 \leq i \leq n$
Example

Input: 4 12 -1 -2 0 -1 -18 13 4 -14 1 1 3 9 2 1 1 2 3 7 1 4 1 3 1 1 2 1 3 -4 3 10 3 -9
Output: -27 -1 -10 -24 -5


text:
Figure 9

 Missing yield in the depletion region relative to the overall peak yield extracted from the fit. Lines indicate statistical uncertainties (mostly smaller than the marker size), while boxes (only for data) denote systematic uncertainties. The arrows indicate the upper limit in case the uncertainty bands touch 0. The markers are placed at the centre of the centrality bins. For comparison, the non-zero values from two AMPT simulations are shown as lines.


text:
# [Math] independent events in rolling a balanced die once.

probability

I understand well the concept of independence if it is rolling a balance die twice. of course, the first roll and the second roll are independent, because the first roll does not impact the second roll.

A:{ 6 appears in the first roll } P(A)= 1/6
B:{ 6 appears in the second roll } P(B)= 1/6
A ∩ B: {both rolls show 6} P(A ∩ B) = 1/36
P(A ∩ B)= P(A)P(B)

Now, I am rolling the die once. Can I say A and B are independent in the following case:

A = {1, 2}; P(A) = 2/6
B = {2, 3, 4} ; P(B) = 3/6
A∩B = {2}; P(A∩B) = 1/6
P(A∩B) = P(A)P(B)

How to understand the concept of independance that event A = {1, 2} does not affect event B = {2, 3, 4} . I am confused.

In a way it is of course just coincidence that it works out that way. Imagine if you extend $A$ to $\{1,2,5\}$. Then it no longer is the same.
But, it still is true that the chance of $A$ happening is the same whether $B$ happens or not, since if $B$ happens (so we rolled a 2,3, or 4), then we have a 1/3 chance that $A$ happens (that we got the 2 out of those three), and if $B$ does not happen (so we got a 1,5,6) we again have a 1/3 chance.
So: $P(A|B)=P(A)$ (and hence $P(A \cap B) = P(A|B)*P(B)=P(A)*P(B)$) ... So while the presence of $B$ will effect the possible ways $A$ can happen, the chance of $A$ happening remains the same... and in that sense they are still said to be independent.


text:
# Questions about the Bernstein center of a $p$-adic reductive group

Dear all,

The "Bernstein center" of a $p$-adic reductive group appears frequently in the literature of automorphic forms, often without a precise definition. For example, in page 233 of Moeglin-Waldspurger's classic "Spectral decomposition and Eisenstein series" , the couple tell us :

"...in particular the centre of enveloping algebra acts on $\delta$ via a character at the infinite places and the Bernstein centre does so at the finite places... "

So one may guess that it is some analogy of "the centre of enveloping algebra" at fintie places.

My questions are:

1. What is the definition of the Bernstein centre of a p-adic reductive group.
2. What is the original motivation to introduce it ?
3. What role does it play in the theory of automorphic forms ?
4. Could you explain these in some concrete example ,say $GL_2$ ?

Please feel free to choose part of the questions to reply. Any comments and references (in English) will also be very welcome !

Thank you very much in advance!

• The meaning I know is that the Bernstein center of a category $C$ is the (commutative) monoid of self-equivalences of the identity functor $\text{id}_C$. If that category is $R\text{-Mod}$ then this is the center of $R$ in the usual sense. I don't know what category $C$ is meant here though. Apr 26, 2012 at 16:12
• Qiaochu is correct. The Bernstein center of a $p$-adic group $G$ is the algebra of endomorphisms of the identity functor on the category of smooth representations of $G$. It can also be realized as a space of distributions. See, e.g., hazu.hr/~tadic/41-Moy-T-Howe-proc.pdf or ams.org/journals/ert/2002-006-11/S1088-4165-02-00181-4/…
– B R
Apr 26, 2012 at 16:19
• @BR :Thanks for your references ! It will be nice if someone could explain this in some concrete example, say for GL(n). Apr 26, 2012 at 16:28
• Is the Berntein's center finitely generated algebra ? Is it polynomial algebra for semi-simple groups ? (These properties holds true for Z(U(g)) ). Apr 27, 2012 at 8:09
• Role is apparantly the same as role of ZU(g) - it allows to parametrize irreps by some managable set of params (similar to highest weights) - center acts as scalar irreps, hopefully center is finitely generated so essentially you take values of generators z_1...z_n in V and get numbers l1...ln if these numbers are different irreps are different, most probably converse is not formally true, but "informally" true, up to some "details". Apr 27, 2012 at 20:12

Abstract Definition . Let $Rep(G)$ be the abelian category of smooth complex representations of our $p$-adic group $G$. The Bernstein center is the endomorphism ring $\mathfrak Z(G)$ of the identity functor of $Rep(G)$. So it acts on any smooth representation, and this action commutes with any $G$-morphism.

As a projective limit . Let $H$ be a compact open subgroup. Letting $\mathfrak Z(G)$ act on the permutation representation $\mathbb C[G/H]$ gives a morphim to the center $Z(G,H)$ of the Hecke algebra $\mathcal H(G,H)$. This yields an isomorphism $\mathfrak Z(G) \simeq \lim\limits_{\leftarrow H} Z(G,H)$ where transition maps are given by applying idempotents.

Geometric realization. (here "geometric" is in the sense of Trace formulas, i.e. on the side of harmonic analysis). $\mathfrak Z(G)$ acts on the regular representations $C^\infty_c(G)$. The pairing $(z,f)\mapsto z.f(1)$ embeds $\mathfrak Z(G)$ as a set of distributions on $G$. The image is the convolution algebra of "essentially compact invariant distributions".

Spectral realization . By Schur's lemma (which holds in this context), $\mathfrak Z(G)$ acts on any irreducible representation $\pi$ via a character $\theta_\pi:\mathfrak Z(G)\longrightarrow \mathbb C$. This is sometimes called the "infinitesimal character" of $\pi$, by analogy with the Archimedean situation, although there is nothing "infinitesimal" here. We get in this way a realization of $\mathfrak Z(G)$ as an algebra of continuous functions on the smooth dual $\hat G$ of $G$ equipped with the Fell topology.

So far, nothing deep. Now, two major achievements in the representation theory of p-adic groups are

1. the Bernstein theorem which describes the spectral realization explicitly,
2. the Harish Chandra Plancherel formula which provides a link between both realizations.

Let me try to describe Bernstein's result. Bernstein first splits the category $Rep(G)$ as a (infinite) product of indecomposable abelian subcategories (called "blocks"). Accordingly, the smooth dual decomposes into infinitely many connected components, and the center decomposes as an infinite product of rings.

The simplest example is that of a compact $G$ (e.g. the kernel of the norm map in a division algebra). In this case, $\hat G$ is discrete and the center is a product of copies of $\mathbb C$ indexed by the set of classes of irreps. The next example is that of a compact-mod-center $G$ (e.g. the unit group of a division algebra). In this case there is an action of the group $\Psi(G)$ of unramified characters of $G$ on $\hat G$. Note that $\Psi(G)$ is naturally an algebraic torus over $\mathbb C$ because $G$ mod its maximal compact subgroup is a free abelian group of finite type. Now, connected components are the orbits of $\Psi(G)$, and the topology is the homogeneous space topology. In particular each such orbit carries a natural structure of an algebraic variety over $\mathbb C$. Finally, $\mathfrak Z(G)$ is the direct product of the ring of regular functions on these orbits.

Let us go to the general case. Assume first that $G$ is semisimple. Then each supercuspidal representation gives an isolated point in the smooth dual $\hat G$, because such representations are both projective and injective objects. Therefore, denoting by $Cusp(G)$ the set of (isom classes of) supercuspidal irreps, the ring $\mathbb C^{Cusp(G)}$ is a factor of $\mathfrak Z(G)$. If $G$ is reductive, then $Cusp(G)$ is still open and closed in $\hat G$, but is not discrete. As above, $\Psi(G)$ acts on $Cusp(G)$ and the latter is the disjoint union of orbits under $\Psi(G)$ with the natural quotient topology. The corresponding product of ring of regular functions on each orbits is then a factor of $\mathfrak Z(G)$, the "cuspidal" part $\mathfrak Z(G)_{cusp}$ of $\mathfrak Z(G)$.

Now remains the crucial step of describing the non-cuspidal part of the center. Bernstein uses parabolic induction from Levi subgroups. One quick way of stating the final result is : $$\mathfrak Z(G)\simeq \left( \prod_M \mathfrak Z(M)_{cusp} \right)^G$$ Here the product is over all Levi subgroup and $G$ acts by conjugacy. In order to get something less frightening, one can fix a maximal split torus $T$, restrict the product to those $M$'s that contain $T$ (finitely many) and take $N_G(T)$-invariants.

In particular, connected components are labeled by conjugacy classes of $\Psi(M)$-orbits in $Cusp(M)$. Suppose $G$ is split for simplicity. A particularly interesting component is that which corresponds to the $\Psi(T)$ orbit of the trivial character of $T$. Its contribution to $\mathfrak Z(G)$ is isomorphic to $\mathbb C [X(T)]^W$. This component contains the unramified representations and the action of $\mathbb C[X(T)]^W$ on each such representation is given by its Satake parameter. In fact the corresponding connected component of $\hat G$ is the set of irreps that have non-trivial invariant under an Iwahori-subgroup, and one recovers the fact that the center of the Hecke-Iwahori algebra identifies with $\mathbb C[X(T)]^W$. Finally, note that this ring looks like a "group version" of the center of an enveloping algebra, so the analogy with the Archimedean context is even deeper than expected.

On the link with Plancherel formula. Denote by $\hat G_u$ the unitary smooth dual inside $\hat G$. The abstract Plancherel theorem says that there is a measure $d\pi$ on $\hat G_u$ such that for any $f \in C^\infty_c(G)$ (even for $f$ in the Schwartz algebra) we have $$\int_{\hat G_u} Tr(\pi(f)) d\pi = f(1).$$ Note that $d\pi$ depends on the choice of a Haar measure on $G$ and the same choice is done to let $f$ act on $\pi$. Let $z\in \mathfrak Z(G)$, applying the formula to $z.f$ yields the formula $$\int_{\hat G_u} Tr(\pi(f)) \theta_\pi(z) d\pi = (z.f)(1)$$ which expresses the distribution associated to $z$ (geometric realization) in terms of the its action on $\hat G_u$. Of course this is only useful if one has an explicit formula for the measure $d\pi$. Such a formula is provided by Harish Chandra's theorem.

The first point is that the Plancherel measure is supported in the tempered spectrum. The latter decomposes as a disjoint union of infinitely many connected components in a similar fashion to the full smooth dual, except that now one considers $\Psi_u(M)$-orbits of discrete series, where $\Psi_u(M)$ now denotes unitary unramified characters (a compact torus inside $\Psi(M)$). So each component is a quotient of some homogeneous space under some $\Psi_u(M)$. The second point is that on such a tempered component, the Plancherel measure is absolutely continuous w.r.t. to the natural Lebesgue measure, and in fact given by some rational function. The precise computation of this rational function is not given by Harish Chandra, and in fact I don't know if it is known in general (maybe OK for classical groups).

Relation to Galois representations Assume here that $G=GL_n$ and consider the Langlands correspondence $\pi \mapsto \sigma(\pi)$ between irreducible representations of $G$ and Weil-Deligne representations. Then $\pi$ and $\pi'$ lie in the same Bernstein component if and only if the restriction to inertia of the Weil group action on $\sigma(\pi)$ and $\sigma(\pi')$ are isomorphic. I guess that they are tempered iff the monodromy filtration of $\sigma(\pi)$ is pure of weight $0$ and in this case $\pi$ and $\pi'$ are in the same tempered component iff restrictions of $\sigma(\pi)$ and $\sigma(\pi')$ to (Inertia $\times \langle N\rangle$) are isomorphic.

Applications in global context In the Langlands-Kottwitz approach to counting points on Shimura varieties in hyperspecial level, a certain spherical function (depending on the Shimura datum) has to be plugged in the Trace formula. In Iwahori level, work of Haines, Rapoport, Kottwitz shows that one should plug an element of the centre of the Iwahori-Hecke algebra. They then conjectured that similar phenomena should happen in deeper level.

More generally, recent work of Scholze shows (if I understood something, maybe he will contradict me soon!) that if one fixes an element $\tau$ in the Weil group (but outside the inertia group) and one considers the function $\pi \mapsto Tr(\tau, \sigma(\pi))$, then one gets an element of $z_\tau\in \mathfrak Z(G)$ such that for $H$ a congruence subgroup, the trace of $\tau$ on the cohomology of a (suitable) Shimura variety of local level $H$ can be computed using a trace formula evaluated at a test function whose local factor is (associated to) the function $z_\tau.e_H$.

I'm not able to provide more details on it, but the slogan is : central elements (should) provide good test functions in counting points on Shimura varieties.

• Many thanks for your excellent answer. Could you also explain the geometric side via Harish-Chandra Plancherel formula to us ? Apr 30, 2012 at 20:51
• And, if possible, some global stuff in this context, i.e. automorphic forms. Thanks Apr 30, 2012 at 20:53

here are some basic sources:

Bernstein's papers (and course notes) are all available at his homepage,

Benstein's paper

• Thank you for nice reference. I still hope someone could explain the motivation and concrete example about Bernstein center. Apr 26, 2012 at 23:35

Ralf Meyer develops part of the theory from scratch for locally compact groups via projective systems of Lie groups in section 5 of http://arxiv.org/abs/math/0310094

This theory speciales to the Bernstein center in the totally disconnected case and to the theory of the center of the universal envelopping algebra for complex Lie groups with trivial center. Also he relates the center to distributions.

He works on bornological vector-spaces, but states in the introduction that the theory includes smooth representation on Frechet-spaces. So the notion bornological and topological can be interchanged with no harm in this case. (I assume that many of us are more comfy with topological vectorspaces than with bornological ones. At least I am.)


text:
# which chemical element has the lowest boiling point? [closed]

which chemical element has the lowest boiling point?

Is it Helium(He) or is it Hydrogen(H)?

Hydrogen is lighter than Helium.

## closed as too localized by ManishEarthApr 1 '13 at 16:13

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Helium has a stablest $1s$ orbital, which has somewhat lower energy. And, this makes it chemically inert towards other elements and to other Helium atoms, which is also the reason for its lowest boiling point.


text:
# Largest rectangle in a skyline

A skyline is an array of positive integers where each integer represents how tall a building is. For example, if we had the array [1,3,4,2,5,3,3] this would be the skyline in ascii art:

    #
# #
## ###
######
#######

Your task is to find the area of the largest rectangle in the skyline. In this case, the largest rectangle has area 12. Here is the rectangle, highlighted:

    #
# #
## ###
RRRRRR
#RRRRRR

You can assume that the input contains at least one building (the length of the array is >0). This is , you know the drill.

Inspired by this Puzzling-SE post.

# Test cases

[1] -> 1
[2, 2] -> 4
[3, 2, 1] -> 4
[1, 2, 3] -> 4
[1, 5, 1, 5] -> 5
[1, 4, 1, 4, 1] -> 5
[1, 4, 5, 4, 1] -> 12
[1, 5, 4, 5, 1] -> 12
[1, 2, 3, 5, 1, 3] -> 6
[1, 3, 3, 1, 4, 5, 2] -> 8
[1, 3, 3, 1, 1, 1, 1] -> 7

• can we take a boolean matrix as input? Feb 14 at 9:00
• @Razetime no, it would be a different challenge and regardless almost a dupe of this Feb 14 at 10:00

# Jelly, 7 bytes

ẆṂ×LƊ€Ṁ

Try it online!

Ẇ   Ɗ€     For each contiguous sublist of the input,
Ṃ×        multiply its smallest element by
L       its length.
Ṁ    Return the largest product.

# Octave, 50 bytes

@(a)max(([c,v]=runlength([(a<=a').*a;0*a](:))).*v)

Try it online!

Based on my PARI/GP answer, but more interesting. This worth writing a Jonah-style explanation.

### how

Takes a = [1,3,4,2,5,3,3] as an example.

• a<=a' creates a matrix where the entry at (i,j) is a[j]<=a[i]:

1  0  0  0  0  0  0
1  1  0  1  0  1  1
1  1  1  1  0  1  1
1  0  0  1  0  0  0
1  1  1  1  1  1  1
1  1  0  1  0  1  1
1  1  0  1  0  1  1

• .*a multiplies the i-th column of the matrix with a[i]:

1   0   0   0   0   0   0
1   3   0   2   0   3   3
1   3   4   2   0   3   3
1   0   0   2   0   0   0
1   3   4   2   5   3   3
1   3   0   2   0   3   3
1   3   0   2   0   3   3

• [...;0*a] appends a row of zeros to the matrix, so that the columns are separated when taking run length encoding:

1   0   0   0   0   0   0
1   3   0   2   0   3   3
1   3   4   2   0   3   3
1   0   0   2   0   0   0
1   3   4   2   5   3   3
1   3   0   2   0   3   3
1   3   0   2   0   3   3
0   0   0   0   0   0   0

• ...(:) concatenates the matrix into a column vector (the actual output is the transpose of the following row vector):

1   1   1   1   1   1   1   0   0   3   3   0   3   3   3   0   0   0   4   0   4   0   0   0   0   2   2   2   2   2   2   0   0   0   0   0   5   0   0   0   0   3   3   0   3   3   3   0   0   3   3   0   3   3   3   0

• [c,v]=runlength gives the run length encoding, where each non-zero run corresponds to a rectangle in the skyline:

c =
7   2   2   1   3   3   1   1   1   4   6   5   1   4   2   1   3   2   2   1   3   1

v =
1   0   3   0   3   0   4   0   4   0   2   0   5   0   3   0   3   0   3   0   3   0

• ([c,v]=runlength(...)).*v multiplies c and v element by element, which gives the "area" of each run:

7    0    6    0    9    0    4    0    4    0   12    0    5    0    6    0    9    0    6    0    9    0

• Finally, max finds the maximum values of the result:

12

# Wolfram Language (Mathematica), 35 bytes

-5 bytes thanks to @att.

Max[Tr[Min@#+0#]&/@Subsequences@#]&

Try it online!

• 35 bytes
– att
Feb 14 at 7:59

# Python 3, 56 bytes basically by AnttiP

f=lambda x:x>[]and max(min(x)*len(x),f(x[1:]),f(x[:-1]))

Try it online!

# Python 3, 72 bytes

lambda x:max(min(x[i:j])*(j-i)for j in range(len(x)+1)for i in range(j))

Try it online!

# Python 3.8 (pre-release), 86 85 bytes

lambda x:(R:=range(0,len(x)+1))and max(min(x[i:j])*(j-i)for i in R for j in R if i<j)

Try it online!

Avoid something by pxeger

• I was going to say you could use the walrus operator in 3.8, but perhaps not... Feb 14 at 7:23
• @UnrelatedString Something would go wrong
– l4m2
Feb 14 at 7:24
• 59 bytes: Try it online! Feb 14 at 7:28
• -1 on the last one: Try it online! Feb 14 at 7:50

# 05AB1E, 8 bytes

ŒεWsg*}à

Port of @UnrelatedString's Jelly answer, so make sure to upvote him/her as well!

Explanation:

Œ       # Get all sublists of the (implicit) input-list
ε      # Map each sublist to:
W     #  Push its minimum (without popping the sublist)
s    #  Swap so the sublist is at the top again
g   #  Pop and push its length
*  #  Multiply it by the minimum
}à     # After the map: pop and push the maximum
# (after which it is output implicitly as result)

# Vyxal, 9 bytes

ÞSƛgnL*;G

Try it Online!

Port of Unrelated String's Jelly answer.

ÞSƛ    ;  # For each contiguous sublist
g  *   # Multiply the smallest element
nL    # The length.
G # Get the largest product.

• -2 with a flag. Feb 14 at 8:26
• @lyxal I know.. Feb 14 at 8:26

# BQN, 18 bytesSBCS

{⌈´(+´≠⥊⌊´)¨∾↓¨↑𝕩}

Run online!

↑𝕩 Prefixes of the input (includes the empty prefix)
↓¨ Suffixes of each prefix
∾ Flatten into a list of sublists
( )¨ For each sublist:
≠⥊⌊´ Reshape the minimum to the length of the sublist

+´ Sum the resulting list ⌈´ Get the maximum result

Instead of +´≠⥊⌊´ other answers use ≠×⌊´, but that results in 0×∞ = NaN for empty sublists, which ends up as the result of ⌈´.

# R, 63 bytes

function(l,r=rle(c(t(cbind(outer(l,l,<=)*l,0)))))max(r$l*r$v)

Try it online!

Port of alephalpha's solution.

• I managed to get to 74 bytes porting the "try each subsequence" strategy, but perhaps there's still a big golf I'm missing? Feb 14 at 21:10
• Hmm, I don't see one, @Giuseppe. I also got around 70-something with taking rle along each row to omit zero-padding like in Sundar's MATL answer. Feb 15 at 7:32

# Brachylog, 9 bytes

sᶠ⟨⌋×l⟩ᵐ⌉

Try it online!

sᶠ    ᵐ     For each contiguous sublist of the input,
⟨⌋× ⟩      multiply its smallest element by
l       its length.
⌉    Return the largest product.

# MATL, 1715 14 bytes

&<~G!*"@Y'*vX>

(Edit: turns out alephalpha's idea is very similar, this just uses a loop instead of zero padding + linearization)

With input [1; 2; 3; 5; 1; 3]

&<~         % make a boolean matrix, each column denoting
%   which buildings are >= current one

1 0 0 0 1 0
1 1 0 0 1 0
1 1 1 0 1 1
1 1 1 1 1 1
1 0 0 0 1 0
1 1 1 0 1 1

G!*         % multiply by input

1 0 0 0 1 0
1 2 0 0 1 0
1 2 3 0 1 3
1 2 3 5 1 3
1 0 0 0 1 0
1 2 3 0 1 3

"@Y'        % for each column, take its run-length encoding

eg. for second column,
[0 2 0 2]
[1 3 1 1]

*           % multiply to get rectangle areas

vX>         % cumulatively, keep finding the maximum area

% implicit loop end, implicit output

-1 byte thanks to @LuisMendo.

• @LuisMendo I've probably done this every time there's a X> near the end, and you've helpful pointed it out every time. I never seem to learn though. :D Feb 14 at 20:13
• Haha, I didn't remember that. So, you may want to bookmark this Feb 14 at 20:53

# Factor, 58 bytes

[ all-subseqs [ dup infimum swap length * ] map supremum ]

Try it online!

Port of @UnrelatedString's Jelly answer.

• all-subseqs Get every possible grouping of contiguous skyscrapers.
• [ dup infimum swap length * ] map Get the area of each grouping by multiplying the height of the shortest skyscraper in the grouping by the number of skyscrapers in the grouping.
• supremum Return the largest area.

# Pari/GP, 50 bytes

a->m=vecmax;m([m([c=(t>=s)*c+=s|t<-a*!c=0])|s<-a])

Try it online!

# Pari/GP, 50 bytes

a->m=0;[[m=max(m,c=(t>=s)*c+=s)|t<-a*!c=0]|s<-a];m

Try it online!

# Charcoal, 19 bytes

Ｉ⌈Ｅθ⌈Ｅ⊕κ×⁻⊕κλ⌊✂θλ⊕κ

Try it online! Link is to verbose version of code. Explanation: Port of @l4m2's Python answer.

   θ                Input array
Ｅ                 Map over elements
κ            Current index
⊕             Incremented
Ｅ              Map over implicit range
κ        Outer index
⊕         Incremented
⁻          Subtract
λ       Inner index
×           Multiplied by
θ    Input array
✂     Sliced from
λ   Inner index to
κ Outer index
⊕  Incremented
⌊      Take the minimum
⌈               Take the maximum
⌈                  Take the maximum
Ｉ                   Cast to string
Implicitly print

# JavaScript (ES6), 69 bytes

f=a=>+a||Math.max(Math.min(...a)*a.length,f(a.slice(1),a.pop()),f(a))

Try it online!

### Commented

f =                // f is a recursive function taking:
a =>               //   a[] = skyline array
+a ||            // if a[] is a singleton, return its unique value
Math.max(        // otherwise, return the maximum of:
Math.min(...a) //   1) the smallest value of a[]
* a.length,    //      multiplied by the length of a[]
f(             //   2) the result of a recursive call
a.slice(1),  //      with the 1st item removed
a.pop()      //      (remove the last item for the next call)
),             //
f(a)           //   3) the result of a recursive call
//      with the last item removed
)                // end of Math.max()

# Python3, 78 bytes:

f=lambda x,c=0,j=1:j>len(x)or max([min(x[c:j])*(j-c),f(x,c,j+1),f(x,c+1,j+1)])

Try it online!

# C (gcc), 108 97 bytes

m;s;j;k;f(a,n)int*a;{for(m=0;n--;)for(j=a[n];s=j;--j,m=s>m?s:m)for(k=n;k--;)s+=a[k]<j?k=0:j;j=m;}

Try it online!

Inputs a pointer to an array of positive integers and its length (because pointers in C carry no length info).
Returns the area of the largest rectangle in the skyline.

# APOL, 29 bytes

M(ƒ(z(Ŀ(s(i))) *(m(∋) l(∋))))

A port of UnrelatedString's Jelly answer.

## Explanation

M(                Largest element of
ƒ(              For
z(Ŀ(s(i)))    every contiguous sublist of the input,
*(m(∋) l(∋))  multiply its smallest item by its length
)               and make a list of the results.
)
implicit print

# Husk, 7 bytes

▲m§*▼LQ

Try it online!

### Explanation

▲m§*▼LQ
m    Q   for each contiguous sublist
§*      multiply it's
▼L    minimum value by it's length
▲         maximum of that

# JavaScript (Node.js), 64 bytes

a=>Math.max(...a.map((n,i)=>(g=d=>a[i+=d]>=n&&g(d)+n)(-1,g(1))))

Try it online!

Related

# Haskell + hgl, 13 bytes

xM(mn*×l)<cg

In the interested of transparency, since hgl is under heavy development some features used in this answer were only merged into master recently.

## Explanation

We just use the most straightforward possible algorithm.

cg gets all contiguous sublists we take these as the footprints for potential boxes. We then for each of these multiply it's length by it's minimum element with mn*×l and take the maximum overall.

This is just a simpler version of the algorithm employed in the more interesting version of this challenge.

# Haskell, 65 bytes

f l=maximum[x*(minimum\$take x t)|t<-scanr(:)[]l,x<-[1..length t]]

Try it online!


text:
# What model can solve vector to vector prediction?

I am totally newbie into serial prediction. I am think about which model or AI paradigm can be used to do vector to vector prediction?

For instance, [1,0,1] ^ [0,1,0] = [1,1,1] Another example could be: [1,0,1]^[0,1,0]^[1,1,0]^... = [RESULT]

(I have to say that this example is not proper enough, because obviously we can use a multi-layer model to simply learn the rule of XOR operation with 100% accuracy, but I think it still can indicate what I want. The point is multi-dimensional input and figure out a non-linear rule. Let's say each row vector can be a row of a matrix, I want to find some pattern across each column entries.)

Another better example: [[1,2,3], [4,5,6], [7,8,9]] => [10,3,8]

I know seq2seq model, to some extend can do this job, so as pointer network. But I am just skeptical on my knowledge in this RNN area. And I do need some help.

For the record, I think what I want is different from stock prediction or word prediction or sentence classification. My argue is that these tasks will need an embedding layer to output a one-hot or whatever vectorization and feed the embedding to the model.

But my original input has already been vectors. I did try to feed those vectors as an embedding to the model. But theoretically, it does not make sense to me. And it did not work under my practice.

Yes, I dare to share my code. Please be easy on me.

    # model structure
model = keras.Sequential()
# The output of GRU will be a 3D tensor of shape (batch_size, timesteps, 256)
# The output of SimpleRNN will be a 2D tensor of shape (batch_size, 128)

# build model
model.compile(optimizer=opt, loss="binary_crossentropy", metrics=[BinaryAccuracy()])
model.summary()
# A_input = A_input.reshape(1, node_size, node_size)
# label = label.reshape(1, node_size)

# train
model.fit(A_input, label, epochs=200, batch_size=10, validation_split=0.3)
$$$$

Taking the example you provided, you can use a simple RNN or any Seq-Seq architecture. Your input should be of the shape (BATCH_SIZE, NO_OF_TIMESTEPS, FEATURES_AT_EACH_TIMESTEP). So, you basically need to reformat your input as arr = np.array([[1,4,7], [2,5,8], [3,6,9]]) - This assuming that 1,4,7 are representing different set of features at the same time-step (or same dim of diff vectors). Your training output (Y) would be of the shape (BATCH_SIZE, TIME_STEPS) OR arr_y = np.array([[10, 3, 8]]) Then, you can have the model predict the output for the next 3 time-steps (or 3 dimensions of the vector). Note that, in your case you are not really constraining the model to look at the link [TF_simpleRNN][1]. Note that you need to use return_sequences=True and use a single unit as the output


text:
# Choose a number X at random from the set of numbers \{1,\ 2,\ 3,\ 4

Choose a number X at random from the set of numbers . Now choose a number at random from the subset no larger than X, that is, from . Call this second number Y.
a) Find the joint mass function of X and Y.
b) Find the conditional mass function of X given that Y=i. Do it for i=1, 2, 3, 4, 5.
с) Are X and Y independent? Why?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

twineg4
We are given that . Observe that $Y\le X$ almost certainly and that also
(a)
For $k\le l$ we have that
$\mid P\left(Y=k,X=l\right)=P\left(Y=h\mid X=I\right)P\left(X=I\right)=\frac{1}{l}\cdot \frac{1}{5}$.
I $tk>l$, we have that $P\left(Y=k,X=l\right)=0$
(b)
Using the law of the total probability, we have that
$P\left(Y=i\right)=\sum _{l=i}^{5}P\left(y=i,x=i\right)=\sum _{l=i}^{5}\frac{1}{5l}$
Now,for $i\le$ we have that
$P\left(X=i\mid Y=i\right)=\frac{P\left(Y=i,X=i\right)}{P\left(Y=i\right)}=\frac{\frac{1}{5l}}{\sum _{\left\{i=1\right\}}^{5}\frac{1}{5l}}$
(c)
No, these random variables are not independent Since $Y\le X$, take any $k>l$, for example take .
Hence $P\left(Y=k,X=1\right)=0$. On the other hand, it is pretty obvious that $P\left(Y=k\right)>O$ and $P\left(X=1\right)>0.$
Thus
$P\left(Y=k,X=1\right)\ne P\left(Y=k\right)P\left(X=I\right)$
so they can not be independent.

Thomas White
For X, we have 1 chance out of five to get any of the five numbers, so
$Px\left(k\right)=\frac{1}{5}=0.4$ for any integer k between 1 and 5.
For Y,we can use the theorem of total probability, because we can divide Y
in five different cases depending on how it went with the value of X. We can
remove impossible cases (of probability 0), those cases happen when X is
smaller than the value we want to get with Y.
$Py\left(1\right)=P\left(Y=1\right)=P\left(Y=1\mid X=1\right)×P\left(X=1\right)+$
$P\left(Y=1\mid X=2\right)×P\left(X=2\right)+P\left(Y=1\mid X=3\right)×P\left(X=3\right)+$
$P\left(Y=1\mid X=4\right)×P\left(X=4\right)+P\left(Y=1\mid X=5\right)\cdot P\left(X=5\right)=$
$0.1×0.2+0.5×0.2+\frac{1}{3}×0.2+0.25×0.2+0.2×0.2=0.45666$
$Py\left(2\right)=P\left(Y=2\right)=P\left(Y=2\mid X=2\right)×P\left(X=2\right)+$
$P\left(Y=2\mid X=3\right)×P\left(X=3\right)+P\left(Y=2\mid X=4\right)×P\left(X=4\right)+$
$P\left(Y=2\mid X=5\right)×P\left(X=5\right)=0.5×0.2+\frac{1}{3}×0.2\mp 0.25×0.2×0.2×0.2=0.25666$
$Py\left(3\right)=P\left(Y=3\right)=P\left(Y=3\mid X=3\right)×P\left(X=3\right)+$
$P\left(Y=3\mid X=4\right)×P\left(X=4\right)+P\left(Y=3\mid X=5\right)×P\left(X=5\right)$
$=\frac{1}{3}×0.2+0.25×0.2+0.2×0.2=0.15666$
$Py\left(4\right)=P\left(Y=4\right)=P\left(Y=4\mid X=4\right)×P\left(X=4\right)+$
$P\left(Y=4\mid X=5\right)×P\left(X=5\right)=0.25×0.2+0.2×0.2=0.09$


text:
全文文献 工具书 数字 学术定义 翻译助手 学术趋势 更多

 情况 的翻译结果: 查询用时：1.012秒
 历史查询

 情况
 of
 Expression of Maspin and BCSG1 in Breast Cancer and the Effects of Neoadjuvant Chemotherapy on the Expressions 乳腺癌maspin、BCSG1表达情况及新辅助化疗对其表达影响的研究 短句来源 Survivin Expression in Human Colorectal Carcinoma and Specific Inhibition of Survivin Gene Expression by RNA Interference 凋亡抑制基因survivin在大肠癌组织的表达情况及RNA干扰的初步研究 短句来源 Experiment and Clinical Investigation of FLK-1、LRP and MDR1 in Human Primary Lung Cancer 肺癌患者FLK-1、LRP和MDR1表达情况的实验与临床研究 短句来源 Differentiation and Distribution of Connexin and Arrhythmogenic Effects after Autologous Canine Bone Marrow Mesenchymal Stem Cells Transplantation 犬骨髓间充质干细胞移植后缝隙连接分化情况及其致心律失常源性研究 短句来源 Observation on the Hibernation of the Common Mosquitoes in Shanghai 上海地区几种常见蚊虫越冬情况的观察 短句来源 更多
 situation
 Desertification—the nigerian situation 尼日利亚沙漠化的情况 短句来源 Market situation of chemical reagents 化学试剂的市场情况 短句来源 THE MALARIA SITUATION IN 1984 IN THE PEOPLE'S REPUBLIC OF CHINA 1984年全国疟疾防治工作和发病情况 短句来源 MALARIA SITUATION IN CHINA, 1985 1985年全国疟疾情况 短句来源 THE DEVELOPMENT HISTORY OF CONTINUING ENGINEERING EDUCATION AND THE SITUATION FROM ABROAD 继续工程教育的历史发展及国外情况 短句来源 更多
 condition
 INTERFACIAL RESISTANCE OF MASS TRANSFER AT LIQUID-LIQUID INTERFACE UNDER FLOWING CONDITION 流动情况下液液界面传质阻力的研究 短句来源 Calculation and Practice of Gas Well Killing on the Mud Blowdown Condition 泥浆喷空情况下的气井压井计算与实践 短句来源 THE CONDITION AND ANALYSIS OF STAFF EDUCATIQANL WORKERS FOR SEISMOLOGICAL BUREAU OF XINJIANG UYGUR AUTONOMOUS REGION FROM1980 to 1985 1980—1985年新疆维吾尔自治区地震局职工教育工作的情况与分析 短句来源 THE INVESTIGATION OF ALLOWABLE CONCENTRATION OF THE DUST OF FERROALLOY FROM THE CONDITION OF INCIDENCE IN PNEUMOCONIOSIS OF FERROALLOY 从铁合金尘肺发病情况探讨铁合金粉尘容许浓度 短句来源 CRITICAL CONDITION AND TIME-TO-IGNITION FOR THERMAL EXPLOSIONS (Ⅱ) REACTANT COMSUMPTION INCLUDED 热爆炸的临界条件和点火时间 (Ⅱ)有反应物消耗情况 短句来源 更多
 conditions
 CALCULATION OF NONLINEAR COMPRESSIBILITY EFFECTS OF AIRFOILS IN SUBCRITICAL CONDITIONS 亚临界情况下翼型的非线性压缩性修正 短句来源 ROUTING ALGORITHMS FOR RMISE AND C+_(1,t)～nβ-NETWORK IN FAULTY-FREE AND FAULTY CONDITIONS RMISE和C_(1,t)~nβ—网络在正常和故障情况下的寻径算法 短句来源 Cementing Tail Pipe under Complicated Conditions of 6026 m.in Well Long—4 龙4井6026m 复杂情况下的尾管固井 短句来源 THE TREATMENT OF THE SPECIAL CONDITIONS IN SOLVING THE CONTACT PROBLEMS BY MEANS OF ELASTIC CONTACT MIXED FINITE ELEMNT METHOD 用弹性接触有限元混合法求解接触问题时几种特殊情况的处理 短句来源 SERIOUS ENERGY SHORTAGE CONDITIONS IN METALLURGY IN 1989 AND ENERGY SITUATION IN CHINA IN 1990 1989年冶金能源紧张情况和1990年的能源形势 短句来源 更多

我想查看译文中含有：的双语例句

 of
 We use the theory of tilting modules for algebraic groups to propose a characteristic free approach to "Howe duality" in the exterior algebra. Euler characteristic of certain affine flag varieties The purpose of this note is to prove, as Lusztig stated, that the Euler characteristic of the variety of Iwahori subalgebras containing a certain nil-elliptic elementnt istcl wherel is the rank of the associated finite type Lie algebra. In our paper [KR] we began a systematic study of representations of the universal central extension[InlineEquation not available: see fulltext.] of the Lie algebra of differential operators on the circle. This study was continued in the paper [FKRW] in the framework of vertex algebra theory. 更多
 situation
 We also consider a similar situation for affine systems of the type φ(μx - λ), μ ∈ Γ, λ ∈ Λ. The following situation in using the method of least squares to solve problems often occurs. Simulation studies are presented which indicate that the asymptotic approximation to the finite-sample situation is good over a wide range of parameter configurations. In the other situation it uses the second-order Taylor's expansions approximation interpolation algorithm to obtain a constant feed speed so that the contour accuracy in the CNC system is guaranteed. To deal with this contradictory situation, insolvable zirconium tricarboxybutylphosphonate (Zr(PBTC)) powder was employed to make a composite with SPEEK polymer in an attempt to improve temperature tolerance of the membranes. 更多
 condition
 We also prove the shifted cocycle condition for the twistors, thereby completing Fr?nsdal's findings. It is known [M4] that K?-orbits S and G?-orbits S' on a complex flag manifold are in one-to-one correspondence by the condition that S ∩ S' is nonempty and compact. We give a simple necessary and sufficient condition for a Schubert It is also shown that on the nilmanifold $\Gamma\backslash (H^3\times H^3)$ the balanced condition is not stable under small deformations. A necessary and sufficient geometric condition on the growth of the boundary of approximate tiles is reduced to a problem in Fourier analysis that is shown to have an elegant simple solution in dimension one. 更多
 conditions
 As a consequence, the action is linearizable if certain topological conditions are satisfied. An algebraicG-varietyX is called "wonderful", if the following conditions are satisfied:X is (connected) smooth and complete;X containsr irreducible smoothG-invariant divisors having a non void transversal intersection;G has 2r orbits inX. Here we provide certain conditions (more general than those in [Ka1]) which guarantee preservation of the topology under a modification. We express the vanishing conditions satisfied by the correlation functions of Drinfeld currents of quantum affine algebras, imposed by the quantum Serre relations. We discuss the relation of these vanishing conditions with a shuffle algebra description of the algebra of Drinfeld currents. 更多
其他
 点击这里查询相关文摘
 相关查询

 CNKI小工具 在英文学术搜索中查有关情况的内容 在知识搜索中查有关情况的内容 在数字搜索中查有关情况的内容 在概念知识元中查有关情况的内容 在学术趋势中查有关情况的内容

 CNKI主页 |  设CNKI翻译助手为主页 | 收藏CNKI翻译助手 | 广告服务 | 英文学术搜索
2008 CNKI－中国知网

2008中国知网(cnki) 中国学术期刊(光盘版)电子杂志社


text:
NOAO >   Observing Info >   Approved Programs >   2012B-0285

# Proposal Information for 2012B-0285

PI: Christopher Haines, University of Arizona, cphaines@as.arizona.edu
Address: Steward Observatory, 933 North Cherry Avenue, Tucson, AZ 85721, USA

CoI: Ewan O'Sullivan, University of Birmingham, UK
CoI: Somak Raychaudhury, University of Birmingham, UK
CoI: Eiichi Egami, Steward Observatory
CoI: Luis Campusano, Universidad de Chile, Chile

Title: KPNO 0.9m H(alpha) Imaging Survey of Transforming Galaxies'' in Local Galaxy Groups

Abstract: We propose to use the KPNO 0.9-m telescope to obtain panoramic H(alpha) imaging of ~135 galaxies in ten nearby galaxy groups (60- 80 Mpc) from the Complete Local-Volume Groups Sample (CLoGS). In rich clusters ram-pressure stripping has been shown to be very effective at removing the gas contents and quenching star formation in infalling spiral galaxies. It is much less clear how galaxies are affected by the much lower ram pressures found in galaxy groups, or if other environmental processes begin to dominate. Given that >50% of galaxies in the local volume reside in groups, it is vital that we gain new insights into which mechanisms drive the SFR-density relation in groups. The proposed H(alpha) imaging will allow us to resolve \em where star-formation is occurring in each galaxy. This can effectively discriminate between ram-pressure stripping characterized by truncated H(alpha) disks, the much gentler starvation mechanism which produces anemic spirals, and nuclear starbursts triggered by low-velocity encounters and mergers which should be most frequent in groups.

National Optical Astronomy Observatory, 950 North Cherry Avenue, P.O. Box 26732, Tucson, Arizona 85726, Phone: (520) 318-8000, Fax: (520) 318-8360

 NOAO >   Observing Info >   Approved Programs >   2012B-0285


text:
## Category Theory for Programmers Chapter 16: Yoneda Embedding

1. Express the co-Yoneda embedding in Haskell, $\mathscr{C}^{\mathrm{op}}, \mathbf{Set} \cong F(A)$.

Todo.

2. Show that the bijection we established between fromY and btoa is an isomorphism.

3. Work out the Yoneda embedding for a Monoid. What functor corresponds to the single object? What natural transformations correspond to the morphism?

4. What is the application of hte covariant Yoneda embedding to preorders?

5. Yoneda embedding can be used to embed an artitrary functor category, $[\mathscr{C}, \mathscr{D}]$ in the functor category $[[\mathscr{C}, \mathscr{D}], \mathbf{Set}]$. Figure out how it works on morphisms.


text:
# Math Help - Average Value of a Function

1. ## Average Value of a Function

The average value of a function f(x)=cos(1/2x) on the closed interval [-4,0] is
A) -1/2 sin(2)
B) -1/4 sin (2)
C) 1/2 cos (2)
D) 1/4 sin (2)
E) 1/2 sin (2)

I don't know what I'm doing wrong but I always end up with 1/2 sin(-2)
$\int_{ - 4}^0 {\cos \left( {\frac{x}


text:
# Currency derivatives house of the year: UBS

## Risk Awards 2022: T-Pricer platform enabled bank to gain technological edge

The options market has viewed the pairing between the Taiwanese and US dollars as relatively liquid. Yet when a client of UBS wanted to take out a notional $5 billion of options against the pair last year, many in the market might have felt that the size of the trade would make it difficult to hedge. Despite this, the investment the bank has made in its foreign exchange options pricing and distribution tools meant it was well placed to handle it. “In a world of increased automation, lower volatility and rapidly compressing spreads, being data-driven and tech-enabled is essentially a survival requirement,” says Adrian Boehler, UBS’s global head of FX distribution. “It is the only way in which you are going to be able to partner with clients, come thick or thin. It’s about setting ourselves up to stay relevant sustainably.” For the USD/TWD transaction, the first thing the bank needed to work out was exactly what type of option to trade, given the goals the client had in mind. The client was first directed to T-Pricer, UBS’s system for structuring, pricing and trading FX options. Originally designed for internal use by the bank’s trading desk, it was made available to clients, at no extra cost to them, for the first time in 2021. The client used T-Pricer’s pre-trade analytics tools to test potential structures and thereby choose the most appropriate trade, tenor and strikes. In the end, it went with billions of dollars of vanilla options, as well as digital options with payouts greater than$500 million.

For UBS, the tech upgrades helped it execute the trade and more effectively offload the risk. The bank was not only able to skew options prices across all outlets, but to match axes more quickly and efficiently with targeted clients based on past behaviour.

The Taiwan trade wasn’t a one-off, and UBS’s tech-driven setup enabled it to make a series of jumbo options trades in 2021. One was a multi-billion-dollar Swiss franc/Polish zloty options trade that it hedged by skewing prices in correlated pairs such as euro/Polish zloty, US dollar/Polish zloty and euro/Swiss franc.

UBS was also called on to execute a long-dated options structure of sterling/Australian dollar and sterling/US dollar, with a notional value just shy of $2 billion but with a vega greater than$5 million. These pairs are not highly liquid either, which required UBS to again take axes in correlated pairs to what its system identified as potentially interested clients.

### Progress through technology

The tech overhaul that enabled UBS to handle these types of trade started around four years ago, when the bank boosted its IT spend by 7%. It also transferred staff from its group technology team into the FX business’s front office to form Levitas, an e-options team in which quant engineers sit back-to-back with options traders to develop pricing and analytics functionality. One of the new team’s early focuses was building T-Pricer.

For vanillas and first-generation exotics, clients already had access to a tool called Flex on Neo, UBS’s single-dealer platform, which was successful but written in a coding language that would not be supported for much longer. Instead of rewriting the existing platform into a newer language, UBS launched T-Pricer and migrated from Neo Flex, while expanding the tool’s capabilities to cover the whole options spectrum, from vanilla to complex.

T-Pricer allows clients to use the platform’s 20 years of volatility data to run pre-trade analysis on any permutation imaginable across around 400 products. Users can reprice structures using different tenors and strategies, and run grids with multiple variables with shocks of spot to see how the value of an option changes over different time frames. For structured products like dual currency deposits, users could work out the coupon that would be paid depending on the maturity and the strike price.

Clients can execute on T-Pricer and run post-trade analytics. They can also create alerts on the value of their options that send out reminders for them to restructure the trade.

###### In a world of increased automation, lower volatility and rapidly compressing spreads, being data-driven and tech-enabled is essentially a survival requirement

Mathieu Reaud, global head of FX options at UBS, says clients’ ability to use T-Pricer was crucial to landing those outsized options trades: “Without this pre-trade analytics work that we’ve done with a client, we probably wouldn’t have [made] such trades.”

T-Pricer isn’t only used for jumbo options trades. Clients across the board have praised it as an intuitive, sophisticated and impressive system. Some point out that whereas other banks have stuck with the same technology or made incremental changes, UBS has twice taken the risk to deliver a better product.

“I’ve not seen any bank taking this kind of risk,” says one client whose book of business with UBS – especially in accumulators, targets and other complex trades – has increased over the past year. “Other banks prefer to make an evolution of their current platform. But to go to the extent of reworking everything, I’ve not seen that. So, it’s pretty daring from UBS.”

The client adds: “Now, with their new T-Pricer, their market share has increased in my house. They’re already up to 20% to 25% of my structured products, so they got a lot of new trades.”

Another client whose entire global team uses T-Pricer calls it the best options platform on the market. This client says they prefer UBS because it removes the baggage that makes other platforms clunky – such as the inclusion of spots, forwards and market insights – to deliver a dedicated platform for options.

“They’ve basically just gone and simplified what a derivative is,” the client says. “They’ve made it easy to build options, to value options, to structure options. There’s not a product that we can’t do. And our line of business does stuff that not many people will do, so it’s extremely far-ranging from a product perspective.

“By doing that, they end up winning far more than they used to. Our volume with UBS has probably doubled in the past six months compared with the previous six months. That is a direct result of their platform being so easy to use.”

Another aspect of UBS’s tech overhaul was focused on improving the bank’s ability to skew pricing on its e-options quotes and thereby move risk more efficiently. This effort came as decreasing FX volatility and tightening bid/offer spreads made it harder to run an options franchise. This in turn has made the ability to internalise flow – either by matching offsetting client trades internally to avoid having to go to external venues, or by skewing prices on e-platforms to get clients to take the bank out of the risk – more important than ever. Being able to do this was an important contributor in enabling UBS to handle such large trades and properly manage the risk.

In 2021, the bank introduced a risk-based skewing model for its electronic and voice-flow options trading across developed and emerging markets pairs. Although such models are commonplace in the FX spot market, their use poses far greater challenges for options because of the extra parameters involved in these types of securities. The pace of trading in options is far slower than is the case in the spot market: it might take hours to move the risk by showing skewing prices, during which UBS would be giving away valuable information about its positions to competitors.

The bank therefore built tools to enable the sales teams to create curated axes for clients. These bots help the sales team to match axes up more effectively with statistics it keeps in order to determine the clients most likely to be interested in a particular position. This ultimately allows the bank to move risk more cheaply and efficiently. Clients can also access the axes by making enquiries via the bank’s chat bot.

As a result, UBS’s internalisation rate in developed markets has risen from 67% in 2016 to 92% today. In emerging markets, its internalisation rate is now 87%, compared with 62% six years ago.

“Improving our aim very specifically means becoming more effective at finding the offsetting buying interest if we are selling, and vice versa,” says Boehler. “And what the analytics that we have enable us to do is become more data-driven in our approach. Based on historical trading patterns, we are now better able to see what part of the franchise has had potential offsetting interest to the particular risk that we’re trying to offset in the market.”

Pricing accuracy is important to guard against the bank being negatively selected – where it wins a trade only because of a mispricing, and is then left with a bad position.

UBS has made further steps over the past year to develop its options pricing infrastructure, and its traders can now view live tick-by-tick valuations of options trades. This is useful during volatile markets and feeds into the algorithms that automatically hedge the bank’s gamma exposures. Volatility surfaces are generated based on trader input, along with external data points from brokers, exchanges and aggregators, for example.>

The technology has also allowed UBS to refine its profitability metrics. The bank has moved away from hit-rate models to look at a live measure of P&L decay – something that is widely available in the linear world of FX but which is new to options. It can examine the profitability of every trade with specific clients, venues or pairs, at specific times of day or in different time zones.

“From this we can learn and price accordingly to maximise market share and remain profitable,” says Reaud.

### Emerging growth

The tech upgrades have improved UBS’s ability to price emerging markets options, which last year exceeded their developed markets counterparts in terms of the share of the bank’s revenue. In the fourth quarter, UBS serviced clients during the volatility in the Turkish lira; this was helped by the bank’s ability to offset flows across its institutional and wealth management clients.

“We replaced 75% of our emerging markets options traders globally a couple of years ago,” says John Newman, global head of FX trading at UBS. “And just having those guys in the seats to deal with volatility, plus the tech build that we invested in, has really been ‘so far, so good’.

“Obviously, when the currency has moved, depreciating 16%, 17% a week, [that] has really enabled us to stay relevant to clients in terms of knowing what positions and trades to print whilst remaining solvent. And that’s really kicked our year on and enabled us to finish as strong as we are.”

The bank’s share of the electronic non-deliverable forwards market also more than doubled as it deployed new platforms and liquidity pools, and expanded the reach of its algorithmic risk management to pairs involving other currencies, including the Indonesian rupiah, the Philippine peso, the Chilean peso and the Russian ruble.

“With NDFs, we are leveraging exactly the same technology, the same low-latency platforms and algorithms for pricing and risk management as we have within the G10 spot business,” says Newman. “We have those basics, and we don’t have to rebuild them.”

Only users who have a paid subscription or are part of a corporate subscription are able to print or copy content.

To access these options, along with all other subscription benefits, please contact [email protected] or view our subscription options here: http://subscriptions.risk.net/subscribe

#### Investing

###### Pension funds foresaw margin meltdown (a decade ago)

Years of warnings went largely unheeded. Questions may now spread to post-crisis clearing and margining project


text:
cohomology

# Contents

## Idea

Given a stable (∞,1)-category $C$, its decategorification

$K_0(C) = \{equivalence \,classes\; [c]\; of \,objects \,c \in C\}$

naturally inherits the structure of an abelian group from the fibration sequences in $C$:

for

$a \to x \to c$

a fibration sequence (i.e. a homotopy exact sequence) the abelian group operation

$+ : K_0(C) \times K_0(C) \to K_0(C)$

is such that

$[x] = [a] + [c] \,.$

The group $K_0(C)$ is called the K-group of $C$ or the Grothendieck group of $C$. See in particular the latter entry for more details.

The “K” is chosen by Grothendieck for the German word Klasse for “class”. The K-group of $C$ is the group of equivalence classes of $C$: it is a group due to the existence of a notion of exact sequences in $C$.

K-theory starts with the study of these K-groups and their higher analogues. Sometimes the K-groups themselves are called “K-theory”. One would say for instance: ”$K(C)$ is the K-theory of $C$.”

More generally, there is a symmetric groupal ∞-groupoid $\mathbf{K}(C)$ – i.e. a connective spectrum – in between the decategorification from $C$ to $K(C)$ of which $K(C)$ is the set of connected components

$C \mapsto \mathbf{K}(C) \to \pi_0 \mathbf{K}(C) = K(C) \,.$

In nice cases this is the degree 0 part of a non-connective spectrum which is then the K-theory spectrum of $C$. This is also called the Waldhausen K-theory of $C$.

## Special cases and models

Much of the literature on K-theory discusses constructions that model the above abstract setup in terms of model categories, or just their homotopy categories, often of the derived catgeories type and then often expressed in terms of the abelian category or more generally Quillen exact category from which the derived category is derived.

Only a subset of the structure on a model category is necessary in order to conveniently extract the K-groups of the presented stable (∞,1)-category. For that reason the axioms of a Waldhausen category have been devised to provide just the necessary convenient prerequisites to compute the K-groups of the (∞,1)-category presented by the underlying homotopical category.

• In particular, the K-group associated to the stable (∞,1)-category $Ch^b(A)$ of bounded chain complexes in an abelian category or exact category $A$ is often called the K-group of $A$ itself and just denoted

$K(A) := K(Ch^b(A)) \,.$

Most explicit constructions of K-theory spectra start with the data of an exact category, such as notably Quillen’s Q-construction? and the Waldhausen S-construction.

• In particular if the exact category $A$ is that of vector bundles on a topological space $X$

$A = VectBund(X)$

the corresponding K-group is degree 0 topological K-theory. This was the original of the notion and the term K-theory.

## Definition

Recall that given a (∞,1)-category $C$, we may regard it as a complete Segal space $C_{\bullet,\bullet}$, a bisimplicial set. For instance if $C$ is originally given as a quasicategory then

$C_{\bullet,\bullet} : [n],[m] \mapsto Core(Func(\Delta^n,C))_{m} \,,$

where $Core(Func(\Delta^n,C))$ denotes the maximal Kan complex inside the (∞,1)-category of (∞,1)-functors from $\Delta^n$ to $C$.

###### Definition

For $\mathcal{C}$ an (∞,1)-category and $n \in \mathbb{N}$, write $Gap(\Delta^n, \mathcal{C})$ for the full sub-$\infty$-category on $Func(Arr(\Delta^n),\mathcal{C} )$ on those objects $F$ for which

• the diagonal $F(n,n)$ is inhabited by zero objects, for all $n$;

• all diagrams of the form

$\array{ F(i,j) &\to& F(i,k) \\ \downarrow && \downarrow \\ F(j,j) &\to& F(j,k) }$

is an (∞,1)-pushout.

###### Definition

Let $C$ be a stable (∞,1)-category. Then its Waldhausen K-theory

$\mathbf{K}(C) := \underset{\rightarrow}{\lim}_n Core(Gap(C^{\Delta^n}))$

is the geometric realization of/homotopy colimit of the degreewise core of the $Gap$, def. 1, of the corresponding complete Segal space (as a simplicial diagram of $\infty$-groupoids).

This is remark 11.4 in StCat.

This construction is also conjectured in the last section of Toen-Vezzosi’s A remark on K-theory .

###### Remark

In the case that $C$ is the simplicial localization of a Waldhausen category $\bar C$ the explicit way to obtain this is the Waldhausen S-construction.

###### Remark

It should be true that with this definition we have an isomorphism of groups

$K(C) \simeq \pi_0 \mathbf{K}(C) \,.$
###### Remark

This Waldhausen/hocolim-construction gives the connective K-theory, taking values in connective spectra. The universal completion to functor that sends homotopy cofibers of stable (infinity,1)-categories to homotopy cofibers of spectra is the corresponding unconnective $\mathbb{K}$-functor.

There is a universal characterization of the construction of the $\mathbb{K}$-theory spectrum of a stable $(\infty,1)$-category $A$:

there is an $(\infty,1)$-functor

$U : (\infty,1)StabCat \to N$

to a stable $(\infty,1)$-category which is universal with the property that it respects colimits and exact sequences in a suitable way. Given any stable $(\infty,1)$-category $A$, its (connective or non-connective, depending on details) algebraic K-theory spectrum is the hom-object

$K(A) \simeq Hom(U(Sp), U(A)) \,,$

where $Sp$ denotes the stable $(\infty,1)$-category of compact spectra. (BGT)

## References

It was in

• Bertrand Toen, Gabriele Vezzosi, A remark on K-theory and $S$-categories (arXiv).

that it was proven that the the Waldhausen S-construction of the K-theory spectrum depends precisely on the simplicial localization of the Waldhausen category, i.e. of the (∞,1)-category that it presents.

In view of this remark 11.4 in

interprets the construction of the K-theory spectrum as a natural operation of stable (∞,1)-categories, as described above.

The universal property of the $(\infty,1)$-categorical definition is studied in

The standard constructions of K-theory spectra from Quillen exact categories are discussed in detail in chapter 1 of

• Eric M. Friedlander, Daniel R. Grayson, Handbook of K-theory, Springer Verlag .

A useful introduction to the definition and computation of K-groups (with a little on K-spectra) is

• Charles Weibel, The K-book: An introduction to algebraic K-theory (web)

Revised on April 9, 2014 07:26:10 by Urs Schreiber (145.116.131.80)


text:
<meta http-equiv="refresh" content="1; url=/nojavascript/"> Corresponding Angles ( Read ) | Geometry | CK-12 Foundation
You are viewing an older version of this Concept. Go to the latest version.

# Corresponding Angles

%
Progress
Practice Corresponding Angles
Progress
%
Corresponding Angles

What if you were presented with two angles that are in the same place with respect to the transversal but on different lines? How would you describe these angles and what could you conclude about their measures? After completing this Concept, you'll be able to answer these questions using your knowledge of corresponding angles.

### Watch This

Watch the portions of this video dealing with corresponding angles.

Watch this video beginning at the 4:50 mark.

### Guidance

Corresponding Angles are two angles that are in the “same place” with respect to the transversal, but on different lines. Imagine sliding the four angles formed with line $l$ down to line $m$ . The angles which match up are corresponding. $\angle 2$ and $\angle 6$ are corresponding angles.

Corresponding Angles Postulate: If two parallel lines are cut by a transversal, then the corresponding angles are congruent.

If $l \ || \ m$ and both are cut by $t$ , then $\angle 1 \cong \angle 5, \ \angle 2 \cong \angle 6, \ \angle 3 \cong \angle 7$ , and $\angle 4 \cong \angle 8$ .

Converse of Corresponding Angles Postulate: If corresponding angles are congruent when two lines are cut by a transversal, then the lines are parallel.

##### Investigation: Corresponding Angles Exploration

You will need: paper, ruler, protractor

1. Place your ruler on the paper. On either side of the ruler, draw lines, 3 inches long. This is the easiest way to ensure that the lines are parallel.
2. Remove the ruler and draw a transversal. Label the eight angles as shown.
3. Using your protractor, measure all of the angles. What do you notice?

In this investigation, you should see that $m \angle 1 = m \angle 4 = m \angle 5 = m \angle 8$ and $m \angle 2 = m \angle 3 = m \angle 6 = m \angle 7$ . $\angle 1 \cong \angle 4, \ \angle 5 \cong \angle 8$ by the Vertical Angles Theorem. By the Corresponding Angles Postulate, we can say $\angle 1 \cong \angle 5$ and therefore $\angle 1 \cong \angle 8$ by the Transitive Property.

##### Investigation: Creating Parallel Lines using Corresponding Angles
1. Draw two intersecting lines. Make sure they are not perpendicular. Label them $l$ and $m$ , and the point of intersection, $A$ , as shown.
2. Create a point, $B$ , on line $m$ , above $A$ .
3. Copy the acute angle at $A$ (the angle to the right of $m$ ) at point $B$ . See Investigation 2-2 in Chapter 2 for the directions on how to copy an angle.
4. Draw the line from the arc intersections to point $B$ .

From this construction, we can see that the lines are parallel.

#### Example A

If $m \angle 8 = 110^\circ$ and $m \angle 4 = 110^\circ$ , then what do we know about lines $l$ and $m$ ?

$\angle 8$ and $\angle 4$ are corresponding angles. Since $m \angle 8 = m \angle 4$ , we can conclude that $l \ || \ m$ .

#### Example B

If $m \angle 2 = 76^\circ$ , what is $m \angle 6$ ?

$\angle 2$ and $\angle 6$ are corresponding angles and $l \ || \ m$ , from the markings in the picture. By the Corresponding Angles Postulate the two angles are equal, so $m \angle 6 = 76^\circ$ .

#### Example C

Using the picture above, list pairs of corresponding angles.

Corresponding Angles: $\angle 3$ and $\angle 7$ , $\angle 1$ and $\angle 5, \ \angle 4$ and $\angle 8$

Watch this video for help with the Examples above.

### Vocabulary

Corresponding Angles are two angles that are in the “same place” with respect to the transversal, but on different lines.

### Guided Practice

Lines $l$ and $m$ are parallel:

1. If $\angle 1=3x+1$ and $\angle 5 = 4x-3$ , solve for x.

2. If $\angle 2=5x+2$ and $\angle 6 = 3x+10$ , solve for x.

3. If $\angle 7=5x+6$ and $\angle 3 = 8x-10$ , solve for x.

1. Since they are corresponding angles and the lines are parallel, they must be congruent. Set the expressions equal to each other and solve for $x$ . $3x+1=4x-3$ so $x=4$ .

2. Since they are corresponding angles and the lines are parallel, they must be congruent. Set the expressions equal to each other and solve for $x$ . $5x+2=3x+10$ so $x=4$ .

3. Since they are corresponding angles and the lines are parallel, they must be congruent. Set the expressions equal to each other and solve for $x$ . $5x+5=8x-10$ so $x=5$ .

### Explore More

1. Determine if the angle pair $\angle 4$ and $\angle 2$ is congruent, supplementary or neither:
2. Give two examples of corresponding angles in the diagram:
3. Find the value of $x$ :
4. Are the lines parallel? Why or why not?

For 6-10, what does the value of $x$ have to be to make the lines parallel?

1. If $m\angle 1 = (6x-5)^\circ$ and $m\angle 5 = (5x+7)^\circ$ .
2. If $m\angle 2 = (3x-4)^\circ$ and $m\angle 6 = (4x-10)^\circ$ .
3. If $m\angle 3 = (7x-5)^\circ$ and $m\angle 7 = (5x+11)^\circ$ .
4. If $m\angle 4 = (5x-5)^\circ$ and $m\angle 8 = (3x+15)^\circ$ .
5. If $m\angle 2 = (2x+4)^\circ$ and $m\angle 6 = (5x-2)^\circ$ .

For questions 11-15, use the picture below.

1. What is the corresponding angle to $\angle 4$ ?
2. What is the corresponding angle to $\angle 1$ ?
3. What is the corresponding angle to $\angle 2$ ?
4. What is the corresponding angle to $\angle 3$ ?
5. Are the two lines parallel? Explain.


text:
# Boosted Decision Trees algorithm

1. Mar 3, 2015

### ChrisVer

I am not sure whether it should be here, or in statistical mathematics or in computers thread...feel free to move it. I am using it here because I am trying to understand the algorithm when it's used in particle physics (e.g. identification of neutral pions in ATLAS).

As I read it:

In general we have a some (correlated) discriminating variables and we want to combine them into one more powerful discriminant. For that we use the Boost Decision Tree (BDT) method.
The method is trained with an input of signal (cluster closest to each $\pi^0$ with some selection of the cluster-pion distance $\Delta R <0.1$) and background samples (the rest).
The training starts by applying a one-dimensional cut on the variable that provides the best discrimination of the signal and background samples.
This is subsequently repeated in both the failed and succeeded sub-samples using the next more powerful variable, until the number of events in a certain subsample has reached a minimum number of objects.
Objects are then classified as signal or background dependent on whether they are in a signal or background-like subsample. The result defines a tree.
The process is repeated weighting wrongly classified candidates higher (boosting them), and it stops when the number of pre-defined trees has been reached. And the output is the likelihood estimator of whether the object is signal or background.

My questions:
Taking a discrimination for the best discriminating variable, the algorithm will check whether some variable cut is satisfied and will lead to YES or NO.
Then to the resulting two boxes, another check is going to be done with some other variable. And so on... However I don't understand how this can stop somewhere and not keep going until all the variables are checked (I don't understand then the: "until the number of events in a certain subsample has reached a minimum number of objects").
A picture of what I am trying to explain is shown below (the weird names are just the names of the variables, S:signal, B:background):

2. Mar 3, 2015

### Staff: Mentor

If you just have 100 events (random number) left in a category, your statistical fluctuations are too large to draw reasonable conclusions. You would just define your cuts based on random fluctuations and the resulting S/(S+B) values would look much better than they really are.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook