text:
# Asymptotically Optimal Bias Reduction for Parametric Models

An important challenge in statistical analysis concerns the control of the finite sample bias of estimators. This problem is magnified in high-dimensional settings where the number of variables p diverges with the sample size n, as well as for nonlinear models and/or models with discrete data. For these complex settings, we propose to use a general simulation-based approach and show that the resulting estimator has a bias of order O(0), hence providing an asymptotically optimal bias reduction. It is based on an initial estimator that can be slightly asymptotically biased, making the approach very generally applicable. This is particularly relevant when classical estimators, such as the maximum likelihood estimator, can only be (numerically) approximated. We show that the iterative bootstrap of Kuk (1995) provides a computationally efficient approach to compute this bias reduced estimator. We illustrate our theoretical results in simulation studies for which we develop new bias reduced estimators for the logistic regression, with and without random effects. These estimators enjoy additional properties such as robustness to data contamination and to the problem of separability.

## Authors

• 11 publications
• 6 publications
• 7 publications
• 7 publications
• ### Phase Transition Unbiased Estimation in High Dimensional Settings

An important challenge in statistical analysis concerns the control of t...
07/25/2019 ∙ by Stéphane Guerrier, et al. ∙ 0

• ### A General Approach for Simulation-based Bias Correction in High Dimensional Settings

An important challenge in statistical analysis lies in controlling the b...
10/26/2020 ∙ by Stéphane Guerrier, et al. ∙ 0

• ### Optimal Bias Correction of the Log-periodogram Estimator of the Fractional Parameter: A Jackknife Approach

We use the jackknife to bias correct the log-periodogram regression (LPR...
03/19/2019 ∙ by Kanchana Nadarajah, et al. ∙ 0

• ### On Data Enriched Logistic Regression

Biomedical researchers usually study the effects of certain exposures on...
11/14/2019 ∙ by Cheng Zheng, et al. ∙ 0

• ### Quantifying and Reducing Bias in Maximum Likelihood Estimation of Structured Anomalies

Anomaly estimation, or the problem of finding a subset of a dataset that...
07/15/2020 ∙ by Uthsav Chitra, et al. ∙ 25

• ### A Global Bias-Correction DC Method for Biased Estimation under Memory Constraint

This paper introduces a global bias-correction divide-and-conquer (GBC-D...
04/16/2019 ∙ by Lu Lin, et al. ∙ 0

• ### Re-evaluation of the comparative effectiveness of bootstrap-based optimism correction methods in the development of multivariable clinical prediction models

Multivariable predictive models are important statistical tools for prov...
03/06/2020 ∙ by Katsuhiro Iba, 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

An important challenge in statistical analysis concerns the control of the finite sample bias of estimators. This problem is typically magnified in models with a large number of variables that are possibly allowed to diverge with the sample size (see for example sur2019modern). Thereby, bias reduction techniques have been widely studied (a review can, for example, be found in kosmidis2014bias). These bias reductions can be achieved by simulation methods such as the jackknife (Efro:82) or the bootstrap (Efro:79), by using analytical approximations to the likelihood function (see for example BrDaRe:07; BrDa:08 and the references therein), or, alternatively, by modifications of the estimating equations, as proposed by Firt:93 and extended for example in KoFi:09; KoFi:11; Kosm:14; Kosm:17. Under appropriate conditions, the resulting bias reductions obtained from these techniques have been shown to achieve (at best) an order of .

The main purpose of this paper is to show the existence of a general method that optimally reduces (in an asymptotic sense) the bias of consistent estimators for parametric models. While the formal developments are presented in the next sections, we provide here an intuitive argument for the method we study. Consider a consistent estimator for , say , that is typically biased in finite samples, and define the bias where . In general, the function

is not available in closed-form but an unbiased estimator, say

, is available via simulation-based techniques (and is formally presented further on). Similarly, we define a simulation-based version of the bias function , as . In this context, an unbiased estimator based on is therefore . The continuity of the function and the consistency of suggest . This approximation can be used to write

 ˇθ =~θ−b∗(θ0,n)≈~θ−b∗(ˇθ,n)=~θ−{ˇθ+b∗(ˇθ,n)−ˇθ}.

Since , satisfies . It is therefore approximately a fixed-point of the function

 T(θ,n)\vcentcolon=~θ−{π∗(θ,n)−θ}. (1)

In this paper, we study the properties of the fixed-point of that we denote by

. While this estimator is not necessarily unbiased, the above heuristic reasoning implies a strong bias reduction ability. Indeed, we demonstrate that

achieves an asymptotically optimal unbiased property. In order to make this statement precise, we first recall that , where and are real-valued function, implies, by definition, that there exist a and a such that , for all . In this paper, we demonstrate, under some mild conditions, that

 ∥∥E[^θ]−θ0∥∥2=O(0), (2)

which means that , for all , or equivalently, that is unbiased for all . In other words, the result provided in (2) is optimal, as no stronger bias reduction result can be obtained using the big notation as a way to quantify the (asymptotic) bias of estimators. As will be explained further on, belongs to the class of indirect inference estimators (see gourieroux1993indirect) and is directly linked with the Iterative Bootstrap (IB) approach put forward in kuk1995asymptotically.

The assumptions needed to achieve (2) are weak enough so that the bias reduction method we propose is valid for a wide range of models and estimators and does not rely on model-based analytical transformations. For example, our framework allows to consider estimators that are discontinuous in (as is commonly the case when considering discrete data models) as well as high-dimensional settings in which

. Moreover, this bias reduction approach does not necessarily come at the price of an inflated variance and a trade off can be sought between efficiency and computational cost. Indeed, the asymptotic variance of

can be made arbitrarily close to the one of by improving the “quality” (number of simulations) of the approximation of . We also show that the IB algorithm provides a computationally efficient method for computing . In addition, we demonstrate that the considered bias reduction method preserves its properties also when is inconsistent as long as the asymptotic bias of the latter has a specific form. The approach is therefore applicable in cases where a consistent estimator may be difficult to obtain but a reasonable approximation is available. These results are in line with the observations made by kuk1995asymptotically

. Indeed, while his primary focus was to construct simulation-based consistent estimators, using the IB, for Generalized Linear Mixed Models (GLMM), he noticed that “

[…] the method proposed can lead to estimates which are nearly unbiased even for the variance components while the standard errors are only slightly inflated

”.

The paper is organized as follows. In Section 2, we present the mathematical setup in which we place our theoretical results. In particular, we present the simulation-based approach and we state and discuss the formal assumptions that are needed to derive the properties of the resulting estimator. These properties are formally stated in Section 3 while the proofs can be found in the appendix. In Section 4, we apply our approach to derive optimally bias reduced estimators for the logistic regression, with and without random intercept, in high-dimensional settings and possibly with data contamination. These estimators are based on the MLE and an estimator that is robust to data contamination and to the problem of separability. The theoretical results presented in Section 3 are in-line with the simulation studies of Section 4.

## 2 Mathematical Setup

Let denote a random sample generated under the model (possibly conditional on a set of fixed covariates), where

is the parameter vector we wish to estimate using the consistent estimator

. In our setting, the dimension of is not fixed and is allowed to diverge together with the sample size . Our discussion throughout this paper considers cases where is “complex” enough in the sense that it has no closed-form solution and its finite sample bias is unknown.

The bias reduction technique we consider is based on the estimator , which is defined as the fixed-point of the function defined in (1). More precisely, can be expressed as follows:

 ^θ\vcentcolon=argzeroθ∈Θθ−T(θ,n)=argzeroθ∈Θ~θ−π∗(θ,n). (3)

The estimator can be seen as a special case of an indirect inference estimator (gourieroux1993indirect) when using for the following approximation

 π∗(θ,n)\vcentcolon=1HH∑h=1~θ∗h,

where is the same estimator as but computed on the simulated sample under model . We use the subscript to identify distinct samples111The random numbers (which are independent of ) used to construct are redrawn with the same seed values. Therefore, when is computed twice on simulated data from the same model , one gets the same value.. Moreover, the IB of kuk1995asymptotically is also directly related to . Indeed, the IB algorithm (sequence) can be generally defined as

 θ(k+1)\vcentcolon=T(θ(k),n), (4)

with . Under appropriate conditions (discussed further on), the fixed-point corresponds to the limit (in ) of (4) and therefore can also be characterized as

 ^θ=limk→∞θ(k).

Therefore, the IB approach can provide a natural and computational efficient algorithm to compute , or more generally, indirect inference estimators (see guerrier2018simulation for more details).

In what follows, we state and discuss the conditions allowing to satisfy the optimal bias reduction property defined in (2). Henceforth, we call the Optimally Bias REduced Estimator (OBREE).

###### Assumption A:

The set is a compact subset of and .

Assumption A is very mild and is typically used in most settings where estimators have no closed-form. Indeed, the compactness of and are common regularity conditions for the consistency and asymptotic normality of the MLE, respectively (see for example newey1994large). Hence, Assumption A may be redundant depending on the requirements already brought by taking

to be consistent (and possibly asymptotic normally distributed).

###### Assumption B:

The bias function exists and is once continuously differentiable in . Moreover, there exists a such that and .

Assumption B is likely to be satisfied in the majority of practical situations. Indeed, the bias function is typically assumed (at least implicitly) to have certain degree of smoothness (see for example kosmidis2014bias). Such property is expected to hold even in situations where the initial estimator may not be continuous (see Assumptions C and D for more details), as it is the case, for example, with discrete data models. Moreover, the second part of Assumption B is very mild. Indeed, many common estimators, including the MLE, can be expanded in decreasing powers of such that . In these cases, this requirement is always satisfied (since in our case ) and may be suitable in high-dimensional settings where . Assumption B is also particularly useful as it allows to decompose the estimator into a non-stochastic component and a random term . Indeed, we can write:

 ~θ=π(θ0,n)+v(θ0,n), (5)

where is a zero-mean random vector. In our next assumptions, which are not required to establish the optimal bias reduction defined in (2), we impose additional restrictions on . These requirements will be used to prove the consistency and the asymptotic normality of .

###### Assumption C:

The variance of exists and is finite for any . Moreover, there exists a such that and .

Assumption C is frequently employed and typically very mild. In the common situation where is -consistent, then we would have and Assumption C would simply require that . In our last assumption, we consider the limiting distribution of (and therefore of ). The latter is used to derive the asymptotic normality of , in order to evaluate, in particular, the potential efficiency loss from to .

###### Assumption D:

For any such that we have

where is nonsingular and continuous in .

While Assumption D is frequently used, it may not necessarily be mild. In low-dimensional settings, this assumption is satisfied for a vast majority of commonly used estimators. However, in high-dimensional settings, the validity of the asymptotic normality of , as expressed in Assumption D, is often unknown for many models. As previously mentioned, this assumption allows to remove the requirements on and of Assumptions A and B provided that .

Finally, our assumption framework is not necessarily the weakest possible in theory and may be further relaxed. However, we do not attempt to pursue the weakest possible conditions to avoid overly technical treatments in establishing the theoretical results presented in the following section.

## 3 Main Results

In this section, we present the main properties of the OBREE under the assumptions presented in Section 2. Our results are valid for all and in high-dimensional settings and, in most cases, are applicable when . Theorem 1 shows that is an optimally bias reduced estimator in the sense of (2).

###### Theorem 1:

Under Assumptions A and B, the estimator satisfies

 ∥∥E[^θ]−θ0∥∥2=O(0).

The proof of Theorem 1 is given in Appendix A. This result uses a technical lemma (also presented in Appendix A) which provides a general strategy for proving that a function is . This result is arguably a major improvement on bias reduction techniques as it provides an optimal asymptotic reduction while not relying on model-based analytical transformations. This approach is, therefore, widely and readily applicable. Interestingly, the result of Theorem 1 is, in some cases, valid in high-dimensional settings where . An equivalent statement of Theorem 1 is that there exists a finite sample size such that for all greater than . In our experience, as illustrated with the simulation studies presented in Section 4, the value seems to be reasonably small as the OBREE does indeed appear to be unbiased with relatively small sample sizes.

In addition, the result of Theorem 1 may still hold in the wider situation where is not consistent. While a thorough investigation is left for further research, a preliminary result can be found in Corollary 1 in Appendix A where is assumed to have a sub-linear asymptotic bias. As it will be illustrated in the simulation studies of Section 4, we find that when the asymptotic bias is “small”, the OBREE appears to preserve its finite sample bias properties. The latter is therefore applicable in cases where a consistent estimator may be difficult to obtain for example for computational (and/or numerical) reasons, but a “close” approximation is available.

The next result concerns the standard statistical properties of the OBREE, namely consistency and asymptotic normality. While, in our framework, these properties are trivially satisfied in low-dimensional settings, obtaining them in high-dimensional settings may be more challenging.

###### Proposition 1:

Under Assumptions A, B and C, the OBREE is such that

 ∥∥^θ−θ0∥∥2=op(1).

Moreover, with the addition of Assumption D, for any such that the OBREE satisfies

 √nsT{(1+1H)Σ(θ0)}−\nicefrac12(^θ−θ0)d−→N(0,1).

The proof of Proposition 1 is given in Appendix B. This result shows that the efficiency of the OBREE (relative to the initial estimator ) can be made arbitrarily close to one by increasing the number of simulations . Therefore, this highlights that a trade-off between efficiency and computational cost can be made. Interestingly, the finite sample variance of the OBREE can be smaller than the one of the initial estimator as, for example, illustrated in the simulation studies presented in Section 4. In low-dimensional settings, Proposition 1 is implied by the results on indirect inference estimators presented, for example, in gourieroux1996simulation.

To compute the OBREE, a computationally efficient approach is the IB algorithm provided in (4). Indeed, Proposition 2 shows that the IB sequence converges (exponentially fast) to the OBREE .

###### Proposition 2:

Under Assumptions A, B and C, the IB sequence satisfies

 ∥∥∥^θ(k)−^θ∥∥∥2=op{exp(−k)}.

The proof of Proposition 2 is given in Appendix C. Proposition 2 shows that the IB algorithm converges to (in norm) at an exponential rate. In our practical experience, the number of iterations necessary to reach a suitable neighbourhood of the solution appears to be relatively small (typically less than 20 iterations).

The results presented in this section can be used in a wide range of practical settings/models, to obtain estimators with optimal finite sample properties. In Section 4 below, we provide the results of simulation studies involving models for binary outcomes, with and without random effect, and with different initial estimators. For one setting, a comparison can be made with an available bias reduced estimator (KoFi:09), and for the others, our results provide new (optimally) bias reduced estimators.

## 4 Application to Binary Response Models

In this section, we apply the methodology developed in Sections 2 and 3 to investigate the performance of the OBREE. First, we consider the logistic regression (NeWe:72; McCuNe:89), for which the MLE is known to be biased. It is one of the most commonly used model for binary responses and several bias reduction methods have been proposed as for example the bias reduced estimator of KoFi:09. To illustrate the flexibility of the OBREE, we choose two different initial estimator , the MLE and a robust estimator. We compare these OBREEs to their initial estimators as well as to the bias reduced estimator proposed by KoFi:09

. Their respective performance is studied when the data is generated at the model but also under slight model misspecification where outliers are randomly created. Then, we extend the logistic regression to include a random intercept, a special case of GLMM

(see for example LeNe:01; McCuSe:01; JiangBook2007), for which there is no closed-form expression for the likelihood function. In this case, the initial estimator is selected to be a numerically simple approximation of the MLE, and its finite sample behaviour is compared to the ones of the MLE computed using several more precise approximation methods.

### 4.1 Bias Reduced Estimators for the Logistic Regression

It is well known that in some quite frequent practical situations, the MLE of the logistic regression is biased and/or its computation can become very unstable, especially when performing some type of resampling scheme for inference. The underlying reasons are diverse, but the main ones are the possibly large ratio, separability (leading to regression slope estimates of infinite value) and data contamination (robustness). The first two sources are often confounded and practical solutions are continuously sought to overcome the difficulty in performing “reasonable” inference. For example, in medical studies, the bias of the MLE together with the problem of separability has led to a rule of thumb called the number of Events Per Variable (EPV), that is the number of occurrences of the least frequent event over the number of covariates, which is used in practice to choose the maximal number of covariates one is “allowed” to use in a logistic regression (see for example AuSt:17 and the references therein). Moreover, the MLE is known to be sensitive to slight model deviations that take the form of outliers in the data, leading to the proposal of several robust estimators for the logistic regression and more generally for Generalized Linear Model (GLM) (see for example CaRo:01b; Cize:08; HeCaCoVF:09 and the references therein).

Despite all the available estimators, to the best of our knowledge, none is able to handle the three potential sources of bias jointly, namely small EPV (high-dimensional settings), separation and data contamination. In this section, we make use of the OBREE, which is built through a simple adaptation of available estimators. Although our choices for the initial estimators may not be the optimal ones for this problem, they nevertheless provide OBREE with advantageous properties. Indeed, they appear to be unbiased and have similar finite sample Mean Squared Error (MSE) as the bias reduced MLE of KoFi:09 in uncontaminated data settings. Additionally, in data contaminated settings, the performance of the OBREE based on the robust initial estimator remains nearly unchanged. Moreover, in the latter case, we adapt the initial (robust) estimator so that it is not affected by the problem of separability, a problem that is more severe in the case of robust estimators (see Rousseeuw2003).

Consider the logistic regression with response and linear predictor , where is an matrix of fixed covariates with rows

. The MLE for is given by

 ~β\vcentcolon=argzeroβ∈IRp1nn∑i=1xi{Yi−μi(β)}, (6)

and can be used as an initial estimator in order to obtain the OBREE, using for example the IB algorithm. When using, as initial estimator, the MLE defined in (6), we denote the resulting estimator as the OBREE-MLE.

We also consider the robust -estimator proposed by CaRo:01b, with general estimating equations (for GLMs) given by

 ψ(β,Yi)\vcentcolon=ψc{r(β,Yi)}w(xi)V−1/2{μi(β)}(∂/∂β)μi(β)−a(β), (7)

with being the Pearson residuals and with consistency correction factor

 a(β)\vcentcolon=1nn∑i=1E[ψc{r(β,Yi)}w(xi)V−1/2{μi(β)}(∂/∂β)μi(β)], (8)

where the expectation is taken over the (conditional) distribution of the responses (given ). For the logistic regression, we have . To avoid a potential problem of separatibility, we follow the suggestion of Rousseeuw2003 and compute the robust initial estimator on the transformed responses, or pseudo-values:

 ˜Yi\vcentcolon=(1−δ)Yi+δ(1−Yi),∀i=1,…,n, (9)

where is a fixed scalar close to zero. Using the pseudo-values leads to an initial (robust) estimator that is not consistent, even if we expect the asymptotic bias to be very small. The finite sample performance of this OBREE is of interest to investigate to what extent, the conditions needed for its bias property to hold, can be enlarged (as hinted in Corollary 1). To compute the initial estimator, we use the implementation of the glmrob function provided in the robustbase package in R (robustbase2018), with in (7

) being the Huber loss function (with default parameter

, see huber1964robust) and , being the th diagonal element of the hat matrix . The resulting estimator, called OBREE-R, is in fact robust in the sense that it has a bounded influence function (Hamp:74). We perform a simulation study to validate the properties of the OBREE-MLE and OBREE-R and compare their finite sample performances to other well established estimators. In particular, as a benchmark, we also compute the MLE, the bias reduced MLE (BR-MLE) using the brglm function (with default parameters) of the brglm package in R (brglm2017), as well as the robust estimator (7) using the glmrob function in R without data transformation (ROB). We consider four situations that can occur with real data, which result from the combinations of balanced outcome classes (Setting I) and unbalanced outcome classes (Setting II) with and without data contamination. We also consider a large model with and choose as to provide EPV of respectively and , which are below the usually recommended value of . The parameter values for the simulations are provided in Table 1.

The covariates were simulated (similarly to CaSu:19) independently from distributions for Setting I and

for Setting II, in order to ensure that the size of the log-odds ratio

does not increase with , so that is not trivially equal to either or

. To contaminate the data, we choose a misclassification error that allows to observe a noticeable effect on the different estimators, which consists in permuting 2% of the responses with corresponding larger (smaller) fitted probabilities (expectations). The simulation results are presented in Figure

1 as boxplots of the finite sample distribution, and in Figure 2 as the bias and Root Mean Squared Error (RMSE) of the different estimators.

The finite sample distributions presented in Figure 1, as well as the summary statistics given by the bias and RMSE presented in Figure 2, allow us to draw the following conclusions that support the theoretical results. In the uncontaminated case, the MLE and the robust estimator ROB are biased (except when the slope parameters are zero), however, the BR-MLE, OBREE-MLE and OBREE-R are all apparently unbiased. The results for the OBREE-MLE are in-line with its theoretical properties (in particular Theorem 1). The OBREE-R appears to enjoy the same properties although its initial estimator has a “small” asymptotic bias (see Corollary 1). This illustrates that our approach is applicable even when a consistent initial estimator is not available or when it is numerically unreliable (as is the case here). Moreover, the variability of all estimators is comparable, except for ROB which makes it rather inefficient in these settings. With 2% of contaminated data (missclassification error), the only estimator whose behaviour remains stable compared to the uncontaminated data setting is the OBREE-R. This is in line with a desirable property of robust estimators, that is stability with or without (slight) data contamination. The behaviour of all estimators remains the same in both settings, that is, whether or not the responses are balanced. Finally, as argued above, a better proposal for a robust, bias reduced and consistent estimator, as an alternative to OBREE-R, could in principle be proposed, but this is left for further research.

### 4.2 Bias Reduced Estimator for the Random Intercept Logistic Regression

An interesting way of extending the logistic regression to account for the dependence structure between the observed responses is to use the GLMM family (see for example LeNe:01; McCuSe:01; JiangBook2007, and the references therein). We consider here a commonly used model in practical settings, namely the random intercept model. The binary response is denoted by , where and . The expected value of the response is expressed as

 μij(β|Ui)\vcentcolon=E[Yij|Ui]=exp(xTijβ+Ui)1+exp(xTijβ+Ui), (10)

where is a -vector of covariates (possibly accounting for a fixed intercept), is a -vector of regression coefficients and the random effect

is a normal random variable with zero mean and (unknown) variance

.

Because the random effects are not observed, the MLE is derived on the marginal likelihood function where the random effects are integrated out. These integrals have no known closed-form solutions, so approximations to the (marginal) likelihood function have been proposed, including the Penalized Quasi-Likelihood (PQL) (see for example BrCl:93), Laplace Approximations (LA) (see for example RaYaYo:00) and adaptive Gauss-Hermite Quadrature (GHQ) (see for example PiCh:06). It is well known that PQL methods lead to biased estimators while LA and GHQ are more accurate (for extensive accounts of methods across software and packages, see for example BOLKER2009127; KiChEm:13). The lme4 R package (BaMaBo:10) uses both the LA and GHQ to compute the likelihood function, while the glmmPQL R function of the MASS library (VeRi:02) uses the PQL.

In this section, we consider a simple approximation of the MLE as initial estimator for the OBREE. For computational efficiency, we choose the estimator defined through penalized iteratively reweighted least squares (P-IRLS) (see for example BaMaBo:10) as implemented in the function glmer function (with argument nAGQ set to 0) of the lme4 R package.

To study the behaviour of the OBREE and compare its performance in terms of bias and variance in finite samples to different approximations of the MLE (LA, GHQ or PQL), we perform a simulation study using the two settings described in Table 2. Both settings can be considered as high-dimensional in the sense that is relatively large with respect to . Moreover, while Setting II (, ) reflects a possibly more frequent situation, Setting I concerns the case where is small (and much smaller than ), a situation frequently encountered in cluster randomised trials (see for example CRT-Huang-2016; CRT-Leyrat-2017, and the references therein). As for the simulation study in Section 4.1 on the logistic regression, the covariates are simulated independently from the distribution .

The finite sample distributions are illustrated in Figure 3. Figure 4 presents the finite sample bias and RMSE of the approximated MLE estimators and the OBREE. It can be observed that the proposed OBREE has a drastically reduced finite sample estimation bias, especially for the random effect variance estimator. Moreover, the OBREE also achieves the lowest RMSE. These simulation results are in-line with the theoretical properties of the OBREE and the simulation-based findings of kuk1995asymptotically. This has important advantages when performing inference in practice, and/or when the parameter estimates, such as the random intercept variance estimate, are used, for example, to evaluate the sample size needed in subsequent randomized trials. The OBREE can eventually be based on another initial estimators in order to further improve efficiency for example, however this study is left for future research.

## Appendix A Proof of Theorem 1

In this appendix, we provide the proof of Theorem 1. We also state and prove Corollary 1 which guarantees the optimal bias reduction property when the asymptotic bias is sub-linear.

Before proving Theorem 1, we introduce a particular asymptotic notation and state a lemma that provides a strategy for proving the optimal bias reduction property. Let and be real-valued functions with being strictly positive for all . We write if and only if :

 ∃n′>0,∃M>0such that∀δ∈N∗,and ∀n≥n′,|f(n)|≤Mδg(n)δ. (11)

Lemma 1 and the following discussion below show how this particular notation is relevant in order to demonstrate Theorem 1.

###### Lemma 1:

Let be a strictly positive real-valued function such that . If , then there exists a such that for all .

###### Proof.

Since , there exists a such that . Without loss of generality we can suppose that the function is decreasing222Indeed, we can define a decreasing step function such that and , for all .. Therefore, for all we have and hence,

 |f(n)|≤Mδg(n)δ−−−→δ→∞0.

In other words, for all which ends the proof. ∎

he condition of Lemma 1, namely , may seem very strong. One may think for example that for all is sufficient. However, the exponential function provides a counter-example. Indeed, since for all , we have that for all , which means that

 ∀δ∈N∗,∃nδ>0,∃Mδ>0such that∀n≥nδ,exp(−n)≤Mδn−δ. (12)

Since for all , for all appears clearly to be not sufficient for reaching the conclusion of Lemma 1. One may attribute this failure to the dependence in in (12) and propose the following stronger condition

 ∃n′>0,∀δ∈N∗,∃Mδ>0such that∀n≥n′|f(n)|≤Mδn−δ. (13)

Once again, the exponential function constitutes a counter-example. Indeed, setting and , we have, for all and all ,

 exp(n)=∞∑k=0nkk!>nδδ!⟹exp(−n)<δ!n−δ,

implying that satisfies (13). However, we still have that for all and thus the conclusion of Lemma 1 cannot be reached. Both of these examples suggest that the stronger condition in (11) is indeed necessary.

###### Proof of Theorem 1.

By definition in (3), we have

 ~θ=π∗(^θ,n).

Using Assumption B, we re-express each side of the above equation as follows:

 ~θ =θ0+b(θ0,n)+v(θ0,n) π∗(^θ,n)=1HH∑h=1~θ∗h =^θ+b(^θ,n)+1HH∑h=1v∗h(^θ,n),

where for all , is a zero-mean random vector. We directly obtain

 0=E[π∗(^θ,n)−~θ]=E[^θ−θ0]+E[b(^θ,n)−b(θ0,n)],

which yields

 E[^θ−θ0]=−E[b(^θ,n)−b(θ0,n)]. (14)

By Assumptions A and B, is a bounded random variable on a compact set and elementwise. We thus have

 E[b(^θ,n)−b(θ0,n)]=O(n−β),

elementwise. Consequently, we deduce from (14) that

 ∥E[^θ−θ0]∥∞=O(n−β). (15)

The main idea is to re-evaluate using the mean value theorem as it allows to demonstrate by induction that, for all ,

Then, few extra steps enables to satisfy Lemma 1 which concludes the proof.

Applying the mean value theorem for vector-valued functions to we have

 b(^θ,n)−b(θ0,n)=B(θ(b),n)(^θ−θ0).

where and corresponds to a set of vectors lying in the segment for (with respect to the function ). By Assumptions A and B, is also a bounded random variable. Moreover, by Assumption B again, elementwise since elementwise and

 b(θ,n)=b(θ0,n)+B(θ(b),n)(θ−θ0),

for all . For simplicity, we denote

 B\vcentcolon=B(θ(b),n),   Δ(b)\vcentcolon=b(^θ,n)−b(θ0,n)   and   Δ\vcentcolon=^θ−θ0,

which implies that . Moreover, a consequence of (15) is that

 E[Δl]=O(n−β),

for any and hence

 ∥E[Δ]∥2=O(p\nicefrac12n−β).

Now, we have

 Δ(b)l=p∑m=1Bl,mΔm≤pmaxmBl,mΔm. (16)

Using Cauchy-Schwarz inequality, we have

 E[|Bl,mΔm|]≤E[B2l,m]\nicefrac12E[Δ2m]\nicefrac12.

Since and are bounded random variables on a compact set, and , so we have

 E[B2l,m]\nicefrac12E[Δ2m]\nicefrac12=O(p−1n−2β).

Therefore, we obtain

 E[|Bl,mΔm|]=O(p−1n−2β),

and hence, using (16) we deduce that

Since , we have

 E[Δl]=O(n−2β),

and consequently,

Since and , one can repeat the same computations and deduce by induction that, for all ,

 ∥E[Δ]∥2=O(p\nicefrac12n−δβ).

In order to show that

 ∥E[Δ]∥2=Oδ∈N∗(p\nicefrac12n−δβ), (17)

which implies , it is sufficient to demonstrate that

 ∥E[Δ]∥∞=Oδ∈N∗(n−δβ). (18)

Since for any , we have and , we obtain that

 ∃nΔ>0,∃MΔ>0such that∀n≥nΔ,E[|Δl|]≤MΔn−β

and

 ∃nB>0,∃MB>0such that∀n≥nB,E[|Bl,m|]≤MΔn−β.

Without loss of generality, we suppose that and . Therefore, setting and , our previous computations implies that, for all and all , we have

 ∥E[Δ]∥∞≤Mδn−δβ.

Hence (18) holds true which ends the proof. ∎

Interestingly, the optimal asymptotic bias reduction property holds true in settings that are (way) more extreme than required by Assumption B, namely . Indeed, according to (17), the optimal asymptotic bias reduction property holds as long as for some , and in particular, even when . However, the condition is used to prove the consistency of thus justifying Assumption B as it is stated for readability purposes.

As previously said, the optimal bias reduction property of can also be achieved when the initial estimator has a sub-linear asymptotic bias, i.e. can be written as follows,

 ~θ=θ0+a(θ0)+b(θ0,n)+v(θ0,n), (19)

where with and . In this case, the rate at which is allowed to grow with is more restrictive.

###### Corollary 1:

Under Assumptions AB and C and assuming that: (i) has the decomposition given in (19); (ii) exists; and (iii) there exists such that ; we have .

Even if the optimal bias reduction can be achieved when the asymptotic bias is large (there are no constraints on the norms of and ), in practice, the sub-linear assumption is more likely to be (nearly) satisfied when the asymptotic bias small as illustrated by our simulation studies (see Section 4).

###### Proof.

Using the same reasoning as in the proof of Theorem 1, equality (14) becomes, in this case,

 E[^θ−θ0]=−(I+A)−1E[b(^θ,n)−b(θ0,n)], (20)

which implies that

 E[^θ−θ0]=O(pn−β), (21)

elementwise. The rest of the argument is similar to the one in the proof of Theorem 1 and leads to

 ∥∥E[^θ−θ0]∥∥2=Oδ∈N∗{(pδ+1δn−β)δ}.

Since , when , the previous equality implies, by the last assumption of Corollary 1, that , which ends the proof by Lemma 1. ∎

## Appendix B Proof of Proposition 1

The proof of Proposition 1 is split into two lemmas. The first concerns the consistency of the OBREE and the second its asymptotic normality.

###### Lemma 2:

Under Assumptions AB and C, the OBREE is such that

 ∥∥^θ−θ0∥∥2=op(1).
###### Proof.

This proof is directly obtained by verifying the conditions of Theorem 2.1 of newey1994large on the functions and defined as follow:

 Q(θ)\vcentcolon=∥∥θ0−θ∥∥2,ˆQ(θ,n)\vcentcolon=∥∥~θ−π∗(θ,n)∥∥2,

where and . Reformulating the requirements of this theorem to our setting, we have to show that (i) is compact, (ii) is continuous, (iii) is uniquely minimized at , (iv) converges uniformly in probability to .

On the one hand, Assumption A ensures that is compact. On the other hand, is trivially continuous and uniquely minimized at . What remains to be shown is that converges uniformly in probability to , which is equivalent to show that: for all and for all , there exists a sample size such that for all

 Pr{supθ∈Θ∣∣ˆQ(θ,n)−Q(θ)∣∣≥ε}≤δ.

Fix and . Using the above definitions, we have that

 supθ∈Θ∣∣ˆQ(θ,n)−Q(θ)∣∣≤supθ∈Θ[∣∣ˆQ(θ,n)−Q(θ,n)∣∣+|Q(θ,n)−Q(θ)|], (22)

where

 Q(θ,n)\vcentcolon=∥∥π(θ0,n)−π(θ,n)∥∥2.

Considering the first term on the right hand side of (22), we have

 ∣∣ˆQ(θ,n)−Q(θ,n)∣∣ ≤∥∥~θ−π∗(θ,n)−π(θ0,n)+π(θ,n)∥∥2 =∥∥v(θ0,n)∥∥2+∥∥1HH∑h=1v∗h(θ,n)∥∥2 =Op(√pn−α)+Op(√pn−αH−\nicefrac12)=Op(√pn−α),

by Assumption C. Similarly, we have


text:
Benchmark (Cold Write): Argument Writing

Work Time

Now you will write an argument. Remember that an argument is a text that provides claims and gives evidence to support them. It also deals with opposing or alternative counterclaims.

• You will be given a set of facts to base your argument upon. Assume that all the facts given are true; develop your argument on the basis of the evidence provided in those facts. Your argument must use the information in these facts to support your claim. Your argument must also acknowledge a counterclaim. Present your reasoning in a clear and logical manner.

You will have 45 minutes to write your argument.

2 of 4

format: plain


text:
Preparing NOJ

Fractal

1000ms 65536K

Description:

Fractals are really cool mathematical objects. They have a lot of interesting roperties, often including:

 fine structure at arbitrarily small scales;

 self-similarity, i.e., magni ed it looks like a copy of itself;

 a simple, recursive de nition.

Approximate fractals are found a lot in nature, for example, in structures such as clouds, snow flakes,mountain ranges, and river networks.

In this problem, we consider fractals generated by the following algorithm: we start with a polyline, i.e., a set of connected line segments. This is what we call a fractal of depth one (see leftmost picture). To obtain a fractal of depth two, we replace each line segment with a scaled and rotated version of the original polyline (see middle picture). By repetitively replacing the line segments with the polyline, we obtain fractals of arbitrary depth and very ne structures arise. The rightmost picture shows a fractal of depth three.

The complexity of an approximate fractal increases quickly as its depth increases. We want to know where we end up after traversing a certain fraction of its length.

Input:

The input starts with a single number c (1 <= c <= 200) on one line, the number of test cases. Then each test case starts with one line with n (3 <= n <= 100), the number of points of the polyline. Then follow n lines with on the ith line two integers xi and yi (􀀀1,000 <= xi; yi <= 1,000), the consecutive points of the polyline. Next follows one line with an integer d (1 <= d <= 10), the depth of the fractal.Finally, there is one line with a floating point number f (0 <= f <= 1), the fraction of the length that is traversed.

The length of each line segment of the polyline is smaller than the distance between the rst point (x1; y1) and the last point (xn; yn) of the polyline. The length of the complete polyline is smaller than twice this distance.

Output:

Per test case, the output contains one line with the coordinate where we end up. Format it as (x,y), with two floating point numbers x and y. The absolute error in both coordinates should be smaller than 10^-6.

Sample Input:

14-2 -20 00 22 230.75

Sample Output:

(0.4267766953,2)

Note:

Info

Provider NOJ

Code NOJ1144

Tags

Submitted 0

Passed 0

AC Rate 0%

Date 04/20/2019 10:03:10

Related

Nothing Yet


text:
# zbMATH — the first resource for mathematics

Alcoves associated to special fibers of local models. (English) Zbl 1047.20037
Let $$G$$ be a classical group over the $$p$$-adic field $$\mathbb{Q}_p$$, and let $$\mu$$ be a dominant minuscule coweight of $$G$$. The special fiber $$M_{\mu,\overline\mathbb{F}_p}$$ of the Rapoport-Zink local model $$M_\mu$$ has a stratification indexed by a finite subset $$\text{Perm}(\mu)$$ of the extended affine Weyl group $$\widetilde W(G)$$ for $$G$$. Let $$W_0$$ denote the finite Weyl group of $$G$$. For each translation $$\lambda$$ in the $$W_0$$-orbit $$W_0(\mu)$$ of $$\mu$$, the element $$t_\lambda$$ in $$\widetilde W(G)$$ is contained in $$\text{Perm}(\mu)$$. Let $$\text{Adm}(\mu)$$ denote the subset of $$\text{Perm}(\mu)$$ indexing those strata which lie in the closure of the stratum indexed by $$t_\lambda$$ for some $$\lambda\in W_0(\mu)$$.
The paper under review is concerned with the equality $$\text{Adm}(\mu)=\text{Perm}(\mu)$$. The main result of the paper is to prove that if the root system for $$G$$ has type $$A_{n-1}$$, then the equality $$\text{Adm}(\mu)=\text{Perm}(\mu)$$ holds for every dominant coweight $$\mu$$. The authors also show that the equality $$\text{Adm}(\mu)=\text{Perm}(\mu)$$ holds if $$\mu$$ is a sum of minuscule coweights for the symplectic group $$G=\text{GSp}_{2n}$$. On the other hand, the authors show that if the root system for $$G$$ is irreducible, of rank $$\geqslant 4$$ and not of type $$A_{n-1}$$, then $$\text{Adm}(\mu)\neq\text{Perm}(\mu)$$ for every sufficiently regular dominant coweight $$\mu$$.

##### MSC:
 20G05 Representation theory for linear algebraic groups 20F55 Reflection and Coxeter groups (group-theoretic aspects) 14G35 Modular and Shimura varieties 11G18 Arithmetic aspects of modular and Shimura varieties 22E35 Analysis on $$p$$-adic Lie groups
Full Text:


text:
## Angular and polarization analysis for two-photon decay of <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>2</mn><mi>s</mi></mrow></math>&

Citation:
Safari, L., P. Amaro, J. P. Santos, and F. Fratini. "Angular and polarization analysis for two-photon decay of <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>2</mn><mi>s</mi></mrow>[/itex]&." Physical Review A 90 (2014): 014502.

### Abstract:

The amplitude of two-photon transitions between hyperfine states in hydrogenlike ions is derived based on the relativistic Dirac equation and second-order perturbation theory. We study angular and linear polarization properties of the photon pair emitted in the decay of $2s$ states, where spin-flip and non-spin-flip transitions are highlighted. We pay particular attention to hydrogenlike uranium, since it is an ideal candidate for investigating relativistic and high-multipole effects, such as spin-flip transitions. Two types of emission patterns are identified: (i) non-spin-flip transitions are found to be characterized by an angular distribution of the type $W($\theta${})$\sim${}1+{cos}^{2}$\theta${}$ while the polarizations of the emitted photons are parallel; and (ii) spin-flip transitions have somewhat smaller decay rates and are found to be characterized by an angular distribution of the type $W($\theta${})$\sim${}1$-${}1/3{cos}^{2}$\theta${}$ while the polarizations of the emitted photons are orthogonal, where \theta${}$ is the angle between photons directions. Deviations due to nondipole and relativistic contributions are evaluated for both types of transitions. This work is the first step toward exploring the effect of the nucleus over the angular and polarization properties of the photon pairs emitted by two-photon transitions.

n/a


text:
# 12. Orangutan SPI Master Functions

This section of the library provides commands for using the AVR’s Serial Peripheral Interface (SPI) module in master mode to communicate with slave SPI devices.

SPI is a synchronous communication protocol where the basic transaction consists of the master pulsing the SPI clock (SCK) line 8 times while bits are simultaneously exchanged between the (selected) slave and the master on the Master-in/Slave-out (MISO) and Master-out/Slave-in (MOSI) lines. There is no way for the master to send a byte without receiving one, and there is no way for the master to receive a byte without sending one.

The functions in this section will automatically configure the MOSI and SCK lines as outputs and the MISO line as an input.

The AVR’s SPI module is designed so that if the SS pin is an input and it reads low (0 V), then the SPI module will automatically go in to slave mode (the MSTR bit in SPCR will become zero) and all SPI transmission functions in this library will return a result of zero. Therefore, it is recommended to make SS an output before doing SPI master communication. If SS is an input, then the SPI initialization routine in this library will enable the pull-up resistor on that line.

The Orangutan LV, Orangutan SV, Baby Orangutan, and 3pi robot are based on the ATmega48/168/328 line of AVR processors, so SS is pin PB2, MOSI is PB3, MISO is PB4, and SCK is PB5.

The Orangutan SVP and Orangutan X2 are based on the AVR ATmega324/644/1284 line of AVR processors, so SS is pin PB4, MOSI is PB5, MISO is PB6, and SCK is PB7. The Orangutan SVP and X2 are both aided by auxiliary microcontrollers that are slave SPI peripherals. The functions in this class are used by the OrangutanSVP (see Section 13) and OrangutanX2 (see Section 15) classes to communicate with these auxiliary microcontrollers.

## Reference

C++ and Arduino methods are shown in red.

C functions are shown in green.

static void OrangutanSPIMaster::init(unsigned char speed_divider, unsigned char options)

void spi_master_init(unsigned char speed_divider, unsigned char options)

Initializes the AVR’s hardware SPI module in master mode. This command makes the MOSI and SCK pins outputs so that the AVR can send data to the slave device. This command makes MISO an input so that the AVR can receive data from the slave device. If SS is an input, this function enables its pull-up resistor so that it is less likely that SS goes low and knocks the SPI module out of master mode (see note above).

The speed_divider parameter specifies the ratio of the AVR’s clock frequency to the SPI frequency. The library defines several keywords of the form SPI_SPEED_DIVIDER_xxx for use as the speed_divider argument. These keywords are shown in the table below:

Valid values for speed_divider
speed_dividerSPI Frequency (assuming 20 MHz clock)
SPI_SPEED_DIVIDER_210 MHz
SPI_SPEED_DIVIDER_45 MHz
SPI_SPEED_DIVIDER_82.5 MHz
SPI_SPEED_DIVIDER_161.25 MHz
SPI_SPEED_DIVIDER_32625 kHz
SPI_SPEED_DIVIDER_64313 kHz
SPI_SPEED_DIVIDER_128156 kHz

The options argument controls three important configuration options for the SPI module. The options argument can be 0 to select all the default options. To over-ride the defaults, the options argument should be a combination of some of the following keywords, combined using the inclusive-or operator “|”.

• SPI_SCK_IDLE_LOW (default): The idle state of SCK will be low; the leading edge will be rising and the trailing edge will be falling.
• SPI_SCK_IDLE_HIGH: The idle state of SCK will be high; the leading edge will be falling and the trailing edge will be rising.
• SPI_MSB_FIRST (default): Bytes will be transmitted/received starting with the most-significant bit first.
• SPI_LSB_FIRST: Bytes will be transmitted/received starting with the least-significant bit first.
• SPI_EDGE_LEADING (default): The AVR will sample data on MISO on the leading edge of SCK.
• SPI_EDGE_TRAILING: The AVR will sample data on MISO on the trailing edge of SCK.

### Example

// Initialize the SPI module in master mode at 20/2 = 10 MHz, sample on the trailing edge,
// LSB first, SCK idle state low.
spi_master_init(SPI_SPEED_DIVIDER_2, SPI_EDGE_TRAILING | SPI_LSB_FIRST);
// C++: OrangutanSPIMaster::init(SPI_SPEED_DIVIDER_2, SPI_EDGE_TRAILING | SPI_LSB_FIRST);

static unsigned char OrangutanSPIMaster::transmit(unsigned char data)

unsigned char spi_master_transmit(unsigned char data)

Transmits the given byte of data to the SPI slave device, and returns the byte that the slave simultaneously sent back.

static unsigned char OrangutanSPIMaster::transmitAndDelay(unsigned char data, unsigned char post_delay_us)

unsigned char spi_master_transmit_and_delay(unsigned char data, unsigned char post_delay_us)

This command is just like spi_master_transmit() except that after the transmission has finished it delays for the specified number of microseconds before returning. This added delay is useful if you are communicating with any slave device that requires some time between SPI transmissions to give it time to process the byte it has received (e.g. the auxiliary processors on the Orangutan X2 and Orangutan SVP). post_delay_us should be a number between 0 and 255.


text:
• ### Popular Now

• 13
• 12
• 9
• 10
• 13

#### Archived

This topic is now archived and is closed to further replies.

# Trails

This topic is 5696 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Now I know trails are a simple thing to fix, just usually clearing a screen, but this is not the standard clear screen issue. I have a tile engine up and running. I just started the NPC movement routines, and I''m getting trails. I don''t redraw the map every frame, because it slows the game down a lot. So it refreshes the map every 7 frames. During those periods that the map isn''t being redrawn, there are trails behind the NPC''s, because, of course, the map isn''t being redrawn every frame. I thought about redrawing a 4x4 box of tiles around the character everytime he moves. Then I thought to just draw the opposite direction you are walking, so it won''t sacrifice as much speed (not very noticable, but I need every frame I can get ). But if another NPC moves in the area that it redraws, then it''ll temporarily disappear. Any suggestions? PS: I am using Allegro 4.0

##### Share on other sites
If you are currently implementing it like this:

for each character clear old sprite draw new sprite

Change it to this way instead:

for each character clear old spritefor each character draw new sprite


text:
# fold -- apply a binary operator repeatedly

## Synopsis

• Usage:
fold(f, x, L)
fold(f, L)
fold(L, x, f)
fold(L, f)
• Inputs:
• f, ,
• x, ,
• L, ,
• Outputs:

## Description

Suppose L=\{x0, x1, ..., xn\}. Then for any binary operator f, fold(f, L) computes f(...f(f(x0, x1), x2), ...). In other words, the binary operator is applied to the first two elements of L, then to that result along with the next unused element of L, and so forth.

 i1 : fold(plus, {0,1,2,3,4,5}) o1 = 15 i2 : fold(identity, {a,b,c,d,e}) o2 = ((((a, b), c), d), e) o2 : Sequence i3 : fold((i,j) -> i|j|i, {"a","b","c","d","e"}) o3 = abacabadabacabaeabacabadabacaba

If fold(f, x, L) is called, the element x is used as the first argument of the binary function f. In other words, fold(f, \{x0, x1, \ldots, xn\}) is equivalent to fold(f, x0, \{x1, \ldots, xn\}).

 i4 : fold(plus, 0, {1,2,3,4,5}) o4 = 15 i5 : fold((x, y) -> x^y, 2, {3,2,1,2}) o5 = 4096

The function fold(\{x_0, x_1, \ldots, x_n\}, f) returns f...f(f(x_{n-2}, f(x_{n-1}, x_n))). That is, f is applied to the last two elements of the list first, then the repeated calls to f proceed backwards through the list. The optional argument x in fold(L, x, f) is used as the second argument in the first evaluation of f. So fold(\{x_0, x_1, \ldots, x_{n-1}\}, x_n, f) is equivalent to fold(\{x_0, x_1, \ldots, x_n\}, f).

 i6 : fold({a,b,c,d,e}, identity) o6 = (a, (b, (c, (d, e)))) o6 : Sequence i7 : fold({a,b,c,d}, e, identity) o7 = (a, (b, (c, (d, e)))) o7 : Sequence i8 : fold({2,3,2,1}, 2, (x, y) -> x^y) o8 = 512

The difference between fold and accumulate is that fold returns the final result of all the nested evaluations of f, while accumulate lists all the intermediate values as well.

 i9 : accumulate({2,3,2,1}, 2, (x, y) -> x^y) o9 = {512, 9, 2, 1} o9 : List

• apply -- apply a function to each element
• accumulate -- apply a binary operator repeatedly
• lists and sequences -- a detailed overview of lists and sequences in Macaulay2

## Ways to use fold :

• "fold(Function,Thing,VisibleList)"
• "fold(Function,VisibleList)"
• "fold(VisibleList,Function)"
• "fold(VisibleList,Thing,Function)"

## For the programmer

The object fold is .


text:
• entries
432
1166
• views
759175

# More Procedural Voxel World Generation

Followers 0

12088 views

EDIT2: Fixed. Thanks, Michael Tanczos.EDIT: Forgive my dumbness, but anyone know how I can get the image attachments to actually appear in the body of the post?

Been awhile. I wanted to follow up on the previous post a little bit, but it's been busy lately; I've been to Mexico for a cruise, and have been spending time back home in Wyoming looking for a job. Time to get out of Arizona, methinks; don't think I can take another summer.

In the last TL;DR post, I talked about using a series of noise functions to generate Minecraftian levels. I got as far as creating the landscape and adding caves. I want to flesh out the system a little bit more, tweak the terrain turbulence function a bit, and I want to demonstrate how the underlying gradient function can be used to generate terrain layers and add features.

I have changed somewhat the method I am using for visualization of the output. Initially, I was using PolyVox to build a mesh from a voxel field, and exporting it as an .OBJ for import into Blender to apply lighting and render. For this post, though, I wrote a script that dumps a voxel field to a mesh file ready to be included in a POVRay scene file instead. The script indexes each voxelt and assigns materials to each block face accordingly. It's a slow process, running as it does in Lua and with no optimizations, but on the whole it has sped up the generation of renders, allowing me to re-render just with the click of a button, rather than the tedious process of importing to Blender as an intermediate step. In order to work with the "new" system, I modified the system to ensure that the output of the final function is in the appropriate range. Specifically, a voxel field maps a module by truncating the output of the module to unsigned integer and casting to 8-bit unsigned char, so the output needs to be in the range of [0,255]. This holds with most Minecraft-type clones, as most will use an unsigned char to denote block types.

For the purposes of this discussion, I am interested only in terrain formation. Placement of vegetation (trees, grass, etc) or mobs is not an aspect of this. Particularly, adding vegetation tends to be an explicit process, performed by analyzing terrain, exposure to the sky, proximity of water, etc... and not an implicit process, able to be expressed as a simple function.

The types of ground I am going to model are: dirt, standard stone, semi-rare stone, rare stone, and bedrock. The ground strata are arranged such that the very bottom layer is bedrock which can not be dug, the very top layer is dirt, and the strata of stone is a conglomerate of stone, semi-rare and rare such that the deeper one goes the higher the likelihood of encountering rare stone. Semi-rare appears at all elevation strata, and can sometimes even be found at the surface, but is more rare than standard stone; rare stone is encountered only at depths just above the bedrock. Bedrock acts as a basement layer, unaffected by turbulence in order to protect it and ensure that no openings into the void are allowed.

I am going to build each piece up modularly, combining the results into a whole. The end goal is a function that will tell me the type of block in a gradient ranging from open, to dirt, to stone, to bedrock, with a distribution of rare and semi-rare stone in between. The trick, when faced with something like this, is to break it down into smaller tasks. In particular, the tasks we need to model are:

1) The distribution of rare stone vs. other types of stone
2) The distribution of semi-rare stone vs. normal stone
3) The distribution of dirt vs. stone
4) The distribution of ground vs. open
5) The distribution of bedrock vs. everything else
6) Re-integration of ground shape and caves as outlined in the previous journal entry

Before we begin knocking out these tasks, let's lay down some ground work. First, we'll set up some constants representing the different block types we can use:

minecraftlevel2={ {name="Open", type="constant", constant=1}, {name="Dirt", type="constant", constant=2}, {name="Stone", type="constant", constant=3}, {name="SemiRare", type="constant", constant=4}, {name="Rare", type="constant", constant=5}, {name="Bedrock", type="constant", constant=6}, {name="Constant1", type="constant", constant=1}, {name="Constant0", type="constant", constant=0},Let's also set up a gradient. We're going to set it up just slightly differently than we did before, taking into account the new system. By default, a voxel field is mapped from a (1x1x1) sized area of the function, starting at a specified point. So we'll set up the gradient to range from 0.5 to 0, and we'll remap the output range of this function to [0,1]:

 {name="MainGradient", type="gradient", y1=0, y2=0.5}, {name="MainGradientRemap", type="scaleoffset", source="MainGradient", scale=0.5, offset=0.5},
The result of this is a gradient function that outputs 0 for any location where Y>0.5, 1 for any location where Y<0, and a gradient scale in between those points. When mapping to a voxel field this means that the top half of the voxel cube will be open, and the bottom half will be ground, and establishes the ground plane for us to work with.

And now, let's first tackle the distribution of semi-rare vs. normal stone, since this is pretty simple.

 {name="SemiRareFBM", type="fractal", fractal_type="FBM", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=4, frequency=2}, {name="SemiRareFBMRemap", type="scaleoffset", source="SemiRareFBM", scale=0.5, offset=0.5}, {name="SemiRareSelect", type="select", main_source="SemiRareFBMRemap", low_source="Stone", high_source="SemiRare", threshold=SEMIRARE_DENSITY, falloff=0},
This little bit just sets up an FBM fractal and uses it to select between either Stone or SemiRare. Due to the remapping function, the output of the fractal is (roughly) in the range [0,1] and the amount of SemiRare stone distributed is adjustable via the SEMIRARE_DENSITY parameter.

Next, let's model the distribution of rare stone. Scattering rare stone is similar to scattering semi-rare, except since rare only occurs at depth we need to modify the distribution FBM fractal by multiplying it with the main gradient. We can throw in a few parameters to help make this process adjustable. Note, of course, that as whenever you are working with fractals, you have to expect some experimentation in the selection of parameter values. Here is the code to set up a distribution for rare stone:

 {name="RareFBM", type="fractal", fractal_type="FBM", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=3, frequency=3}, {name="RareFBMRemap", type="scaleoffset", source="RareFBM", scale=0.5, offset=0.5}, {name="RareFBMScale", type="scaleoffset", source="RareFBMRemap", scale=RARE_GRADIENT_SCALE, offset=0}, {name="RareMult", type="combiner", combiner_type="MULTIPLY", source_0="RareFBMScale", source_1="MainGradientRemap"}, {name="RareMultScale", type="scaleoffset", source="RareMult", scale=RARE_DENSITY, offset=0}, {name="RareSelect", type="select", main_source="RareMultScale", low_source="SemiRareSelect", high_source="Rare", threshold=0.5, falloff=0},
We set up a fractal FBM as with semi-rare, do some finagling of it to remap the output, then multiply it by our main gradient. The output of this we use as a selector to choose between either the stone/semi-rare hybrid function above, or Rare stone. The result looks somewhat like this (image on left is with stone/semi-rare omitted)

As you can see, the deposits of Rare cluster near the bottom of the cube.

The next step is to differentiate stone from dirt and ground from open. We accomplish this by using a chain of selectors:

 {name="DirtStoneSelect", type="select", main_source="MainGradientRemap", low_source="Dirt", high_source="RareSelect", threshold=DIRT_THRESHOLD, falloff=0}, {name="GroundSelect", type="select", main_source="MainGradientRemap", low_source="Open", high_source="DirtStoneSelect", threshold=0.000001, falloff=0},
The final output of this module chain shows us our layers of ground:

Now that we have a function to define ground layers, we can re-integrate ground deformation using a Y-axis turbulence function and a noise source. As described in the previous journal post, the ground shape function is a 3D function that acts as a Y-axis turbulence source, "pushing" each point in the voxel volume either toward or away from the threshold line, having the effect of sort of whipping the surface of the ground into a froth. At low frequencies and low turbulence strength values, this method results in fairly interesting rolling terrain, but as turbulence power is increased (to create taller mountains, for instance), or as the frequency or number of octaves is changed, the terrain can grow increasingly unrealistic and convoluted. This might not always be desirable, so in order to bring this under control I am going to add another module to scale the Y-coordinate component of the input to the GroundShape function by an arbitrary amount. As this amount approaches 0, the function acts more and more like a "conventional" heightmap function, perturbing the ground up and down as an entire column, rather than perturbing each voxel by its own amount.

 {name="GroundShape", type="fractal", fractal_type="FBM", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=4, frequency=2}, {name="GroundYScale", type="scaledomain", source="GroundShape", scaley=GROUND_YSCALE}, {name="GroundTurb", type="turbulence", main_source="GroundSelect", y_axis_source="GroundYScale", y_power=0.5},
This uses just a simple FBM source for turbulence as before, with an adjustable Y-scaling parameter to modify how frothy the ground surface can be. Here is a sequence of images that show how adjusting Y-scale alters the behavior of the turbulence so that it approaches that of a "standard" heightmap.

As you can see, by tweaking the Y-scale you can bring unruly functions somewhat under control. It is even possible, using additional functions and multiple ground shape sources combined via Select or Blend functions, to generate non-homogenous terrain functions that can vary from smoothly rolling plains to wildly convoluted "badlands" terrain with a high turbulence and high Y-scale.

And, of course, we can bring back the caves.

 {name="CaveShape1", type="fractal", fractal_type="RIDGEDMULTI", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=1, frequency=2}, {name="CaveBase1", type="select", main_source="CaveShape1", low_source="Constant0", high_source="Constant1", threshold=1-CAVE_SIZE, falloff=0}, {name="CaveShape2", type="fractal", fractal_type="RIDGEDMULTI", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=1, frequency=2, seed=1323}, {name="CaveBase2", type="select", main_source="CaveShape2", low_source="Constant0", high_source="Constant1", threshold=1-CAVE_SIZE, falloff=0}, {name="CaveMult", type="combiner", combiner_type="MULTIPLY", source_0="CaveBase1", source_1="CaveBase2"}, {name="CaveTurbX", type="fractal", fractal_type="FBM", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=3, frequency=3, seed=1001}, {name="CaveTurbY", type="fractal", fractal_type="FBM", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=3, frequency=3, seed=1201}, {name="CaveTurbZ", type="fractal", fractal_type="FBM", basis_type="GRADIENT", interp_type="QUINTIC", num_octaves=3, frequency=3, seed=1301}, {name="CaveTurb", type="turbulence", main_source="CaveMult", x_axis_source="CaveTurbX", y_axis_source="CaveTurbY", z_axis_source="CaveTurbZ", x_power=0.25, y_power=0.25, z_power=0.25}, {name="CaveInvert", type="scaleoffset", source="CaveTurb", scale=-1, offset=1}, {name="CaveSelect", type="select", main_source="CaveInvert", low_source="Open", high_source="GroundTurb", threshold=0.5, falloff=0},
The final stage is to perform a select using the main gradient in order to add a thin layer of bedrock at the very bottom of the world:

 {name="BedrockSelect", type="select", main_source="MainGradientRemap", low_source="CaveSelect", high_source="Bedrock", threshold=BEDROCK_THRESHOLD, falloff=0},
This ensures that nobody can dig down to the abyss.

Here are a few samples for your perusal:

3
Followers 0

So yeah, my bad.. I screwed up in configuring the software right so attachments weren't working. Hopefully they should work fine for you from here on out. mea culpa
0

Oh, heh heh. Cool, thanks. And ignore my response to your journal entry.
0

## Create an account

Register a new account


text:
Documentation

lteDLPrecode

Description

example

out = lteDLPrecode(in,ntxants,txscheme,codebook) performs precoding according to TS 36.211 [1], Section 6.3.4. The out matrix returned is identical to the matrix returned by ltePDSCH for the same set of parameters. The overall operation of the precoder is the transpose of the matrix defined in the specification. The symbols for layers and antennas lie in columns rather than rows.

This function performs precoding of the matrix of layers, in, onto P antennas, using the transmission scheme specified by txscheme. For transmission scheme precoding dependencies, see Algorithms.

out = lteDLPrecode(enb,chs,in) precodes the matrix of layers, in, according to cell-wide settings enb and channel transmission configurations chs.

Examples

collapse all

Perform downlink precoding using an identity matrix as input.

By precoding an identity matrix, you can gain access to the precoding matrices. Obtain the precoding matrix having codebook index 1 for three layers and four antennas.

out = lteDLPrecode(eye(3),4,'SpatialMux',1).'
out = 4×3 complex

0.2887 + 0.0000i   0.0000 - 0.2887i  -0.2887 + 0.0000i
0.0000 + 0.2887i   0.2887 + 0.0000i   0.0000 + 0.2887i
-0.2887 + 0.0000i   0.0000 - 0.2887i   0.2887 + 0.0000i
0.0000 - 0.2887i   0.2887 + 0.0000i   0.0000 - 0.2887i

Input Arguments

collapse all

Input layers, specified as an NSYM-by-v matrix, consisting of the NSYM modulation symbols for transmission on v layers. Generate this matrix using lteLayerMap.

Data Types: double
Complex Number Support: Yes

Number of antennas, specified as a positive integer.

Data Types: double

PDSCH transmission scheme, specified as one of the following options.

Transmission schemeDescription
'Port0'Single antenna port, port 0
'TxDiversity'Transmit diversity
'CDD'Large delay cyclic delay diversity scheme
'SpatialMux'Closed loop spatial multiplexing
'MultiUser'Multi-user MIMO
'Port5'Single-antenna port, port 5
'Port7-8'Single-antenna port, port 7, when NLayers = 1. Dual layer transmission, ports 7 and 8, when NLayers = 2.
'Port8'Single-antenna port, port 8
'Port7-14'Up to eight layer transmission, ports 7–14

Data Types: char | string

Codebook index to select the precoding matrix, specified as an integer from 0 to 15. This input is ignored for the 'Port0', 'TxDiversity', and 'CDD' transmission schemes. Find the precoding matrix corresponding to a particular codebook index in the TS 36.211 [1], Section 6.3.4. Since codebook is a scalar, the syntax that includes this parameter does not support subband precoding or multiple PMI mode. In the case of 'TxDiversity' and P=1, the function falls back to single port processing.

Data Types: double

eNodeB cell-wide settings, specified as a structure containing these parameter fields:

Parameter FieldRequired or OptionalValuesDescription
When chs.TxScheme is set to 'TxDiversity', 'CDD', 'SpatialMux', or 'MultiUser', these parameters are applicable:
CellRefPRequired

1, 2, 4

Number of cell-specific reference signal (CRS) antenna ports

When chs.TxScheme is set to 'SpatialMux', or 'MultiUser' and chs.PMISet is present, these parameters are applicable:.
NCellIDRequired

Integer from 0 to 503

Physical layer cell identity

NSubframeRequired

0 (default), nonnegative scalar integer

Subframe number

NDLRBRequired

Scalar integer from 6 to 110

Number of downlink resource blocks. (${N}_{\text{RB}}^{\text{DL}}$)

CFIRequired

1, 2, or 3
Scalar or if the CFI varies per subframe, a vector of length 10 (corresponding to a frame).

Control format indicator (CFI) value. In TDD mode, CFI varies per subframe for the RMCs ('R.0', 'R.5', 'R.6', 'R.6-27RB', 'R.12-9RB')

CyclicPrefixOptional

'Normal' (default), 'Extended'

Cyclic prefix length

DuplexModeOptional

'FDD' (default), 'TDD'

Duplexing mode, specified as:

• 'FDD' for Frequency Division Duplex or

• 'TDD' for Time Division Duplex

When DuplexMode is set to 'TDD', these parameters are applicable:
TDDConfigOptional

0, 1 (default), 2, 3, 4, 5, 6

SSCOptional

0 (default), 1, 2, 3, 4, 5, 6, 7, 8, 9

Special subframe configuration (SSC)

Data Types: struct

Channel specific transmission configuration, specified as a structure that can contain the following parameter fields.

Parameter FieldRequired or OptionalValuesDescription
TxSchemeOptional

'Port0' (default), 'TxDiversity', 'CDD', 'SpatialMux', 'MultiUser', 'Port5', 'Port7-8', 'Port8', 'Port7-14'.

PDSCH transmission scheme, specified as one of the following options.

Transmission schemeDescription
'Port0'Single antenna port, port 0
'TxDiversity'Transmit diversity
'CDD'Large delay cyclic delay diversity scheme
'SpatialMux'Closed loop spatial multiplexing
'MultiUser'Multi-user MIMO
'Port5'Single-antenna port, port 5
'Port7-8'Single-antenna port, port 7, when NLayers = 1. Dual layer transmission, ports 7 and 8, when NLayers = 2.
'Port8'Single-antenna port, port 8
'Port7-14'Up to eight layer transmission, ports 7–14

When chs.TxScheme is set to 'SpatialMux' or 'MultiUser', these parameters are applicable, include either Codebookidx or both PMISet and PRBSet:

CodebookidxOptional

Integer from 0 to 15

Codebook index used during precoding

PMISetOptional

Integer vector with element values from 0 to 15.

Precoder matrix indication (PMI) set. It can contain either a single value, corresponding to single PMI mode, or multiple values, corresponding to multiple or subband PMI mode. The number of values depends on CellRefP, transmission layers and TxScheme. For more information about setting PMI parameters, see ltePMIInfo.

PRBSetOptional

Integer column vector or two-column matrix

Zero-based physical resource block (PRB) indices corresponding to the slot wise resource allocations for this PDSCH. PRBSet can be assigned as:

• a column vector, the resource allocation is the same in both slots of the subframe,

• a two-column matrix, this parameter specifies different PRBs for each slot in a subframe,

• a cell array of length 10 (corresponding to a frame, if the allocated physical resource blocks vary across subframes).

PRBSet varies per subframe for the RMCs 'R.25'(TDD), 'R.26'(TDD), 'R.27'(TDD), 'R.43'(FDD), 'R.44', 'R.45', 'R.48', 'R.50', and 'R.51'.

The fields PMISet and PRBSet determine the frequency-domain position that each precoded symbol in out occupies to apply the correct subband precoder when multiple PMI mode is being used. Alternatively, you can provide CodebookIdx field. CodebookIdx is a scalar specifying the codebook index to use across the entire bandwidth. Therefore, the CodebookIdx field does not support subband precoding. TS 36.213 [2], Section 7.2.4 specifies the relationship between PMI values and codebook indices.

Data Types: struct

Output Arguments

collapse all

Precoded downlink output, returned as an NSYM-by-P matrix. NSYM is the number of symbols per antenna, and P is the number of transmission antennas. The symbols for layers and antennas lie in columns rather than rows.

Data Types: double
Complex Number Support: Yes

Algorithms

For transmission schemes 'CDD', 'SpatialMux', and 'MultiUser', and degenerately 'Port0',

• Precoding involves multiplying a P-by-v precoding matrix, denoted as F, by a v-by-NSYM matrix, representing NSYM symbols on each of v transmission layers, to yield a P-by-NSYM matrix, consisting of NSYM precoded symbols on each of P antenna ports. Depending on the transmission scheme, the precoding matrix can be composed of multiple matrices multiplied together, but the size of the product, F, is always P-by-v.

For the 'TxDiversity' transmission scheme,

• A P2-by-2v precoding matrix, F, is multiplied by a 2v-by-NSYM matrix, formed by splitting the real and imaginary components of a v-by-NSYM matrix of symbols on layers, to yield a P2-by-NSYM matrix of precoded symbols, which is then reshaped into a P-by-PNSYM matrix for transmission. As v = P for the 'TxDiversity' transmission scheme, we can consider F be of size P2-by-2P rather than P2-by-2v.

For the other cases, specifically 'CDD', 'SpatialMux', and 'MultiUser' transmission schemes with vP, and the 'TxDiversity' transmission scheme with P = 4,

• The precoding matrix F is not square; it is rectangular with size P-by-v except for the 'TxDiversity' transmission scheme with P = 4 where it is of size P2-by-(2P= 16)-by-8. The number of rows is always greater than the number of columns that is, the matrix F is size m-by-n with m-by-n.

References

[1] 3GPP TS 36.211. “Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Channels and Modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.

[2] 3GPP TS 36.213. “Evolved Universal Terrestrial Radio Access (E-UTRA); Physical layer procedures.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.


text:
#### Subtracting decimals

When subtracting decimal numbers, arrange the numbers so that the place value parts and the decimal points line up.

H T O   tenths hundredths thousandths − 5 8 4 . 7 5 6 1 3 2 . 3 2 4 4 5 2 . 4 3 2

Some subtractions require regrouping.

 $$^4 5\hspace{-3mm}\color{red}/$$ $$^1 4$$ 6 . $$^6 7\hspace{-3mm}\color{red}/$$ $$^1 5$$ 9 − 2 8 0 . 2 8 7 = 2 6 6 . 4 7 2

When there are different numbers of digits after the decimal point, such as in the example below, it is possible to become confused about what we should do with the space that is created by these 'ragged' decimals.

H T O   tenths hundredths 3 7 8 . 5 2 5 3 . 2 8

Placing a zero to even up the lengths of the numbers doesn't alter the value of the number; it simply says that there are 'no hundredths'.

 3 7 8 . $$^4 5\hspace{-3mm}\color{red}/$$ $$^1 0$$ – 2 5 3 . 2 8 = 1 2 5 . 2 2


text:
The current GATK version is 3.2-2

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Bug Bulletin: The GenomeLocPArser error in SplitNCigarReads has been fixed; if you encounter it, use the latest nightly build.

How should I interpret Phred-scaled Quality Scores?

edited June 5 in FAQs

You may have noticed that a lot of the scores that are output by the GATK are in Phred scale. The Phred scale was originally used to represent base quality scores emitted by the Phred program in the early days of the Human Genome Project (see this Wikipedia article for more historical background). Now they are widely used to represent probabilities and confidence scores in other contexts of genome science.

Phred scale in context

In the context of sequencing, Phred-scaled quality scores are used to represent how confident we are in the assignment of each base call by the sequencer.

In the context of variant calling, Phred-scaled quality scores can be used to represent many types of probabilities. The most commonly used in GATK is the QUAL score, or variant quality score. It is used in much the same way as the base quality score: the variant quality score is a Phred-scaled estimate of how confident we are that the variant caller correctly identified that a given genome position displays variation in at least one sample.

Phred scale in practice

In today’s sequencing output, by convention, Phred-scaled base quality scores range from 2 to 63. However, Phred-scaled quality scores in general can range anywhere from 0 to infinity. A higher score indicates a higher probability that a particular decision is correct, while conversely, a lower score indicates a higher probability that the decision is incorrect.

The Phred quality score (Q) is logarithmically related to the error probability (E).

$$Q = -10 \log E$$

So we can interpret this score as an estimate of error, where the error is e.g. the probability that the base is called incorrectly by the sequencer, but we can also interpret it as an estimate of accuracy, where the accuracy is e.g. the probability that the base was identified correctly by the sequencer. Depending on how we decide to express it, we can make the following calculations:

If we want the probability of error (E), we take:

$$E = 10 ^{-\left(\frac{Q}{10}\right)}$$

And conversely, if we want to express this as the estimate of accuracy (A), we simply take

$$\begin{eqnarray} A &=& 1 - E \nonumber \ &=& 1 - 10 ^{-\left(\frac{Q}{10}\right)} \nonumber \ \end{eqnarray}$$

Here is a table of how to interpret a range of Phred Quality Scores. It is largely adapted from the Wikipedia page for Phred Quality Score.

For many purposes, a Phred Score of 20 or above is acceptable, because this means that whatever it qualifies is 99% accurate, with a 1% chance of error.

Phred Quality Score Error Accuracy (1 - Error)
10 1/10 = 10% 90%
20 1/100 = 1% 99%
30 1/1000 = 0.1% 99.9%
40 1/10000 = 0.01% 99.99%
50 1/100000 = 0.001% 99.999%
60 1/1000000 = 0.0001% 99.9999%

And finally, here is a graphical representation of the Phred scores showing their relationship to accuracy and error probabilities.

The red line shows the error, and the blue line shows the accuracy. Of course, as error decreases, accuracy increases symmetrically.

Note: You can see that below Q20 (which is how we usually refer to a Phred score of 20), the curve is really steep, meaning that as the Phred score decreases, you lose confidence very rapidly. In contrast, above Q20, both of the graphs level out. This is why Q20 is a good cutoff score for many basic purposes.

Post edited by Sheila on
Tagged:


text:
I wish I had discovered this user forum before I bought our MDX. Oh well, another example of how there are enthusiasts everywhere. This one is just for Acura MDX owners. There is a similar one for Honda Pilot owners. Here are some good things to know:
* ACURA MDX . ORG - Wireless Headphones. How to use the two that came with the car.
* "Honda Acura World":http://www.hondacuraworld.com/. The place for aftermarket stuff. You can get wireless headphones for $43 vs.$125 at the dealer. Other good stuff here too.

## 15 Replies to “Acura MDX Club”

1. hua yang says:

I have an Acura MDX 2001 with a navigation system and I have found that during the winter when the temp. are 20 or below the navigation does not work. Also, the navigation displays a message that says “Data base is old, please consult your dealer”. I want to know if anyone with a navigation have had this same problem. Please respond back to me because it’s driving me crazy.
Thanks,
Yang

2. Hua, I don’t have an MDX that old, but I know that the DVDs do get out of date. There is an annual update that you can take for this.
As for the temperature failure, I had not heard about this. Doesn’t get that cold around here fortunately!

3. David Gaines says:

I would like to avoid using the MDX designed rack; their fixed position, as well as the fact that they go from side to side across the car instead of up the sides make them really useless to me.
Anyone know where to get rails for a roof rack that would fit similar to the rails that sit on the Honda Pilot? I’ve already measured the Pilot rack but the holes in the fasteners don’t line up to the MDX roof studs.
thanx for any suggestions

4. The best I’ve seen is to take a really Thule rack and its feet and just put it across. Or Yakima for that matter. They are less aero than the Acura racks, but work well.
Check out Rackwarehouse.com as they have really good prices and also special feet that let you mount to the rails on an Acura.

5. daniel says:

I am interested in buying ONLY a hybrid SUV. At this point I believe my only options are the 2005 Ford Escape, the 2005 Toyota Highlander, or the 2005 Lexus 400h. DO any of you know if Acura is going to have a hybrid version of the MDX?

6. Vic Marco says:

I have a 2001 MDX that has a odd way of shifting from 2nd to 3rd. If you accelerate lightly it it chatters going into 3rd you can also clasify it as a vibration. If you increase acceleration it stops vibrateing and completes the shift smoothly Has anyone run into this glitch? Aside from that it runs great

7. Hmmm. Our MDX doesn’t have this problem. Shifts quite smoothly, so you might want to take it in.
The only real problem we’ve had so far is the left tailight bulb went out after 2,000 miles. Pretty fast. Haven’t had it replaced yet.

8. Kudos for only wanting a hybrid SUV. I kind of would like to buy *just* hybrids from now on.
No, the list you have is the list that I just read in Road & Track. Rumble I heard somewhere is that Toyota is way ahead on Hybrid technology.
I do believe GM is going to hybrid stuff into their monster trucks, but haven’t heard about the MDX.

9. Eric says:

Has anyone seen or posted the new 2005 MDX or the 2006 redesigned MDX pictures anywhere on the net? I am deciding on whether to wait for the redesign?

10. I haven’t, but would love to see it. Connie loves here 2004 MDX and be interesting to see how they improve it.

11. Mark says:

I just purchased a 2004 MDX and love it so far. The only annoying feature is the seat belt warning chime. I understand that there is a way to disable the chime while leaving the dash light warning on. HELP.
Mark

12. Wil says:

I would like to install a rear parking aid device on my 01 MDX. Can someone tell me where I can purchase the unit?

13. 2005 Acura MDX
Instead of dilution, Acura has been able to stay focused on its one offering and make sure it’s as good as it can be. The MDX is meticulously engineered to serve a specific purpose, much like a good set of…

14. 2005 Acura MDX
Instead of dilution, Acura has been able to stay focused on its one offering and make sure it’s as good as it can be. The MDX is meticulously engineered to serve a specific purpose, much like a good set of…

15. I can’t wait to see the 2006 MDX.. it’s on it’s way.

Comments are closed.


text:
Parsing A Fasta File By Columns
2
2
Entering edit mode
10.5 years ago
RossCampbell ▴ 140

I'm trying to generate a position-weight matrix (PWM) from a Fasta file of aligned sequences. In order to do this, I need to count the occurence of a specific base at each position in the alignment. For example, given the following alignment:

ATGG
TTGG
ATTG
CTTG

I would need to somehow observe the fact that, in the first column, there are 2 A's, 1 T, and 1 C; and repeat this for every position (column) in the file. At the moment, I'm inclined to read each line, base by base, into a multidimensional array, and parse it by position. However, that seems like it could get computationally demanding if we get large sequences. Has anyone come across this before and come up with a more streamlined approach? I'm coding it in Perl, but if you have something useful in another language, I'll take it.

perl • 3.8k views
8
Entering edit mode
10.5 years ago
Leszek 4.2k

Give python a try:

from Bio import SeqIO
# get parser
parser   = SeqIO.parse( open("fasta_file_name"),'fasta' )
# get dictionary of sequences
seqDict = SeqIO.to_dict( parser )
# get seq into list
seqs = [ str(s.seq) for s in seqDict.itervalues() ]
#assume sequence are the same length
for i in range( len(seqs[0]) ):
nucleotides = [ seq[i] for seq in seqs ]
#do whatever you want

1
Entering edit mode
10.5 years ago
Weronika ▴ 300

Or if you wanted to avoid having all the sequences in memory at once (if your file is very large) - another python option that processes the file sequence by sequence and adds up the base frequencies:

from Bio import SeqIO

# first just get the first sequence, and set up a list of base:count dictionaries based on its length
with open("fasta_file_name") as FILE:
parser = SeqIO.parse(FILE, 'fasta' )
seq1 = parser.next()
base_counts = [{'A': 0, 'C': 0, 'T': 0, 'G': 0} for _ in str(seq1.seq)]

# now reopen the file and iterate over all sequences, incrementing the base counts as needed
with open("fasta_file_name") as FILE:
for seq in SeqIO.parse(FILE, 'fasta' ):
for position,base in enumerate(str(seq.seq.upper())):
base_counts[position][base] += 1

In the end you'll have a list of base-count dictionaries per position, like this:

>>> base_dict[0]
{'A': 1, 'C': 4, 'T': 2, 'G': 3}
>>> base_dict[1]
{'A': 1, 'C': 0, 'T': 0, 'G': 9}


text:
# what is the form of a normal, semi-finite weight on a separable Hilbert space

A weight on a von neumann algebra is said to be normal if it can be written as a sum of normal positive functionals. The indexing set need not be countable. My question is : If the von neumann algebra is acting on a separable Hilbert space, can we choose the indexing set to be countable?

-


text:
Conceptual design of an experiment to study dust destruction by astrophysical shock waves

• 摘要
• 论文信息
• 参考文献
• 被引情况
• PDF全文

Abstract

A novel laboratory experimental design is described that will investigate the processing of dust grains in astrophysical shocks. Dust is a ubiquitous ingredient in the interstellar medium (ISM) of galaxies; however, its evolutionary cycle is still poorly understood. Especially shrouded in mystery is the efficiency of grain destruction by astrophysical shocks generated by expanding supernova remnants. While the evolution of these remnants is fairly well understood, the grain destruction efficiency in these shocks is largely unknown. The experiments described herein will fill this knowledge gap by studying the dust destruction efficiencies for shock velocities in the range $｛\sim｝10｛-｝30~\text｛km｝/\text｛s｝$ ($\unicode[STIX]｛x03BC｝\text｛m｝/\text｛ns｝$), at which most of the grain destruction and processing in the ISM takes place. The experiments focus on the study of grain–grain collisions by accelerating small ($｛\sim｝1~\unicode[STIX]｛x03BC｝\text｛m｝$) dust particles into a large ($｛\sim｝5｛-｝10~\unicode[STIX]｛x03BC｝\text｛m｝$ diameter) population; this simulates the astrophysical system well in that the more numerous, small grains impact and collide with the large population. Facilities that combine the versatility of high-power optical lasers with the diagnostic capabilities of X-ray free-electron lasers, e.g., the Matter in Extreme Conditions instrument at the SLAC National Accelerator Laboratory, provide an ideal laboratory environment to create and diagnose dust destruction by astrophysically relevant shocks at the micron scale.

M.?J.-E. Manuel：General Atomics, 3550 General Atomics Court, San Diego, CA 92121, USA
T. Temim：Space Telescope Science Institute, 3700 San Martin Drive, Baltimore, MD 21218, USA
E. Dwek：Observational Cosmology Lab, Code 665, NASA Goddard Space Flight Center, Greenbelt, MD 20771, USA
A.?M. Angulo：Climate and Space Science and Engineering, University of Michigan, Ann Arbor, MI 48109, USA
P.?X. Belancourt：Climate and Space Science and Engineering, University of Michigan, Ann Arbor, MI 48109, USA
R.?P. Drake：Climate and Space Science and Engineering, University of Michigan, Ann Arbor, MI 48109, USA
C. C. Kuranz：Climate and Space Science and Engineering, University of Michigan, Ann Arbor, MI 48109, USA
M. J. MacDonald：Department of Physics, University of California, Berkeley, CA 94720, USA
B. A. Remington：Lawrence Livermore National Laboratory, Livermore, CA 94450, USA

【1】M. G.Hauser?and E.Dwek, 249 (2001).

【2】C. L.Bennett,D.Larson,J. L.Weiland,N.Jarosik,G.Hinshaw,N.Odegard,K. M.Smith,R. S.Hill,B.Gold,M.Halpern,E.Komatsu,M. R.Nolta,L.Page,D. N.Spergel,E.Wollack,J.Dunkley,A.Kogut,M.Limon,S. S.Meyer,G. S.Tucker,?and E. L.Wright, 20 (2013).

【3】E.Dwek?and I.Cherchneff, 63 (2011).

【4】T.Temim,E.Dwek,K.Tchernyshyov,M. L.Boyer,M.Meixner,C.Gall,?and J.Roman-Duval, 158 (2015).

【5】K. J.Borkowski?and E.Dwek, 254 (1995).

【6】J. F.Hansen,W.van Breugel,E. M.Bringa,B.Eberly,G. A.Graham,B. A.Remington,E. A.Taylor,?and A. G. G. M.Tielens, P05010 (2011).

【7】J. T.Larsen?and S. M.Lane, 179 (1994).10.1016/0022-4073(94)90078-7

【8】L.Serra Diaz-Cano?and A. P.Jones, 127 (2008).

【9】B.Nagler,B.Arnold,G.Bouchard,R. F.Boyce,R. M.Boyce,A.Callen,M.Campell,R.Curiel,E.Galtier,J.Garofoli,E.Granados,J.Hastings,G.Hays,P.Heimann,R. W.Lee,D.Milathianaki,L.Plummer,A.Schropp,A.Wallace,M.Welch,W.White,Z.Xing,J.Yin,J.Young,U.Zastrau,?and H. J.Lee, 520 (2015).

【10】U.Zastrau,A.Woldegeorgis,E.F?rster,R.Loetzsch,H.Marschner,?and I.Uschmann, P10006 (2013).

【11】S. H.Glenzer?and R.Redmer, 1625 (2009).

M.?J.-E. Manuel, T. Temim, E. Dwek, A.?M. Angulo, P.?X. Belancourt, R.?P. Drake, C. C. Kuranz, M. J. MacDonald, and B. A. Remington, "Conceptual design of an experiment to study dust destruction by astrophysical shock waves," High Power Laser Science and Engineering 6(3), e39 (2018)


text:
# Tag Archives: prinicipal ideal

## Fun with principal ideal domains

A commutative ring $R$ is called a principal ideal domain (PID) if every ideal of $R$ can be generated by a single element. If $R$ is a principal ideal domain, is every subring of $R$ a principal ideal domain? No, definitely not. That is because you can take any integral domain that is not a […]


text:
GR 8677927796770177 | # Login | Register

GR9277 #44
Problem
 GREPhysics.NET Official Solution Alternate Solutions
\prob{44}
A particle of mass m on the Earth's surface is confined to move on the parabolic curve $y=ax^2$, where y is up. Which of the following is a Lagrangian for the particle?

1. $L=\frac{1}{2}m\ddot{y}^2\left(1+\frac{1}{4ay}\right)-mgy$
2. $L=\frac{1}{2}m\dot{y}^2\left(1-\frac{1}{4ay}\right)-mgy$
3. $L=\frac{1}{2}m\dot{x}^2\left(1+\frac{1}{4ax}\right)-mgx$
4. $L=\frac{1}{2}m\dot{x}^2\left(1+4a^2x^2\right)+mgx$
5. $L=\frac{1}{2}m\dot{x}^2+\frac{1}{2}m\dot{y}^2+mgy$

Mechanics$\Rightarrow$}Lagrangians

The kinetic energy, in general, is given by $T=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)$. The potential energy is just $V=mgy$. The Lagrangian is given by $L=T-V=\frac{1}{2}m(\dot{x}^2+\dot{y}^2)-mgy$.

Now, given the constraint $y=ax^2$, one can differentiate it and plug it into the Lagrangian above to reexpress the Lagrangian in terms of just y, for example.

Differentiating, one has $\frac{d}{dt}(y=ax^2) \Rightarrow \dot{y}=a2x\dot{x} \Rightarrow \dot{x}=\dot{y}/(2ax)$. Square that to get $\dot{x}^2=\frac{\dot{y}^2}{4a^2x^2}=\frac{\dot{y}^2}{4ay}$, where one replaces the $x^2$ through the given relation $y=ax^2$.

Plug that back into the Lagrangian above to get exactly choice (A).

Alternate Solutions
 rrfan2011-11-06 12:45:34 The Lagrangian is $L=T-V$, where $T=\frac{1}{2}(\dot{x}^2+\dot{y}^2)$ and $V=-mgy$. Only choices (A) and (B) contain $-mgy$. Of these two, only (A) is possible because $T$ must be greater than or equal to $\frac{1}{2}\dot{y}^2$.Reply to this comment
rrfan
2011-11-06 12:45:34
The Lagrangian is $L=T-V$, where $T=\frac{1}{2}(\dot{x}^2+\dot{y}^2)$ and $V=-mgy$. Only choices (A) and (B) contain $-mgy$. Of these two, only (A) is possible because $T$ must be greater than or equal to $\frac{1}{2}\dot{y}^2$.
 RusFortunat2015-10-22 16:32:57 $V=mgy$
Quark
2011-10-26 15:17:39
This is probably a silly question but, why would one be wrong in choosing choice (E)? I actually picked the right answer (A) on the test but glancing over it again, (E) is also correct in the most general form. Is it not explicit enough? lol
 rrfan2011-11-06 13:14:00 the +mgy is wrong.
 livieratos2011-11-08 14:41:41 also if i remember correctly, since the two coordinates of each other the Lagrangian has to be dependent only on one of them and on its time derivative, not both... but i could be wrong. guess i should read lagrange and hamilton again :P
$null 2009-10-28 16:39:52 Reposted to $typo$ section...(with sexy LaTeX) There is a typo in Answer A, it should be $\dot{y}^2$, not $\ddot{y}^2$ tan 2009-10-14 23:52:17 There is a typo in Answer A, it should be y dot, not y double dot. mdornfe1 2008-11-06 16:58:28 This can be done by noticing that potential energy has to be -mgy. A and B are only answers with this property. Second the kinetic energy must always be positive 1-(4ay)^-1 is not always positive. So choice A is the answer.  his dudeness2010-09-04 13:42:09 well done, brah  TeamGandalf2011-04-01 18:12:40 The Lagrangian is equal to T-V. Why doesn't the negative from the Potential cancel the negative in the equation? Why isn't it L = T - (-mgy)= T + mgy?  Quark2011-10-26 15:20:37 @TeamGandalf The lagrangian is L = T - U. You can't have a negative potential energy... U=mgy not (-mgy). Poop Loops 2008-10-12 00:45:40 So what happens when y = 0, as it inevitably will when the particle comes back down?  segfault2009-09-04 12:14:26 (I realize I'm replying to a 1 year old post--this is for the general public). When y->0, the $1+\frac{1}{4ay}$ term will blow up but $\dot{y}=2ax\dot{x}$ will be zero, so L won't blow up. Perhaps if L was written in terms of $x$ it would have a nicer form... etano 2007-06-16 14:12:37 There is a typo in Answer A, it should be y dot, not y double dot. Post A Comment!  Username: Password: Click here to register. This comment is best classified as a: (mouseover) Mouseover the respective type above for an explanation of each type. ## Bare Basic LaTeX Rosetta Stone LaTeX syntax supported through dollar sign wrappers$, ex., $\alpha^2_0$ produces $\alpha^2_0$.
type this... to get...
$\int_0^\infty$ $\int_0^\infty$
$\partial$ $\partial$
$\Rightarrow$ $\Rightarrow$
$\ddot{x},\dot{x}$ $\ddot{x},\dot{x}$
$\sqrt{z}$ $\sqrt{z}$
$\langle my \rangle$ $\langle my \rangle$
$\left( abacadabra \right)_{me}$ $\left( abacadabra \right)_{me}$
$\vec{E}$ $\vec{E}$
$\frac{a}{b}$ $\frac{a}{b}$

The Sidebar Chatbox...
Scroll to see it, or resize your browser to ignore it...


text:
# Chemical Analysis

A insecticide is known to contain C, H and Cl. Reactions were carried out on a 1.000 gram sample of the compound that converted all of its chlorine to chloride ion dissolved in water. The aqueous solution was subsequentely treated with an excess of AgNo3 solution and the AgCl precipitated was collected and wieghed. Its mass was 2.022 grams of AgCl. How many moles of Cl were in the AgCl sample?How many grams of Cl were in the AgCl sample?

Cl- + AgNO3 ----> AgCl + NO3- mass of AgCl = 2.022gm so moles =...
Related Questions in Linear Programming
• Stoichiometry and Gravimetric Analysis March 08, 2011

How many grams of Na2CO3 are present in the 15 ml sample?

• chemistry question (Solved) February 23, 2011

chlorine reacts with benzene to produce chlorobenzene and hydrogen chloride, cl 2+ c 6 h 6--> c 6 h 5 cl +hcl. Determinethe limiting reactant if 45.0g of benzene reacts with 45.0g of...

Solution Preview :
$$Cl_2+C_6H_6 \longrightarrow C_6H_5Cl+HCl$$ We see that1 mole of Benzene reacts with 1 mole of Chlorine. Mass of 1 mole of Chlorine = 35.5*2 = 71 grams Mass of 1 mole of Benzene = 12*6 +...
• Mass Percent (Solved) February 08, 2011

A mixture of Na Cl and sucrose ( C 12 H 22O11) of combined mass 10.2g is dissolved in enough water to make up a 250mL solution. The osmotic pressure of the solution is 7.32 atm at 28...

Solution Preview :
The solutions are following, to be calculte the mass percent of NaCl in the solution. P = (c_NaCl*2 + c_sucrose) *R*T The reason for the two is that NaCl completely dissolves into 2 ions in...
• Chemistry questions November 22, 2010

unconsumed at the end of the combustion? How many grams remain? 6. A titanium ore contains rutile(TiO2) plus other compounds . When its heated with carbon in the presence of chlorine,...

• titration and molarity March 01, 2011

Copy and paste your question here...

Attach Files

3.5 5