text:
# Talk:Generalized linear model

Jump to: navigation, search
WikiProject Statistics (Rated C-class, Top-importance)

This article is within the scope of the WikiProject Statistics, a collaborative effort to improve the coverage of statistics on Wikipedia. If you would like to participate, please visit the project page or join the discussion.

C  This article has been rated as C-Class on the quality scale.
Top  This article has been rated as Top-importance on the importance scale.

This text should be read with care, because of the errors, in the text and formulas.

## Cleanup

There are no errors here, but this article needs to be cleaned up and fleshed out a bit. I will try to work on it soon... --shaile 00:33, 14 April 2006 (UTC)

I don't like: "In statistics the generalized linear model (GLM) generalizes the ordinary least squares regression." Surely OLS is an estimation method, not a model? In my view, it should say "In statistics the generalized linear model (GLM) generalizes the linear model." Blaise 21:45, 23 September 2006 (UTC)
You better believe OLS implies a model. Granted, a model that most would agree is wrong for their data, but some models are useful, so we use them. I'd suggest merging those two, they cover the exact same subject. Pdbailey 13:39, 26 September 2006 (UTC)
I agree with Blaise, though I must say the one he suggests does sound a bit like a tautology. Wherami (talk) 17:03, 30 September 2011 (UTC)
I modified the sentence. As it turns out linear regression and least squares do not necessarily go together. Wherami (talk) 17:26, 30 September 2011 (UTC)

The second sentence of the introduction is terribly muddled. It should be clarified. I would do so, but I am currently struggling to understand this subject, so I shan't try just yet. Thomas Tvileren 08:44, 15 October 2007 (UTC)

## proposed changes

The edit I made (that was rved) did trim the overall size of the page and reduce the number of examples, but as it stands it is very difficult to understand what a GLM is. The basic question is what is a glm? After we have said that, we need to say why you might want to use one and then I think we should get a little into how parameters are estimated. I'm going to rv it back and expand substantially on what I wrote last time.

It would be great if we could expand on the part about using any CDF. here we have the alternative example where $Y = 1 if \eta > 0$ and is zero otherwise. Pdbailey

Would you explain what you meant by this sentence: "Because the variance portion is not constant, there is no sense to least squares, instead the parameters must be estimated with maximum likelihood or quasi maximum likelihood." It is not clear at all... Thanks! (Also, PLEASE sign your comments! All it takes is 4 ~'s) --shaile 22:21, 20 April 2006 (UTC)
Sorry, I don't have time to fix it up right now. The general idea is that OLS won't work because none of the assumptions hold (independance, constant variance)Pdbailey 00:11, 21 April 2006 (UTC)

## on using $\eta$

So the reason that I like the $\eta$ terminology is that it seperates out the linear part of the equation ($X\beta$) from the random part ($Y$). It makes it clear that there is a linear model in there. Also, the way the second equation is now ($E(Y_i) = \mu_i = g^{-1}(X_i^T\beta),$ so that $g(\mu_i) = X_i^T\beta.$) it is a bit of a garbled mess. Pdbailey 02:21, 21 April 2006 (UTC)

I guess I see your point. On the other hand, I think maybe it's better to keep a similar notation to that of Linear model, thus dropping the $\eta$. As for the second equation, I think it should be either $g(\mu_i) = X_i^T\beta,$ or $g(E(Y_i)) = X_i^T\beta.$ You're right, the inverse g function is a bit confusing, and I think $g(\mu)=X_i^T\beta$ is the more standard notation. I need to find the paper for this, I have it around somewhere... --shaile 04:21, 21 April 2006 (UTC)
I'm working off lecture notes from McCullagh (author of one of the References) and I'll have to admit that my notes are not an example of clarity (hence $g$ instead of $g^{-1}$). However, I really like the seperation that McCullagh emphasies between the linear part of the model (which describes the mean behavior with a linear equation) and the variance part of the model, which describes the dispersion of the $Y$ values. In fact, he argues that it is always clearer to write a model in the fashon -- to seperate out the expected value from the dispersion. In a GLM, when they are seperated it is clear that the link, well, links the two portions of the model. It gives some perspective into the relevance of the link function and seperates out clearly the three components that are present in all GLMs. Some people might think that probit and logit are worlds apart, but in this framework, it is clear that they are minor variants on each other.
This form is also echoed in programs such as STATA which has a linear model, a link function, and a variance function. But I'm affraid that we just disagree on this one -- you like the simplicity of having it all in one formula, I like seeing all three components seperated. Pdbailey 05:19, 21 April 2006 (UTC)
I just changed the page in light of this discussion not to rv but to state the model more clearly in the way I'm arguing for. Pdbailey 05:27, 21 April 2006 (UTC)
Actually, this is fine. It was just more confusing the way you had it before.  :) --shaile 13:21, 21 April 2006 (UTC)
Based on the objects that the two of you raised, I changed it back to look more like it used to. I think that it is easier to get a handle on this way quickly. Pdbailey 16:10, 27 April 2006 (UTC)
Would someone clarify this: $\epsilon_i = f( g^{-1}(X_i^T \beta) )$? It's not at all clear, and I don't see how the error term is a function of the other parts, actually, I don't think it should be stated this way. Also, We need more details in there, it was better when the three parts of GLM were clarified separately. Any objections? --shaile 19:22, 27 April 2006 (UTC)

## Reorganization and exponential family detail

I have been reorganizing this article a bit, starting at the top. I wish however to point out a small but important change I made to the definition of exponential family here. Where before it contained a term $a(y)b(\theta)$, in McCullagh & Nelder (p28) it clearly shows $a(y)\theta$. I have made this change and eliminated the reference to the b function. If there is a more reputable source than M&N (hard to imagine) which has the more general $a(y)b(\theta)$ form, feel free to revert but please include the source. Baccyak4H 18:50, 27 October 2006 (UTC)

I think that's a good change you made to the definition of the exponential family. Do you think we could include how this relates to the link function? (I know how to do that, but I'd have to do a few to remember exactly where the link function comes from...) --shaile 20:57, 27 October 2006 (UTC)

Thanks. I was planning to address some more advantages of this form (M&N's form) including sufficient statistics, variance as function of a, c and d, and the canonical parameter. But that must wait; my copy is elsewhere now ;-). I certainly will be continuing my reorganization (mostly to make different editors' contributions sound like they came from one editor -- my pet peeve). While I may do a lot of tweaking, please feel free to improve my efforts. Baccyak4H 03:06, 28 October 2006 (UTC)

while M&N use that unusual exponential family form in their book they are equivalent (in the sense that you point out) and I think it makes sense for wikipedia to the broader definition. Which is to say that the notational convenience that it affords one book may not be as nice in an encyclopedia. Also, this article is for a much broader audience than the book and covers in a lot less detail. Pdbailey 03:51, 28 October 2006 (UTC)

I suppose in the end a more general formula would be better. Is there a version like the current version which also contains the so-called dispersion parameter? M&N has that ($\phi$), and given it appears in an overdispersion context twice (one of which I just added), I see some merit in including it in the formula: one of the great merits as I see it is the unification that the theory provides - another reason I may discribe the canonical parameter some more (Note: I removed it from the link table title, not because it was wrong (it was not), but because it was unexplained. I plan on returning to fix that). Baccyak4H 03:00, 29 October 2006 (UTC)

Well, here is a possible generalization of the exponential family formula which includes a dispersion parameter $\phi$. THe inclusion of $\phi$ is in the spirit of M&N's definition, but the rest of the formula is the same as the current one.

Old: $f_y(y; \theta) = \exp{(a(y)b(\theta) + c(\theta) + d(y) )} \,\!$.
New: $f_y(y; \theta) = \exp{\left(\frac{a(y)b(\theta) + c(\theta)}{h(\phi)} + d(y,\phi) \right)} \,\!$.

I tried to reword the discussion there to apply to this. Baccyak4H 14:58, 30 October 2006 (UTC)

Just wanted to add a note thanking those responsible for that glm formula under 'model components'. It really helps a lot, Baccyak4. 158.121.165.13 (talk) 14:59, 19 October 2009 (UTC)

Just dawned on me that for the $b(\theta)$ formula, if b is invertable then it is exactly equivalent to the version without b; they merely represent a reparameterization of each other. Baccyak4H 16:34, 31 October 2006 (UTC)

## History and Motivation

1. There is no mention of the probit link. From a passage in McCullagh and Nelder, the probit work is historically important, in particular the presentation of the scoring algorithm in an appendix written by R.A. Fisher for a paper by the toxicologist Bliss.

2. Mention that in practice glm's provide an important way to address heteroscedasticity.

My apologies in the event I have overlooked some passage that addresses these concerns.

Dfarrar 04:48, 20 February 2007 (UTC)

There is an article (stub) under development for probit. Dfarrar 04:51, 20 February 2007 (UTC)

## Probit link?

Should the probit link be included in the table of canonical link functions, or is it not considered a canonical link function? Bill Jefferys (talk) 23:43, 20 December 2007 (UTC)

It isn't a canonical link for any of the distributions there. I do suspect there is a distribution that makes it such, but don't know off the top of my head what it might be. Baccyak4H (Yak!) 02:23, 21 December 2007 (UTC)

## Boldface vectors

Shouldn't beta be in boldface throughout? At present some of the betas are bold and others aren't. This is particularly disturbing when it happens in Xβ.

--84.9.83.26 (talk) 11:46, 19 December 2007 (UTC)

Yes, consistency is a good thing. Nice catch. Baccyak4H (Yak!) 14:47, 19 December 2007 (UTC)
Update I did that fix; sorry if I missed any. I used wikimarkup (multiple single quotes) rather than html markup (<tags>) for consistency with the rest of the article. Baccyak4H (Yak!) 15:00, 19 December 2007 (UTC)

Thanks! :-)

Another one. In a vector context, shouldn't the linear predictor η be boldface too? η = X β

--84.9.73.5 (talk) 13:03, 21 December 2007 (UTC) (formerly 84.9.83.26)

This would depend on context. For one observation or data point, no, since X is a row vector. For the entire data, yes. I am not sure what you mean by "vector context", but I hope those two scenarios clarify things. Baccyak4H (Yak!) 16:26, 21 December 2007 (UTC)

## See also

Several types of regression which fall under this topic have been added to the see also section. However, links to these already appear where they are discussed higher up in the article. I propose to remove them in the see also section. Anyone with me here? Baccyak4H (Yak!) 19:12, 2 February 2008 (UTC)

## A couple of points

I think the technical term for the family of distributions is the Exponential Dispersion Family, though unfortunately I have no sources to confirm it other than my hazy memory. Can anyone confirm this?

Technically one doesn't even need to specify a distribution to fit a GLM, only a variance function is required (though specifying a distribution means one can estimate the dispersion parameter by maximum likelihood. However I don't know if that can be worked into the article without making it more confusing.

There is no mention in the article of iteratively re-weighted least squares (IRLS or IWLS depending on who you talk to), the method used for estimating the parameters, and the current article in that location doesn't seem relevant GLMs.

Thoughts? -3mta3 (talk) 00:17, 8 April 2008 (UTC)

3mta3, good points. One does need to specify an exponential family to fit with ML, but you are right that there are pseudo-ML options as well. I think this could be a new seciton. There also really should be a section on IRLS and Fisher steps, this a big part of what brings the GLM together, they can all be fit with the same general solver. Pdbailey (talk) 02:48, 8 April 2008 (UTC)

## Variance & Weighting

When you apply a link function to observed data, aren't you implicitly re-weighting points? For example, if I have samples for f(x) and expect it to be of the form f(x)=βx2, I could take the square root of my data and try to find β to minimize the norm of the residual of

$\sqrt{f(x)} = \sqrt{\beta} \sqrt{x}\qquad\qquad(1)$

but if I had equal variance on all of my samples, then a simple least-squares fit of (1) would be biased, putting more emphasis on a sample at, say, x=0.1 than at x=2 (if I have my head screwed on). I see some talk of this in the article and in this discussion page, but it isn't clear to me. How is this issue dealt with? Are the samples re-weighted based on the link function? —Ben FrantzDale (talk) 14:54, 26 August 2008 (UTC)

This is a good question for the Math Reference desk. But in lieu of that, you could check one of the references (McCullagh/Nelder is my fave): there you'll find the weighting issue is handled very elegantly by the maximization process of the likelihood. Baccyak4H (Yak!)

## Formula of density function related to mean and variance

Formerly, formula of the density function was
$f_Y(y; \theta, \tau) = \exp{\left(\frac{a(y)b(\theta) + c(\theta)} {h(\tau)} + d(y,\tau) \right)}.$
With that density function, if a is identity function and b is identity function, the mean of the distribution is
$\mu = \operatorname{E}(Y) = -c'(\theta)$
and the variance is
$\operatorname{Var}(Y) = -c''(\theta) h(\tau).$

Now, in the formula of the density function, the sign in front of c is minus. The formula is
$f_Y(y; \theta, \tau) = \exp{\left(\frac{a(y)b(\theta) - c(\theta)} {h(\tau)} + d(y,\tau) \right)}.$
I am fine with the change, because the formula is more closely resembles the formula that I saw in a book. But, with that change in the formula of the density function, the formulas of mean and variance are now incorrect.

So, to make the formulas of mean and variance correct, there are two alternatives:

• The formula of density function is changed back (the sign in front of c is plus); the formulas of mean and variance are not changed.
• The formula of density function is in current condition (the sign in front of c is minus); the formulas of mean and variance are changed (the minus sign removed).

--Anreto (talk) 04:57, 8 October 2008 (UTC)

## essentially due to Fisher

This is not as clearly spelled out in the book, but I would encourage you to read section 2.5 and 2.5.1 before you pass judgment on the claim. Now, I can see that the claim might, in order to be completely correct, be taken down a notch. But in precision it loses the ease of reading which is important in a lead. Fisher proposed a method of approximating the Hessian, but this is the key to using Newton's method for this set of problems. Certainly, Nelder and Wedderburn's paper and found that the method could be expanded to the exponential family form. But the Nelder and Wedderburn paper is about fitting the model and less about its application (which the MC&N book covers in more detail) and, again, Fisher made the one of the key insights on this front. Now, if you read this, read sections 2.5 of MC&N, and understand it and still want it out, then by all means, take it out. Alternately, it might make more sense to point it out in the body instead of in the lead, that is fine too. PDBailey (talk) 21:43, 11 January 2009 (UTC)

I've just skimmed those sections of McC & N and read the 'Bibliographic notes' in section 2.6 of McC&N, which i think make things fairly clear. As I understand it: Fisher introduced one method ('Fisher scoring') of maximizing the likelihood of the probit model. Wedderburn & Nelder generalized this to all exponential-family distributions and also generalized further by introducing the link function. These two generalizations together constitute the "generalized" bit of generalized linear models, and Fisher had nothing to do with them. I thought your edit implied that Fisher essentially proposed GLMs themselves, while I think he proposed a method (extended by N&W) used in fitting GLMs, which is why I reverted (but i'm happy we're discussing it). I think it would be worth explaining Fisher's contribution in a section on fitting GLMs, but the article doesn't have such a section at present. Qwfp (talk) 23:00, 12 January 2009 (UTC)
Agreed, fitting is the right spot for the point to be made. PDBailey (talk) 23:17, 12 January 2009 (UTC)

Wow, there really is no fitting section, I'll try to rectify that soon. PDBailey (talk) 03:32, 27 January 2009 (UTC)

## Lead sentence

About this sentence in the lead:

"It relates the random distribution of the measured variable of the experiment (the distribution function) to the systematic (non-random) portion of the experiment (the linear predictor) through a function called the link function."

I think that is an accurate description (IIRC I helped write it). However, it might be considered a little wordy or technical. I was thinking of rephrasing it to segue with the first sentence, about being a generalization of least squares regression (linear regression). Something along the lines of, rather than just equating the mean to the linear predictor, it allows for particular relationships between them (in statspeak, the link function is being generalized). Thoughts? Baccyak4H (Yak!) 17:25, 6 February 2009 (UTC)

## Generalized linear model

So if i'm not mistaken, this model can be expressed using a standard notation (that is, comparable with the rest of regression models articles) as

$y_i = g^{-1}(x_i'\beta) + \varepsilon_i,$

where g is some monotonous "link" function (might be helpful to add a reasoning why we have g-1 instead of simply g), and ε belongs to an exponential family. Then it proceeds with explanation how MLE can be applied to obtain the estimates.

This "generalized linear model" is in fact a sub-case of slightly more general non-linear regression model

$y_i = g(x_i,\,\beta) + \varepsilon_i,$

and therefore it is also solvable by all the standard methods used for non-linear models, such as

• non-linear least squares, in which case distributional assumption for ε's is not needed
• non-parametric regression methods, in which case preliminary knowledge of the shape of function g is unnecessary

It seems however that neither this connection, nor alternative approaches to estimation are ever mentioned in this article. // Stpasha (talk) 10:47, 3 July 2009 (UTC)

I think you're mistaken, though it's a common enough source of confusion that maybe it merits a mention in the article. The model is
$\operatorname{E}(Y_i) = g^{-1}(x_i'\beta)$
where Y belongs to an exponential family. Although this can be expressed in the form you give:
$Y_i = g^{-1}(x_i'\beta) + \varepsilon_i,$
by defining ε =Y − E(Y), this is not very useful, as then ε does not, in general, belong to an exponential family (as you claim above), or in fact to any standard probability distribution, and in general its distribution will vary between observations. For example, consider the case when y is Bernoulli. You could still fit this model by non-linear least squares, but that will give biased estimates without the asymptotic efficiency of the MLE, and still requires an iterative solution.
Why g-1 instead of g? I guess it's fairly arbitrary whether you write the mean as a function of the linear predictor or the linear predictor as a function of the mean. From a quick glance at Nelder & Wedderburn's paper I think this convention may originate from the connection between the canonical link function and the natural parameter of the exponential distribution, but it also fits in with the usual way of writing logistic regression and Poisson regression which predate GLMs. Agree could be better explained. Qwfp (talk) 16:41, 3 July 2009 (UTC)
Ah yes, thank you, i see it now. The case when Y is Bernoulli is known as Binary response models, including Logit and Probit as particular cases. For those models there are also estimators which allow for unspecified link function, such as Manski's Maximum Score Estimator and Cossett's Generalized MLE. // Stpasha (talk) 21:17, 3 July 2009 (UTC)

## Atomic mass values

If the reported atomic values were reported and related to the 2 atomic parameters: 1, Deuteron number (=2 times the Z number), and 2, Extra neutron number (= the n - Z number), what would be the best regression method to assign the variance to these 2 factors and determine the best regression equation?WFPM (talk) 03:05, 10 December 2011 (UTC)

It should be noted that a regression of the incremental deuteron mass values results in the creation of 2 separate population of mass increase values, which are: 1, an increased even numbered deuteron mass value and 2, an increased odd numbered deuteron mass value. So maybe the analysis requires the regression to be for more than just 2 parameters.WFPM (talk) 16:43, 11 December 2011 (UTC)

## Multinomial belongs under examples, nout under extensions

An extension is something that expands the generalized linear model: the multinomial models shown are simply special cases of distribution and link. — Preceding unsigned comment added by 24.34.200.147 (talk) 01:17, 28 May 2012 (UTC)

## Conflation of models and methods for fitting models

The section on HGLMs incorrectly suggested that these models differ from GLMMs. If what differs is the method for fitting the models, i.e., if there is no difference in the mathematical expression of the relationship between the covariates and the outcomes, then there is no need for a new acronym or to claim a new model has been expressed. I removed the section. — Preceding unsigned comment added by 24.34.200.147 (talk) 01:24, 28 May 2012 (UTC)

## Incorrect claims regarding what a GLMM means

A line implied that GLMMs "assume" normal random effects. In fact, there is no such limitation, though abilities to relax this assumption (other than via MCMC) are limited. The GLMM does not include any such assumption. Similarly, the GLMM is not (as was implied) limited to single-level models, with multilevel of hierarchical linear models implying a further generalization. I simplified the "entensions" section to correct this. — Preceding unsigned comment added by 24.34.200.147 (talk) 01:27, 28 May 2012 (UTC)

## Notation "μ"

Small point perhaps, but I found a bit puzzling on first encounter: Can someone "in the know" add a small note about notation "μ". I find it a bit confusing here, and I found the same some years ago when I first read about GLM from a textbook. Towards the start here it seems to be implied that "μ" will, in the general case, stand for the expected value of the response variable. But then later, this notation is not always adhered to strictly. E.g. it seems to be used that way for Bernoulli response, but not for Binomial or Multinomial (unless you redefine the response to be the proportion, rather than the count, which is not clearly and consistently done). — Preceding unsigned comment added by 83.217.170.175 (talk) 01:11, 18 September 2012 (UTC)

### Conditional mean...

Also, it might be a slightly confusing notation because the mean varies with $x$ --- I think it is confusing to leave out $x$ as an argument. Superpronker (talk) 10:26, 19 October 2012 (UTC)

## Binomial or bernoulli ?

The part about binomial regression shows the link function for a Bernoulli variable, without really saying why this works for a binomial. For instance, if Y is Binom(n,p), then E(Y) = np and g(E(y)) = log((np) / (1-np)) which doesn't make sense. — Preceding unsigned comment added by Statr (talkcontribs) 19:41, 9 April 2013 (UTC)


text:
## “Pion stars,” spherical cavities, and more on the nature of mass

In a recent post on information and the nature of mass, I presented a gedankenexperiment that involved a spherical, thin-shelled, perfectly internally reflective optical cavity that initially contains neutral pions that then decay to photons.  Using special relativistic arguments I demonstrated how the total mass of the system should remain unchanged in the process.  So, for instance, if the cavity were large enough such that some massive object could orbit (due to gravity), the object’s orbit should not change after the photons decay.  This experiment has continued to gnaw away at my brain and I began to think of the quantum mechanical aspects of the problem.

Let’s idealize this a bit in order to simplify things and start by only considering a single neutral pion (initially at rest) in the cavity.  Quantum mechanically we can treat the problem as a spherical “particle in a box” problem.  Since the neutral pion is initially non-relativistic since it is at rest, the three-dimensional Schrödinger equation can be validly applied in order to find the energy eigenstates of the associated pion.  This is a fairly standard procedure and, in fact, is often included in elementary quantum mechanics texts as a problem.  One simply solves the radial Schrödinger equation and tacks on the spherical harmonics.  Solutions generally take the form of Bessel functions (note, however, that the probability densities depend only on r since the distributions are spherically symmetric).

But what happens when the pion decays to the photons?  Photons are highly relativistic and applying the Schrödinger equation here is a bit suspect (though note that it can be used to find approximate solutions, e.g. see Slater’s classic Quantum Theory of Matter).  We might try to apply the Klein-Gordon equation in the limit that $m\to\infty$. But it isn’t clear that this would give the correct answer either. Iwo Bialynicki-Birula has written several papers on photon wavefunctions (a nice summary paper is here).  Tom Moore also does a nice job “explaining” the two-slit experiment with wavefunctions in his book Six Ideas That Shaped Physics, Unit Q.  In the latter, Moore uses the free-particle approximation and really just treats the stream of photons as a fluctuating semi-classical E&M field.  I think for the present problem a semi-classical approach such as this might be a bit oversimple.

At any rate, this raises a number of intriguing questions.  Presumably, conservation of energy would require that there be some kind of correspondence between the energy eigenstates of the pion and that of the photon pair (aside from the well-known phase correspondence for such a decay that is due to the conservation of charge conjugation, i.e. $(-1)^{l+s}=(-1)^{n}$).  How would such a restriction affect the solutions to the photon eigenvalue problem?  In the gedankenexperiment for mass, we invoked special relativity in order to explain that the mass remains unchanged.  Since this also tells us that the energy of the system is related to the mass, does this quantization of energy levels necessarily quantize the mass of the system?  Could this tell us a little something about quantum gravity in the process?

One way to answer these questions in an ensemble manner (i.e. for many pions and many photons) is to consider the pions as a degenerate Fermi gas, i.e. to consider the internal pressure of a cavity as high enough that you essentially have a “pion star.”  After the pions have completely decayed to photons, the “star” is now modeled as a photon gas.  What is interesting about this approach is that it can be shown that the total energy of the pions in the cavity is dependent on the number of pions in the cavity but is not dependent on the volume, while the opposite is true for the total energy of the photons.  One could tie volume to the total energy of the fermions via the Fermi energy, but that is slightly circular reasoning in my book.  Either way, if we set the total energies equal to one another (for simplicity assume the temperature is the same in both the pion and photon cases and is very low, $T\ll \epsilon /k$), the number of pions is linearly proportional to the volume, which actually makes sense.

But that doesn’t really tell us much.  For our purposes here, the more fruitful approach might be to start with a single neutral pion that then decays to a pair of photons, $\pi^{0}\to\gamma +\gamma$, and see what that implies, first.  Then we can look at the ensemble characteristics to see how the situation differs.  In any case, I have not gone into this in much detail yet, but am working on it.  I think it would be an intriguing idea to pursue, though, particularly if we can tie together the quantum and relativistic mass considerations.  Any seriously legitimate contributions given in the responses to this post will, of course, lead to co-authorship (should you choose).  Any attempt to steal these ideas and beat me to publication will result in a serious ass-kicking (assuming the ideas are even worthy of publication).

format: plain


text:
## 2013-03-25 using tabs in vim

• call vim to open more files

vim -p file1 file2 file3

• or open one in your editing session

:tabf <pattern>

(will find the file corresponding to <pattern>)

• to switch tab, use gt

## 2013-03-23 upgrading owncloud to 5.0.0

• backup

rsync -a owncloud/ owncloud_bkpdate +"%Y%m%d"/

mkdir tmp; cd tmp

• remove old (except data and config)

rm COPYING-* AUTHORS README *php db_structure.xml themes search lib l10n ocs core settings files apps 3rdparty backup
tar -xzjf owncloud-5.0.0.tar.bz2
rsync --inplace -rtv tmp/owncloud/ owncloud/

• clean-up

rm -fr tmp

Starting in Leopard (I believe) when you open a file downloaded from the web, OS X asks if you really mean it. While it is intended to stop maliciousness, it is only a source of aggravation for me. While there are some hints here on working around it, it turns out that you can disable it completely using a Terminal command:

defaults write com.apple.LaunchServices LSQuarantine -bool NO

After that, reboot, and you should be set. (this was inspired by http://hints.macworld.com/article.php?story=20091208050655947 )

## 2013-03-13 shortcut to put the display to sleep

• ⇧⌃⏏ (shift+control+eject)

## 2013-03-06 setting some conventions common in Bibdesk (to work with bibtex, citeUlike)

• I found this set useful to collaborate:

• citekey  %a1%y%u0
• rangement semi-automatique papiers:  %f{Cite Key}%n0%e
• Topic = use citekey of related papers
• Comment (instead annote) to put... comments (as annote gets printed in the manuscript that would use the entry)
• to do that automatically, one may use this tricks:

defaults write edu.ucsd.cs.mmccrack.bibdesk "Cite Key Format" -string "%a1%y%u0"¬
defaults write edu.ucsd.cs.mmccrack.bibdesk BDSKLocalFileFormatKey -string "%f{Cite Key}%n0%e"

• this is included in this script @ https://github.com/laurentperrinet/dotfiles/blob/master/init/install_tex_live.sh

## 2013-02-20 removing files based on their date

Everything (almost) can be done by the find command:

• finding in the current directory (.) all files containing a lock pattern:

find . -name *lock*

find . -name *lock*  -exec ls -l {} \;

• filtering files that were changed just from now to one day ago:

find . -name *lock*  -mtime 0 -exec ls -l {} \;

• filtering files that were changed just from now to 5 hours ago:

find . -name *lock*  -mmin 300 -exec ls -l {} \;

• filtering files that are at least 5 hours old (not just from now to 5 hours ago):

find . -name *lock* -not -mmin 300 -exec ls -l {} \;

• removing of lock files older than 5 hours:

find . -name *lock*  -not -mmin 300 -exec  rm -f {} \;

## 2013-02-04 WP5 Year 2 report: contribution of CNRS-INT (Institut de Neurosciences de la Timone)

During the first year of BrainScaleS, we have concentrated on disseminating our work on the role of motion-based prediction in motion detection. This led to a publication on the hypothesis that this prior expectation may explain some phenomena explained otherwise by complex arrangements of mechanisms, namely that motion-based prediction is sufficient to solve the aperture problem (Perrinet and Masson, 2012). During the second year, we extended this hypothesis to other types of problems linked to the detection of motion. In particular, we focused on the case were the stimulus is transiently and unexpectedly blanked, a physiologically very relevant constraint occurring for instances during blinks of the eye. For this, we have used the same theoretical framework based on a Bayesian formulation and implemented using a particle filtering scheme, but used a different experimental protocol inspired by behavioral experiments conducted in the laboratory by CNRS-INT (Bogadhi, 2012). This is an important aspect as it allows to better understand the dynamics of the neural representation without sensory input and more generally to understand the interaction of the sensory flow with an internal neural representation of the environment.

 Role of motion-based prediction in motion extrapolation. We show here the results of simulation of the motion-based prediction compared to velocity prediction (no position prediction). These models were tested for a dot moving in a straight trajectory but blanked (as given by the vertical bars) whether at the early stage (top panel) or in the late phase (bottom panel). This shows that compared to a control (condition with no blank), the system simply resumes the convergence to the veridical position at reappearance of the dot. In motion-based prediction, the systems catches up the trajectory and recovers more quickly to the response with no blank.

Our results indicate that motion-based prediction is sufficient to predict eye responses during the blank and ---more importantly--- the dynamics of eye movements at the reappearance of the object. We compared simulations of the motion-based predictive framework to a dot moving in a straight trajectory which is transiently blanked, with a framework where prediction is limited to the velocity domain but is not anisotropically transported also in the position domain. This comparison allowed to show that at the reappearance of the object, instead of just resuming, the estimation of the position and velocity in the motion-based prediction framework catches-up the error that may have accumulated during the blank (see Figure). We have put in evidence that this phenomenon is only present when the system converged to a "tracking state", a phase transition that we first saw in our first study (Perrinet and Masson, 2012) and that we studied systematically here. Furthermore, we give some predictions as how the oculomotor response should respond to the same protocol when visual input is perturbed by noise, an experiment that has still not been performed behaviorally, and that could confirm the validity of our probabilistic framework. These results have been submitted for publication (Khoei, Masson and Perrinet).

From this novel step, we wish to further study the role of prediction on focusing on the neural implementation of these processes. Indeed, the framework that we used so far used an abstract, probabilistic framework. However, it is known to map well to a neural architecture such as those developed in BrainScaleS at the modeling and hardware levels. Such a venture was initiated in collaboration between CNRS-INT and KTH by Bernhard Kaplan and we could give a sufficient large-scale network of spiking neurons that could efficiently implement such algorithms. Our plan is to resume this work in more generic conditions. One objective is to apply it to different modalities,for instance to the somatosensory system (collaboration with Dan Shulz, CNRS-UNIC). Also, we wish to implement a model which is specifically more realistically accounting for the properties of the primary visual cortex of primates and the interaction this area may have with higher order areas. A post-doctoral student was selected in year 2 to work on that issue in Years 3 and 4. The ultimate goal of this work will be to have a pyNN-compatible network that implements a realistic model of motion detection. This network will be tested in light of the synthetic textures that we have generated (Sanz et al. 2012, see WP4 task 1) and that we recently used to disentangle the different read-outs that may be used by perception or action (Simoncini et al., 2012). The use of neuromorphic hardware will then be crucial to explore the configuration space of such large-scale networks implementing motion detection.

• Laurent U. Perrinet and Guillaume S. Masson. Motion-based prediction is sufficient to solve the aperture problem. Neural Computation, 24(10):2726--50, 2012
• Mina A. Khoei, Guillaume S. Masson and Laurent U. Perrinet. Role of motion-based prediction in motion extrapolation. Submitted.
• Paula S. Leon, Ivo Vanzetta, Guillaume S. Masson and Laurent U. Perrinet. Motion Clouds: Model-based stimulus synthesis of natural-like random textures for the study of motion perception Journal of Neurophysiology, 107(11):3217--3226, 2012
• Claudio Simoncini, Laurent U. Perrinet, Anna Montagnini, Pascal Mamassian and Guillaume S. Masson. More is not always better: dissociation between perception and action explained by adaptive gain control Nature Neuroscience, 2012

## 2013-02-02 How To Change Your Time Machine Backup Interval

 tl;dr  sudo /usr/libexec/PlistBuddy -c 'set  :LaunchEvents:com.apple.time:"Backup Interval":Interval 86400' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist

## method 1 : vim (or any editor)

• open the file for edition

sudo vim /System/Library/LaunchDaemons/com.apple.backupd-auto.plist

• replace 36000 (one hour) by 86400 (one day), then quit:

:%s/3600/86400/g
:wq!

## method 2 : plistbuddy

• you can make it in one line:

sudo /usr/libexec/PlistBuddy -c 'set  :LaunchEvents:com.apple.time:"Backup Interval":Interval 86400' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist

• this method use the PlistBuddy method to read / write the file. this utility can be used interactively

sudo /usr/libexec/PlistBuddy  /System/Library/LaunchDaemons/com.apple.backupd-auto.plist

• but also directly:

sudo /usr/libexec/PlistBuddy -c 'print  ' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /usr/libexec/PlistBuddy -c 'print  :LaunchEvents:com.apple.time ' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /usr/libexec/PlistBuddy -c 'print  :LaunchEvents:com.apple.time:"Backup Interval" ' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /usr/libexec/PlistBuddy -c 'print  :LaunchEvents:com.apple.time:"Backup Interval":Interval ' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /usr/libexec/PlistBuddy -c 'set  :LaunchEvents:com.apple.time:"Backup Interval":Interval 3600' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist

• reboot.

## 2013-01-31 (re)moving lots of file containing a similar pattern

• I use ownCloud as a remplacement of dropbox, but I had unfortunately lots of conflicts files (on client and server)

• these contain the _conflict- pattern, so a solution is to move all of them to a backup folder:

cd /share/DriveOne/Web/owncloud/data/admin/files
find . -name *_conflict-* -exec mv {} /share/Backups/backups/duplicate-photos/ \;
`

## 2013-01-16 WP4 report : NeuroTools support for the synthesis of random textured dynamical stimuli

In the context of BrainScales, we have developed a library to synthesize stimuli targeted at the characterization of motion perception. This process took the following steps:

• creation of the library using python and linked with the development of NeuroTools,
• documentation of this library along with a mathematical description, published in the Journal of Neurophysiology, while this stimuli were at the basis of a paper published in Nature Neuroscience (both acknowledging BrainScaleS)
• dissemination of this tool by creating a dedicated webpage associated to the "neuralensemble organization" which also host neo and pyNN.

These steps were recently described in deliverable D4-1.1: https://brainscales.kip.uni-heidelberg.de/jss/FileStore/dI_1548/BrainScaleS_DeliverableD4-1.1.pdf (requires authentification).


text:
# Newton's law of cooling

Newton's law of cooling states that the rate of heat loss of a body is proportional to the difference in temperatures between the body and its surroundings. As such, it is equivalent to a statement that the heat transfer coefficient, which mediates between heat losses and temperature differences, is a constant. This condition is generally true in thermal conduction (where it is guaranteed by Fourier's law), but it is often only approximately true in conditions of convective heat transfer, where a number of physical processes make effective heat transfer coefficients somewhat dependent on temperature differences. Finally, in the case of heat transfer by thermal radiation, Newton's law of cooling is not true.

Sir Isaac Newton did not originally state his law in the above form in 1701, when it was originally formulated. Rather, using today's terms, Newton noted after some mathematical manipulation that the rate of temperature change of a body is proportional to the difference in temperatures between the body and its surroundings. This final simplest version of the law given by Newton himself, was partly due to confusion in Newton's time between the concepts of heat and temperature, which would not be fully disentangled until much later.[1]

When stated in terms of temperature differences, Newton's law (with several further simplifying assumptions, such as a low Biot number and temperature-independent heat capacity) results in a simple differential equation for temperature-difference as a function of time. This equation has a solution that specifies a simple negative exponential rate of temperature-difference decrease, over time. This characteristic time function for temperature-difference behavior, is also associated with Newton's law of cooling.

## Relationship to mechanism of cooling

Convection-cooling is sometimes called "Newton's law of cooling." This use is based on a work by Isaac Newton published anonymously as "Scala graduum Caloris. Calorum Descriptiones & signa." in Philosophical Transactions, 1701,[2]

In cases where the heat transfer coefficient is independent, or relatively independent, of the temperature difference between object and environment, Newton's law is followed. This independence is sometimes the case, but is not guaranteed to be so. The heat transfer coefficient is often relatively independent of temperature in purely conduction-type cooling, but becomes a function of the temperature in classical natural convective heat transfer. In this case, Newton's law only approximates the result when the temperature changes are relatively small. Newton himself realized this limitation.

A correction to Newton's law concerning larger temperature differentials was made in 1817 by Dulong and Petit.[3] (These men are better-known for their formulation of the Dulong–Petit law concerning the molar specific heat capacity of a crystal.)

Another situation with temperature-dependent transfer coefficient is radiative heat transfer, which also does not obey Newton's law.

## Heat transfer version of the law

The heat-transfer version of Newton's law, which (as noted) requires a constant heat transfer coefficient, states that the rate of heat loss of a body is proportional to the difference in temperatures between the body and its surroundings.

The rate of heat transfer in such circumstances is derived below:[4]

Newton's cooling law in convection is a restatement of the differential equation given by Fourier's law:

${\displaystyle {{\frac {dQ}{dt}}=h\cdot A\cdot (T(t)-T_{\text{env}})=h\cdot A\Delta T(t)\quad }}$

where

${\displaystyle Q}$ is the thermal energy in joules
${\displaystyle h}$ is the heat transfer coefficient (assumed independent of T here) (W/(m2 K))
${\displaystyle A}$ is the heat transfer surface area (m2)
${\displaystyle T}$ is the temperature of the object's surface and interior (since these are the same in this approximation)
${\displaystyle T_{\text{env}}}$ is the temperature of the environment; i.e. the temperature suitably far from the surface
${\displaystyle \Delta T(t)=T(t)-T_{\text{env}}}$ is the time-dependent thermal gradient between environment and object

The heat transfer coefficient h depends upon physical properties of the fluid and the physical situation in which convection occurs. Therefore, a single usable heat transfer coefficient (one that does not vary significantly across the temperature-difference ranges covered during cooling and heating) must be derived or found experimentally for every system that can be analyzed using the presumption that Newton's law will hold.

Formulas and correlations are available in many references to calculate heat transfer coefficients for typical configurations and fluids. For laminar flows, the heat transfer coefficient is rather low compared to turbulent flows; this is due to turbulent flows having a thinner stagnant fluid film layer on the heat transfer surface.[5] However, note that Newton's law breaks down if the flows should transition between laminar or turbulent flow, since this will change the heat transfer coefficient h which is assumed constant in solving the equation.

### The Biot number

Main article: Biot number

The Biot number, a dimensionless quantity, is defined for a body as:

${\displaystyle \mathrm {Bi} ={\frac {hL_{C}}{\ k_{b}}}}$

where:

• h = film coefficient or heat transfer coefficient or convective heat transfer coefficient
• LC = characteristic length, which is commonly defined as the volume of the body divided by the surface area of the body, such that ${\displaystyle {\mathit {L_{C}}}={\frac {V_{\rm {body}}}{A_{\rm {surface}}}}}$
• kb = Thermal conductivity of the body

The physical significance of Biot number can be understood by imagining the heat flow from a hot metal sphere suddenly immersed in a pool, to the surrounding fluid. The heat flow experiences two resistances: the first at the surface of the sphere, and the second within the solid metal (which is influenced by both the size and composition of the sphere). The ratio of these resistances is the dimensionless Biot number.

If the thermal resistance of the fluid/sphere interface exceeds that thermal resistance offered by the interior of the metal sphere, the Biot number will be less than one. For systems where it is much less than one, the interior of the sphere may be presumed always to have the same temperature, although this temperature may be changing, as heat passes into the sphere from the surface. The equation to describe this change in (relatively uniform) temperature inside the object, is the simple exponential one described in Newton's law of cooling expressed in terms of temperature difference (see below).

In contrast, the metal sphere may be large, causing the characteristic length to increase to the point that the Biot number is larger than one. In this case, thermal gradients within the sphere become important, even though the sphere material is a good conductor. Equivalently, if the sphere is made of a thermally insulating (poorly conductive) material, such as wood or styrofoam, the interior resistance to heat flow will exceed that of the fluid/sphere boundary, even with a much smaller sphere. In this case, again, the Biot number will be greater than one.

Values of the Biot number smaller than 0.1 imply that the heat conduction inside the body is much faster than the heat convection away from its surface, and temperature gradients are negligible inside of it. This can indicate the applicability (or inapplicability) of certain methods of solving transient heat transfer problems. For example, a Biot number less than 0.1 typically indicates less than 5% error will be present when assuming a lumped-capacitance model of transient heat transfer (also called lumped system analysis).[6] Typically, this type of analysis leads to simple exponential heating or cooling behavior ("Newtonian" cooling or heating) since the amount of thermal energy (loosely, amount of "heat") in the body is directly proportional to its temperature, which in turn determines the rate of heat transfer into or out of it. This leads to a simple first-order differential equation which describes heat transfer in these systems.

Having a Biot number smaller than 0.1 labels a substance as "thermally thin," and temperature can be assumed to be constant throughout the material's volume. The opposite is also true: A Biot number greater than 0.1 (a "thermally thick" substance) indicates that one cannot make this assumption, and more complicated heat transfer equations for "transient heat conduction" will be required to describe the time-varying and non-spatially-uniform temperature field within the material body. Analytic methods for handling these problems, which may exist for simple geometric shapes and uniform material thermal conductivity, are described in the article on the heat equation.

## Rate-of-change of temperature-difference version of the law

As noted in the section above, accurate formulation for temperatures may require analysis based on changing heat transfer coefficients at different temperatures, a situation frequently found in free-convection situations, and which precludes accurate use of Newton's law.

As noted above, Newton's law behavior when stated in terms of temperature change in the body, also requires that internal heat conduction within the object be large in comparison to the loss/gain of heat by surface transfer (conduction and/or convection), which is the condition where the Biot number is less than about 0.1. This allows the presumption of a single "temperature" inside the body (as a function of time) to make sense, as otherwise the body would have many different temperatures inside it, at any one time. This single temperature will generally change exponentially, as time progresses (see below).

Assumption of rapid internal conduction also allows use of the so-called lumped capacitance model. In this model, the amount of thermal energy in the body is calculated by assuming a constant heat capacity and thus thermal energy in the body is assumed to be a linear function of the body's temperature.

### Temperature function-of-time solution in terms of object heat capacity

Given that the body is treated as a lumped capacitance thermal energy reservoir with a ${\displaystyle Q}$ (total thermal energy content) which is proportional to ${\displaystyle C}$ (simple total heat capacity) and ${\displaystyle T}$ (the temperature of the body), then ${\displaystyle Q=CT}$. It is expected that the system will experience exponential decay in the temperature difference of body and surroundings as a function of time. This is proven in the following sections:

From the definition of heat capacity ${\displaystyle C}$ comes the relation ${\displaystyle C=dQ/dT}$. Differentiating this equation with regard to time gives the identity (valid so long as temperatures in the object are uniform at any given time): ${\displaystyle dQ/dt=C(dT/dt)}$. This expression may be used to replace ${\displaystyle dQ/dt}$ in the first equation which begins this section, above. Then, if ${\displaystyle T(t)}$ is the temperature of such a body at time ${\displaystyle t}$, and ${\displaystyle T_{env}}$ is the temperature of the environment around the body:

${\displaystyle {\frac {dT(t)}{dt}}=-r(T(t)-T_{\mathrm {env} })=-r\Delta T(t)\quad }$

where ${\displaystyle r=hA/C}$ is a positive constant characteristic of the system, which must be in units of ${\displaystyle time^{-1}}$, and is therefore sometimes expressed in terms of a characteristic time constant ${\displaystyle t_{0}}$ given by: ${\displaystyle r=1/t_{0}=-(dT(t)/dt)/\Delta T}$. Thus, in thermal systems, ${\displaystyle t_{0}=C/(hA)}$. (The total heat capacity ${\displaystyle C}$ of a system may be further represented by its mass-specific heat capacity ${\displaystyle c_{p}}$ multiplied by its mass ${\displaystyle m}$, so that the time constant ${\displaystyle t_{0}}$ is also given by ${\displaystyle mc_{p}/hA}$).

The solution of this differential equation, by standard methods of integration and substitution of boundary conditions, gives:

${\displaystyle T(t)=T_{\mathrm {env} }+(T(0)-T_{\mathrm {env} })\ e^{-rt}.\quad }$

If:

${\displaystyle \Delta T(t)\quad }$ is defined as : ${\displaystyle T(t)-T_{\mathrm {env} }\ ,\quad }$ where ${\displaystyle \Delta T(0)\quad }$ is the initial temperature difference at time 0,

then the Newtonian solution is written as:

${\displaystyle \Delta T(t)=\Delta T(0)\ e^{-rt}=\Delta T(0)\ e^{-t/t_{0}}.\quad }$

This same solution is more immediately apparent if the initial differential equation is written in terms of ${\displaystyle \Delta T(t)}$, as a single function of time to be found, or "solved for."

${\displaystyle {\frac {dT(t)}{dt}}={\frac {d\Delta T(t)}{dt}}=-{\frac {1}{t_{0}}}\Delta T(t)\quad }$

## References

1. ^ History of Newton's cooling law
2. ^ 824–829; ed. Joannes Nichols, Isaaci Newtoni Opera quae exstant omnia, vol. 4 (1782), 403–407.
3. ^ Whewell, William (1866). History of the Inductive Sciences from the Earliest to the Present Times.
4. ^ Louis C. Burmeister, (1993) “Convective Heat Transfer”, 2nd ed. Publisher Wiley-Interscience, p 107 ISBN 0-471-57709-X, 9780471577096
5. ^ http://www.engineersedge.com/heat_transfer/convection.htm Engineers Edge, 2009, “Convection Heat Transfer”,Accessed 20/03/09
6. ^ Frank Incropera; Theodore L. Bergman; David DeWitt; Adrienne S. Lavine (2007). Fundamentals of Heat and Mass Transfer (6th ed.). John Wiley & Sons. pp. 260–261. ISBN 978-0-471-45728-2.


text:
# Changeset 58:10b6a5b7d4c0 in lemon-tutorial for algorithms.dox

Ignore:
Timestamp:
03/01/10 02:30:00 (11 years ago)
Branch:
default
Phase:
public
Message:

Improve Algorithms section (it is still under construction)

File:
1 edited

Unmodified
Removed
• ## algorithms.dox

 r57 \todo This page is under construction. \todo The following contents are mainly ported from the LEMON 0.x tutorial, thus they have to be thoroughly revised and reworked. \warning Currently, this section may contain old or faulty contents. \todo This section should be revised and extended. In addition to the graph structures, the most important parts of LEMON are the various algorithms related to graph theory and combinatorial optimization. The library provides quite flexible and efficient implementations for well-known fundamental algorithms, such as breadth-first search (BFS), depth-first search (DFS), Dijkstra algorithm, Kruskal algorithm and methods for discovering graph properties like connectivity, bipartiteness or Euler property, as well as more complex optimization algorithms for finding maximum flows, minimum cuts, matchings, minimum cost flows and arc-disjoint paths. for well-known fundamental algorithms, such as \ref Bfs "breadth-first search (BFS)", \ref Dfs "depth-first search (DFS)", \ref Dijkstra "Dijkstra algorithm", \ref kruskal "Kruskal algorithm" and methods for discovering \ref graph_properties "graph properties" like connectivity, bipartiteness or Euler property, as well as more complex optimization algorithms for finding \ref max_flow "maximum flows", \ref min_cut "minimum cuts", \ref matching "matchings", \ref min_cost_flow_algs "minimum cost flows" etc. In this section, we present only some of the most fundamental algorithms. [SEC]sec_graph_search[SEC] Graph Search See \ref Bfs, \ref Dfs and \ref graph_properties. Both \ref lemon::Bfs "Bfs" and \ref lemon::Dfs "Dfs" are highly adaptable and efficient implementations of the well known algorithms. The algorithms are placed most cases in separated files named after the algorithm itself but lower case as all other header file names. For example the next Bfs class is in the \c lemon/bfs.h. The algorithm is implemented in the \ref lemon::Bfs "Bfs" template class - rather than as function. The class has two template parameters: \b GR and \b TR.
GR is the digraph the algorithm runs on. It has \ref lemon::ListDigraph "ListDigraph" as default type. TR is a Traits class commonly used to easy the parameterization of templates. In most cases you wont need to modify the default type \ref lemon::BfsDefaultTraits "BfsDefaultTraits". To use the class, declare it! \code Bfs  bfs(gr); \endcode Note the lack of second template argument because of the default parameter. It provides a simple but powerful interface to control the execution. \code int dist = bfs.run(s,t); \endcode It finds the shortest path from node \c s to node \c t and returns it, or zero if there is no path from \c s to \c t.
If you want the shortest path from a specified node to all other node, just write: The common graph search algorithms, namely \ref Bfs "breadth-first search (BFS)" and \ref Dfs "depth-first search (DFS)" are implemented in highly adaptable and efficient algorithm classes \ref Bfs and \ref Dfs. In LEMON, the algorithms are typically placed in separated files, which are named after the algorithm itself but with lower case like all other header files. For example, we have to include bfs.h for using \ref Bfs. \code #include \endcode Basically, all algorithms are implemented in template classes. The template parameters typically specify the used graph type (for more information, see \ref sec_graph_structures) and the required map types. For example, an instance of the \ref BFs class can be created like this. \code ListDigraph g; Bfs bfs(g); \endcode This class provides a simple but powerful interface to control the execution of the algorithm and to obtain all the results. You can execute the algorithm from a given source node by calling the \ref Bfs::run() "run()" function. \code bfs.run(s); \endcode This operation finds the shortest paths from \c s to all other nodes. If you are looking for an s-t path for a certain target node \c t, you can also call the \ref Bfs::run() "run()" function with two parameters. In this case, the BFS search will terminate once it has found the shortest path from \c s to \c t. \code bfs.run(s,t); \endcode By default, the distances and the path information are stored in internal maps, which you can access with member functions like \ref lemon::Bfs::distMap "distMap()" and \ref lemon::Bfs::predMap() "predMap()" or more directly with other member functions like \ref lemon::Bfs::dist() "dist()", \ref lemon::Bfs::path() "path()", \ref lemon::Bfs::predNode() "predNode()", \ref lemon::Bfs::predArc() "predArc()". Once the execution of the algorithm is finished, these query functions can be called. For an example, let us say we want to print the shortest path of those nodes that are at most in a certain distance \c max_dist. \code bfs.run(s); \endcode Now the distances and path information are stored in maps which you can access with member functions like \ref lemon::Bfs::distMap "distMap()" or \ref lemon::Bfs::predMap "predMap()".


text:
# The diffraction pattern of a mixture is a simple sum of the diffraction patterns of each individual phase. • From the XRD pattern you can determine: – What crystalline phases are in a mixture – How much of each crystalline phase is in the mixture (quantitative phase analysis, QPA, is covered in another tutorial)

Thermal analyses (DTA and TG) were carried out on sturmanite and ettringite from the Kalahari Manganese Field, South Africa. The TG trace for sturmanite, approximately Ca 6 (Fe 1.5 3+ Al 0.3 Mn 0.2 2+) ∑2.0 {[B(OH) 4] 1.2 (SO 4) 2.3} ∑3.5 (OH) 12 ·25H 2 O, indicates that H 2 O(g) is lost at about 135°C, SO 3 (g) is lost at about 1349°C, and the residue melts at about 1154°C.

surfaces (WSD) are given in Table 2. In the XRD patterns of type 1-b, type 1-t, and type 2, strong peaks of calcite and weaker peaks of quartz are present. Type 1-t also has Fig. 1. XRD pattern of ettringite crystals (e) that are hand-separated from the type 2 plaster samples.

a schematic illustration of the ettringite crystal structure; XRD patterns of the solid residues before and a er selenate ettringite soaking in ethanol. See DOI: 10.1039/c7ra08765a Cite this: RSC Adv.,2017,7,42407 Received 8th August 2017 Accepted 26th August 2017 DOI: 10.1039/c7ra08765a rsc.li/rsc-advances In a The unit cell of ettringite is a 11.26, c 21.48 Å, Z = study of a synthetic ettringite using TG, XRD, and 27Al 2 for the supercell (Bannister et al. 1936). The space NMR, Shimada & Young (2001) heated ettringite at group for ettringite is P31c, and any apparent hexago- various temperatures up to 200°C for a period of up to nal symmetry was attributed to twinning or disorder 7 h. ﬁtting of the XRD full patterns by the Rietveld algorithm can be seen in ﬁgure 7 for the sample 8488 and are summarized in tables 2a and 2b for 8488 and 8487, respectively.

## General Ettringite Information : Chemical Formula: Ca6Al2(SO4)3(OH)12•26(H2O) Composition: Molecular Weight = 1,255.11 gm Calcium 19.16 % Ca 26.81 % CaO Aluminum 4.30 % Al 8.12 % Al 2 O 3 Hydrogen 5.14 % H 45.93 % H 2 O Sulfur 7.66 % S 19.14 % SO 3 Oxygen 63.74 % O

C) yields an X-ray amorphous product containing 11-13 H{sub 2}O per ettringite formula unit. Page S1 Supporting Information for Immobilizing Pertechnetate in Ettringite via Sulfate Substitution Sarah A. Saslow1*, Sebastien N. Kerisit2, Tamas Varga3, Sebastian T. Mergelsberg2, Claire L. Corkhill4 Michelle M.V. Snyder1, Nancy M. Avalos1, Antonia S. Yorkshire 4, Daniel J. Bailey , Jarrod Crum 1, and R. Matthew Asmussen . 1Energy and Environment Directorate, Pacific Northwest National Hydration of cement with and without fly ash is studied with Mössbauer spectroscopy, XRD, and thermal analysis. Iron in cement is present as Fe 3+ -ions and occupies two octahedral positions, with close isomer shifts and quadrupole splittings.

### Use of XRD patterns to evaluate compressive strength of stabilized aggregates. Results show the formation of cementitious compounds such as ettringite, gismondine, straetlingite, and

2019-09-12 #Match!3 #Software #XRDPattern #RietveldRefinement #Nanoencryption In order to gain a deeper understanding of the rheological development of hydrating ordinary Portland cement (OPC) pastes at initial state, and to better understand their underlying processes, quantitative X-ray diffraction (XRD) analysis and rheological measurements were conducted and their results combined. The time-dependent relation between phase development and flow behavior of cement Thermal analyses (DTA and TG) were carried out on sturmanite and ettringite from the Kalahari Manganese Field, South Africa.

The first component, specified via the xrd_table argument of powdRlib(), is a data frame of the count intensities of the reference patterns, with their 2 $$\theta$$ axis as the first column. The column for a given reference pattern must be named using a unique identifier (a phase ID). An example of such a format is provided in the minerals_xrd The XRD pattern for bulk CdS, simulated from crystallographic data, is shown in Figure 1. The first three peaks in the CdS XRD pattern correspond to the (100), (002), and (101) planes of CdS, and these are highlighted in the wurtzite crystal structure in the inset to Figure 1.
Boka teoriprov uppsala trafikverket

The XRD pattern of the ettringite sample con˜rmed that it was highly crystalline and single-phase ettringite (ICDD entry 075-7554, largest peak position 9.09°). The XRD patterns of the samples calcined at <60°C showed the The main reflection of ettringite is located by approx. 9° 2-theta.

The diffraction peaks due to Ms  The position of the XRD patterns of the ettringite are at 9.7 and 5.6 A in spite of its sulfate deficiency. Figure 3: The X-ray diffraction patterns of ettringite after  From the XRD pattern, it is generally possible to identify and ettringite. Ca6[Al( OH)6]2(SO4)3 26H2O ill crystallized hydrated products.
Etnografisk studie uppsats

inspirerande person engelska
individ prestige sverige
misshandel anstalten skänninge
idrottsnutrition utbildning distans
referenser internet

### patterns, which are based on pure kinematic diffraction. For example, for the [0 –1 –6] zone axis (left), the (h 0 0) reflec-tions, with odd values of h, are absent from the simulations yet present in the observed SAED pattern. The SAED pattern simulation window for specifying the simulation parameters is illustrated in Figure 2.

2. Effect of calcium sulfate variety on the microstructure and properties of cement-based grouting materials made by sulfoaluminate cement clinker, calcium sulfate resource, and quicklime was investigated in this paper. Isothermal calorimetric, XRD, DTA-TG, and SEM-EDS were used to characterize the reaction process of cement-based grouting materials. The mechanical property and expansion of the Therefore, controlling the ettringite content and the generation place is of great significance for the strength of the solidified soil sample.

Borgerlig politikk
julgran skane

### XRD pattern shows a strong peak at 2θ = 20.3 0 in each case that confirms the presence of polar and piezoelectric γ-phase (less than β-phase). This result is well supported by the ATR-IR spectra in which a characteristic absorption peak at around 832 and 1234 cm − 1 occurs in each case, which are the main corresponding peaks of γ-phase.

1Energy and Environment Directorate, Pacific Northwest National Hydration of cement with and without fly ash is studied with Mössbauer spectroscopy, XRD, and thermal analysis. Iron in cement is present as Fe 3+ -ions and occupies two octahedral positions, with close isomer shifts and quadrupole splittings.


text:
# YUV

YUV

Y'UV is a color space typically used as part of a color image pipeline. It encodes a color image or video taking human perception into account, allowed reduced bandwidth for chrominance components, thereby typically enabling transmission errors or compression artifacts to be more efficiently masked by the human perception than using a "direct" RGB-representation. Other color spaces have similar properties, and the main reason to implement or investigate properties of Y'UV would be for interfacing with analog or digital television or photographic equipment that conforms to certain Y'UV standards.

The scope of the terms Y'UV, YUV, YCbCr, YPbPr, etc., is sometimes ambiguous and overlapping. Historically, the terms YUV and Y'UV was used for a specific analog encoding of color information in television systems, while YCbCr was used for digital encoding of color information suited for video and still-image compression and transmission such as MPEG and JPEG. Today, the term YUV is commonly used in the computer industry to describe file-formats that are encoded using YCbCr.

The Y'UV model defines a color space in terms of one luma (Y') and two chrominance (UV) components. The Y'UV color model is used in the NTSC, PAL, and SECAM composite color video standards. Previous black-and-white systems used only luma (Y') information. Color information (U and V) was added separately via a sub-carrier so that a black-and-white receiver would still be able to receive and display a color picture transmission in the receivers native black-and-white format.

Y' stands for the luma component (the brightness) and U and V are the chrominance (color) components. The YPbPr color model used in analog component video and its digital version YCbCr used in digital video are more or less derived from it (CB/PB and CR/PR are deviations from grey on blue–yellow and red–cyan axes, whereas U and V are blue–luminance and red–luminance differences), and are sometimes called Y'UV. The Y'IQ color space used in the analog NTSC television broadcasting system is related to it, although in a more complex way.

History

Y'UV was invented when engineers wanted color television in a black-and-white infrastructure. [Maller, Joe. [http://joemaller.com/fcp/fxscript_yuv_color.shtml RGB and YUV Color] , "FXScript Reference"] They needed a signal transmission method that was compatible with black-and-white (B&W) TV while being able to add color television. The luma component was already existing as the B&W signal. They added the UV signal as a solution.

The UV representation of chrominance was chosen over, say, straight R and B signals because U and V are color difference signals. This meant that in a B&W scene the U and V signals would be zero and only the Y' signal would be transmitted. If R and B were to have been used, these would have non-zero values even in a B&W scene. This was important in the early days of color television as many programs were still being made and transmitted in B&W and many TV receivers were B&W only. It was necessary to assign a narrower bandwidth to the chrominance channel (there was no additional bandwidth available) and having some of the luminance information arrive via the chrominance channel - an inevitable consequence of Y'RB - would have resulted in a loss of B&W resolution. [W. Wharton & D. Howorth, "Principles of Television Reception", Pitman Publishing, 1971, pp 161-163]

Mathematical derivations and formulas

Y'UV signals are typically created from an original RGB (red, green and blue) source. The weighted values of R, G, and B are added together to produce a single Y' signal, representing the overall brightness, or luminance, of that spot. The U signal is then created by subtracting the Y' from the blue signal of the original RGB, and then scaling; V is created by subtracting the Y' from the red, and then scaling by a different factor. This can be accomplished easily with analog circuitry.

Mathematically, the analog version of Y'UV can be obtained from RGB with the following relationships

:

The U and V components can also be expressed in terms of raw R, G, and B, obtaining:

:

It is supposed, in all the previous equations, that $R, G, B in left \left[0, 1 ight\right]$.

As a consequence, the range of the transformed components is given by

:$Y\text{'} in left \left[0, 1 ight\right] , quadU in left \left[-0.436, 0.436 ight\right] , quadV in left \left[-0.615, 0.615 ight\right]$

The inverse relationship, from Y'UV to RGB, is given by

:

There are some points regarding the RGB transformation matrix:

* The top row is identical to that of the Y'IQ color space
*
* These formulae use the more traditional model of Y'UV, which is used for analog PAL equipment; digital PAL and digital NTSC HDTV do not use Y"UV but Y"CbCr.

BT.709 and BT.601

When standardising high-definition video, the ATSC chose a different formula for the YCbCr than that used for standard-definition video. This means that when converting between SDTV and HDTV, the color information has to be altered, in addition to image scaling the video.

The formulas above reference Rec. 601. For HDTV, a slightly different matrix is used, where WR and WB in the above formula is replaced by Rec. 709:

:

Numerical approximations

Prior to the development of fast SIMD floating-point processors, most digital implementations of RGB->Y'UV used integer math, in particular fixed-point approximations. In the following examples, the operator "a >> b" denotes an integer division by a power of two, which is equivalent to a right-shift of "a" by "b" bits.

Traditional 8 bit representation of Y'UV with unsigned integers uses the following

; Basic Transform:$Y\text{'} = 66 imes R + 129 imes G + 25 imes B$:$U = -38 imes R - 74 imes G + 112 imes B$:$V = 112 imes R - 94 imes G - 18 imes B$; Scale down to 8 bits with rounding:$Y\text{'} = \left(Y\text{'} + 128\right) >> 8$:$U = \left(U + 128\right) >> 8$:$V = \left(V + 128\right) >> 8$; Shift values:$Y\text{'} += 16$:$U += 128$:$V += 128$

Y' values are conventionally shifted and scaled to the range [16, 235] rather than using the full range of [0, 255] . This confusing practice derives from the MPEG standards and explains why 16 is added to Y' and why the Y' coefficients in the basic transform sum to 220 instead of 255. U and V values, which may be positive or negative, are shifted by 128 to make them always positive.

In 16-bit (modulo 65,536) arithmetic, we have

:$Y" = min\left(abs\left(r imes 2104 + g imes 4130 + b imes 802 + 4096 + 131072\right) >> 13, 235\right)$:$U = min\left(abs\left(r imes -1214 + g imes -2384 + b imes 3598 + 4096 + 1048576\right) >> 13, 240\right)$:$V = min\left(abs\left(r imes 3598 + g imes -3013 + b imes -585 + 4096 + 1048576\right) >> 13, 240\right)$ 16 bit Y'UV to RGB conversion formulae

:$r = min\left(\left(9535 imes \left(y - 16\right) + 13074 imes \left(v - 128\right)\right) >> 13, 255\right)$ :$g = min\left(\left(9535 imes \left(y - 16\right) - 6660 imes \left(v - 128\right) - 3203 imes \left(u - 128\right)\right) >> 13, 255\right)$:$b = min\left(\left(9535 imes \left(y - 16\right) + 16531 imes \left(u - 128\right)\right) >> 13, 255\right)$

Luminance/chrominance systems in general

The primary advantages of luminance/chrominance systems such as Y'UV, and its relatives Y'IQ and YDbDr, are that they remain compatible with black and white analog television (largely due to the work of Georges Valensi). The Y' channel saves nearly all the data recorded by black and white cameras, so it produces a signal suitable for reception on old monochrome displays. In this case, the U and V are simply discarded. If displaying color, all three channels are used, and the original RGB information can be decoded.

Another advantage of Y'UV is that some of the information can be discarded in order to reduce bandwidth. The human eye has fairly little color sensitivity: the accuracy of the brightness information of the luminance channel has far more impact on the image discerned than that of the other two. Understanding this human shortcoming, standards such as NTSC reduce the amount of data consumed by the chrominance channels considerably, leaving the brain to extrapolate much of the color. Therefore, the resulting U and V signals can be substantially compressed.

However, this color space conversion is lossy. When the NTSC standard was created in the 1950s this was not a real concern since the quality of the image was limited by the monitor equipment, not the compressed signal being received. However today's modern television is capable of displaying more information than is contained in these lossy signals. To keep pace with the abilities of new technology, attempts have been made to preserve more of the Y'UV signal while recording images, such as S-Video on VCRs.

Instead of Y'UV, Y'CbCr was used as the standard format for (digital) common video compression algorithms such as MPEG-2. Digital television and DVDs preserve their compressed video streams in the MPEG-2 format, which uses a full Y'CbCr color space. The professional CCIR 601 uncompressed digital video format also uses Y'CbCr, primarily for compatibility with previous analog video standards. This stream can be easily mixed into any output format needed.

Y'UV is not an absolute color space. It is a way of encoding RGB information, and the actual color displayed depends on the actual RGB colorants used to display the signal. Therefore a value expressed as Y'UV is only predictable if standard RGB colorants are used (i.e. a fixed set of primary chromaticities, or particular set of red, green, and blue).

Confusion with Y'CbCr

Y'UV is often and mistakenly used as the term for YCbCr. However, they are different formats. Y'UV is an analog system with scale factors different than the digital Y'CbCr system. [cite paper|url=http://www.poynton.com/papers/YUV_and_luminance_harmful.html
accessdate=2008-08-22
title=YUV and luminance considered harmful
date=1999-06-19
first=Charles
last=Poynton
]

In digital video/image systems, Y'CbCr is the most common way to express color in a way suitable for compression/transmission. The confusion stems from computer implementations and text-books erroneously using the term YUV where Y'CbCr would be correct.

Types of sampling

To get a digital signal, Y'UV images can be sampled in several different ways; see chroma subsampling.

Converting from Y'UV to RGB

The function [R, G, B] = Y'UV444toRGB888(Y', U, V) converts Y'UV format to simple RGB format and could be implemented using floating point arithmetic as:

Y'UV444

:$Y\text{'} = 0.299 imes R + 0.587 imes G + 0.114 imes B$:$U = -0.147 imes R - 0.289 imes G + 0.436 imes B$:$V = 0.615 imes R - 0.515 imes G - 0.100 imes B$

On older, non-SIMD architectures, floating point arithmetic is much slower than using fixed-point arithmetic, so an alternative formulation is:

:$C = Y\text{'} - 16$:$D = U - 128$:$E = V - 128$

Using the previous coefficients and noting that clip() denotes clipping a value to the range of 0 to 255, the following formulas provide the conversion from Y'UV to RGB:

:$R = clip\left(\left( 298 imes C + 409 imes E + 128\right) >> 8\right)$:$G = clip\left(\left( 298 imes C - 100 imes D - 208 imes E + 128\right) >> 8\right)$:$B = clip\left(\left( 298 imes C + 516 imes D + 128\right) >> 8\right)$

Y'UV422

: Input: Read 4 bytes of Y'UV (u, y1, v, y2 ): Output: Writes 6 bytes of RGB (R, G, B, R, G, B)

u = yuv [0] ; y1 = yuv [1] ; v = yuv [2] ; y2 = yuv [3] ;

Using this information it could be parsed as regular Y'UV444 format to get 2 RGB pixels info:

rgb1 = Y'UV444toRGB888(y1, u, v); rgb2 = Y'UV444toRGB888(y2, u, v);

Y'UV422 can also be expressed in Y'UY'2 FourCC format code. That means 2 pixels will be defined in each macropixel (four bytes) treated in the image.

Y'UV411

// Extract YUV components u = yuv [0] ; y1 = yuv [1] ; y2 = yuv [2] ; v = yuv [3] ; y3 = yuv [4] ; y4 = yuv [5] ;

rgb1 = Y'UV444toRGB888(y1, u, v); rgb2 = Y'UV444toRGB888(y2, u, v); rgb3 = Y'UV444toRGB888(y3, u, v); rgb4 = Y'UV444toRGB888(y4, u, v);

So the result is we are getting 4 RGB pixels values (4*3 bytes) from 6 bytes. This means reducing size of transferred data to half and with quite good loss of quality.

Y'UV420p (and Y'V12)

Y'UV420p is a planar format, meaning that the Y', U, and V values are grouped together instead of interspersed. The reason for this is that by grouping the U and V values together, the image becomes much more compressible. When given an array of an image in the Y'UV420p format, all the Y' values come first, followed by all the U values, followed finally by all the V values.

The Y'V12 format is essentially the same as Y'UV420p, but it has the U and V data reversed: the Y' values are followed by the V values, with the U values last. As long as care is taken to extract U and V values from the proper locations, both Y'UV420p and Y'V12 can be processed using the same algorithm.

As with most Y'UV formats, there are as many Y' values as there are pixels. Where X equals the height multiplied by the width, the first X indices in the array are Y' values that correspond to each individual pixel. However, there are only one fourth as many U and V values. The U and V values correspond to each 2 by 2 block of the image, meaning each U and V entry applies to four pixels. After the Y' values, the next X/4 indices are the U values for each 2 by 2 block, and the next X/4 indices after that are the V values that also apply to each 2 by 2 block.

Translating Y'UV420p to RGB is a rather involved process compared to the previous formats. Taking a 16 by 16 image for example, getting the RGB values for pixel (5, 7) where (0, 0) is the top left pixel would be done as follows. The character "/" implies integer division, meaning that if there is a remainder, it will be discarded.

Height = 16; Width = 16; Y'ArraySize = Height × Width; // (256) Y' = Array [7 × Width + 5] ; U = Array [(7/2) × (Width/2) + 5/2 + Y'ArraySize] ; V = Array [(7/2) × (Width/2) + 5/2 + Y'ArraySize + Y'ArraySize/4] ; RGB = Y'UV444toRGB888(Y', U, V);

As shown in the above image, the Y', U and V components in Y'UV420 are encoded separately in sequential blocks. A Y' value is stored for every pixel, followed by a U value for each 2×2 square block of pixels, and finally a V value for each 2×2 block. Corresponding Y', U and V values are shown using the same color in the diagram above. Read line-by-line as a byte stream from a device, the Y' block would be found at position 0, the U block at position x×y (6×4 = 24 in this example) and the V block at position x×y + (x×y)/4 (here, 6×4 + (6×4)/4 = 30).

Raw Y'CbCr streams are often stored in files with extension ".yuv". [http://www.tkn.tu-berlin.de/research/evalvid/cif.html Here] are some freely available examples for research purposes. These are simply a sequence of Y'CbCr frames serialized into a byte stream.

References

* [http://www.fourcc.org/fccyvrgb.php RGB/Y'UV Pixel Conversion]
* [http://www.fourcc.org/yuv.php Explanation of many different formats in the Y'UV family]
* Poynton, Charles. [http://www.poynton.com/Poynton-video-eng.html Video engineering]
* Kohn, Mike. [http://www.mikekohn.net/stuff/image_processing.php Y'UV422 to RGB using SSE/Assembly]

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• YUV — YUV,   ein Farbraum, der nicht drei Farbkomponenten wie beim RGB Farbmodell, sondern eine Helligkeitskomponente, die Luminanz, abgekürzt Y, und nur zwei Farbkomponenten (Chrominanz), nämlich U (Rot Cyan Balance) und V (Gelb Blau Balance)… …   Universal-Lexikon

• Yuv — may refer to:* CIE 1960 color space (images) * Y UV (video) …   Wikipedia

• YUV — Das YUV Farbmodell verwendet zur Darstellung der Farbinformation zwei Komponenten, die Luminanz (Lichtstärke pro Fläche) (luma) Y und die Chrominanz oder Farbanteil (chroma), wobei die Chrominanz wiederum aus zwei Komponenten U und V besteht. Die …   Deutsch Wikipedia

• YUV — Exemple d une plage U V, où Y = 0,5, représenté à l intérieur de la gamme de couleurs RVB ; en noir et blanc, seule Y est utilisée, toutes ces couleurs rendent donc le même gris …   Wikipédia en Français

• YUV — Ejemplo de plano de color U V , valor Y = 0.5, representado dentro de la gama de color RGB. Una imagen …   Wikipedia Español

• YUV — Фотография и ее YUV компоненты. YUV  цветовая модель, в которой цвет представляется как 3 компоненты  яркость (Y) и две цветоразностных (U и V). Конверсия в RGB и обратно осуществляется по следующим формулам: Для простой конверсии …   Википедия

• YUV — color components in SECAM and PAL color spaces (Computing » Hardware) ** Abekas YUV file Bitmap graphics (Computing » File Extensions) …   Abbreviations dictionary

• YUV — abbr. comp. YUV colour scheme …   Dictionary of English abbreviation

• YUV — Leuchtsignal Y, Farbdifferenzsignale U und V (PAL SECAM TV) …   Acronyms

• YUV — ● sg. adj. ►GRAPH Méthode de codage colorimétrique vidéo: Luminance (Y) Chrominance et Saturation (U V). Syn. de TSL. Existe en deux formats: packed , où les signaux sont regroupés pour chaque pixel, et planar , où luminance, chrominance et… …   Dictionnaire d'informatique francophone


text:
# Derivative of $\mathrm{tr}(X^\top A) A$

Let A be a constant matrix. Define $$Y:= \mathrm{tr}(X^\top A) A$$

I want to find \begin{align} \frac{\partial Y}{\partial X} \label{A} \end{align}

I know that $$\frac{\partial\,\mathrm{tr}(X^\top A)}{\partial X} = A \label{B}$$

Of course, I should be able to extend this to the case I want. But I am a bit confused as to how I should notate the result. What I did to find \eqref{A} was to vectorize both sides and then use the fact in \eqref{B}.

$$\mathrm{vec(Y)} = \mathrm{tr}(X^\top A)\mathrm{vec}(A)$$

I also knwo that I can write $$\mathrm{tr}(X^\top A) = \mathrm{vec}(A)^\top \mathrm{vec}(X)$$ So the desired the derivative should be $$\mathrm{vec}(A) \otimes \mathrm{vec}(A)$$ Is this correct?.

• The problem can be approached in either tensor or vector form \eqalign{&Y=(A\star A):X&\implies\,y=aa^Tx\cr &\frac{\partial Y}{\partial X}=(A\star A)&\implies\,\frac{\partial y}{\partial x}=aa^T}where $a={\rm vec}(A),\,x={\rm vec}(X),$ and $\star$ is the tensor product $${\mathcal A}=B\star C \implies {\mathcal A}_{ijkl}=B_{ij}C_{kl}$$ – greg Apr 29 '18 at 14:09

Let the entry-wise form of the matrices $A$, $X$ and $Y$ be \begin{align} A&=\left(a_{jk}\right)_{jk},\\ X&=\left(x_{jk}\right)_{jk},\\ Y&=\left(y_{jk}\right)_{jk}. \end{align} Then $Y=\text{tr}\left(X^{\top}A\right)A$ reads $$y_{jk}=\left(\sum_{i,r}x_{ir}a_{ir}\right)a_{jk}.$$
With this notation, \begin{align} \frac{\partial y_{jk}}{\partial x_{pq}}&=\frac{\partial}{\partial x_{pq}}\left[\left(\sum_{i,r}x_{ir}a_{ir}\right)a_{jk}\right]\\ &=\sum_{i,r}\frac{\partial x_{ir}}{\partial x_{pq}}a_{ir}a_{jk}\\ &=\sum_{i,r}\delta_{ip}\delta_{rq}a_{ir}a_{jk}\\ &=a_{pq}a_{jk}. \end{align} Thus if one regards $A$ as a tensor, one may write $$\frac{\partial Y}{\partial X}=A\otimes A.$$
Alternatively, one may use the differential form $${\rm d}y_{jk}=\left(\sum_{p,q}a_{pq}{\rm d}x_{pq}\right)a_{jk},$$ which, in its matrix form, reads $${\rm d}Y=\text{tr}\left(A^{\top}{\rm d}X\right)A.$$


text:
# Solution - Surface Areas and Volumes Examples and Solutions

Account
Register

Share

Books Shortlist
ConceptSurface Areas and Volumes Examples and Solutions

#### Question

Water is flowing at the rate of 2.52 km/h through a cylindrical pipe into a cylindrical tank, the radius of whose base is 40 cm. If the increase in the level of water in the tank, in half an hour is 3.15 m, find the internal diameter of the pipe.

#### Solution

You need to to view the solution
Is there an error in this question or solution?

#### Similar questions

A copper wire, 3 mm in diameter, is wound about a cylinder whose length is 12 cm, and diameter 10 cm, so as to cover the curved surface of the cylinder. Find the length and mass of the wire, assuming the density of copper to be 8.88 g per cm3.

view solution

To fill a swimming pool two pipes are to be used. If the pipe of larger diameter is used for 4 hours and the pipe of smaller diameter for 9 hours, only half the pool can be filled. Find, how long it would take for each pipe to fill the pool separately, if the pipe of smaller diameter takes 10 hours more than the pipe of larger diameter to fill the pool.

view solution

In Fig. 5, a tent is in the shape of a cylinder surmounted by a conical top of same diameter. If the height and diameter of cylindrical part are 2.1 m and 3 m respectively and the slant height of conical part is 2.8 m, find the cost of canvas needed to make the tent if the canvas is available at the rate of Rs. 500/sq. metre ( "Use "pi=22/7)

view solution

A solid metallic right circular cone 20 cm high and whose vertical angle is 60°, is cut into two parts at the middle of its height by a plane parallel to its base. If the frustum so obtained be drawn into a wire of diameter 1/12 cm, find the length of the wire.

view solution

In one fortnight of a given month, there was a rainfall of 10 cm in a river valley. If the area of the valley is 7280 km2, show that the total rainfall was approximately equivalent to the addition to the normal water of three rivers each 1072 km long, 75 m wide and 3 m deep.

view solution

S


text:
# Finding a differentiable function from (0,1) to (0,1) dominating (point wise) a given continuous function from (0,1) to (0,1)

Suppose we have a continuous function $f: (0,1) \to (0,1)$. Does there exist a differentiable function $\phi: (0,1) \to (0,1)$ such that $f(x) \leq \phi(x)$?

There does exist such a differentiable function if the function $f$ has finitely many non-differentiable points. Also this can be done if there exists an $\epsilon >0$, no matter how small, such that the function $f$ is differentiable in $(0,\epsilon)$.

Note that the real challenge lies in finding the differentiable function $\phi$ to be strictly less than one at the same time. This seems very much possible, at least pictorially. Because the graph of the function $f$ lies strictly below the $Y=1$ line. And hence one can draw a smooth curve between the graph of $f$ and the $Y=1$ line. But I can not prove it mathematically (rigorously). I need your help. Thanks in advance!

Pick monotonic sequences $a_n\to 0$ and $b_n\to 1$. Since $f$ is bounded away from $1$ on $[a_{n},b_{n}]$, you can readily find smooth (in fact constant) $\psi_n\colon[a_n,b_n]\to (0,1)$ that is differentiable and $\ge f$ on this interval. Now you can recursively glue together $\phi_n$ on $[a_{n},b_{n}]$ such that $\phi_n(x)=\phi_{n-1}(x)$ for $x\in[a_{n-2},b_{n-2}]$, $\psi_n(x)\ge\phi_n(x)\ge\phi_{n-1}(x)\setminus[a_{n-2},b_{n-2}]$ for $x\in[a_{n-1},b_{n-1}]$, $\phi_n(x)=\psi_n(x)$ for $x\in[a_{n1},b_{n1}]\setminus [a_{n-1},b_{n-1}]$. Finally let $\phi(x)=\phi_{n+1}(x)$ where $n$ is such that $x\in[a_{n},b_{n}]$.


text:
NeurIPS 2019
Sun Dec 8th through Sat the 14th, 2019 at Vancouver Convention Center
Paper ID: 3930 Toward a Characterization of Loss Functions for Distribution Learning

### Reviewer 1

The paper studied loss functions for distribution approximation. It define various properties and prove different Theorems that show some nice inequalities with respect to these properties. Yet, the main punchline in the paper is missing. Why these properties are really important? I would expect to see a real example where the analysis made in the paper helps with. This part is lacking in the paper. So it is not really clear what is the applicability of the derived results. Also the claim that only log-loss is used for learning distributions is not true. Unless I miss something, generative models are designed to learn distributions and they don't use only the log-loss. Where do they fit in the story? I think that giving them as an example and studying for example the earth moving distance and seeing what properties it gives etc. will make the paper stronger and clearer of why it is important. At the moment, it is far from clear to me.

### Reviewer 2

The paper is written on a good level and includes the ideas which allow to characterize the properties of loss-function for distribution learning on the finite discrete domain. Main such property is the calibration which allows to state several results on the size of sample size which ensures concentration of the empirical loss around true loss. However, there are some points, which to my mind should have been enlighted more in paper. Namely, for the case of log-loss function optimizing a loss-function with respect to measure $q$ is the same as minimizing the KL-divergence for given measure p and q - to choose. Authors only firstly mention this when considering the example of properness of the log-loss function. Results for the concentration sample size of the empirical loss function (provided restriction to calibrated distributions) are interesting, but, taking into account the folklore result on the log-loss sample complexity are not surprising. Several typos: line 137: will be are characterized line 138 : we will generally assume functions are differentiable. Efficient implementation strategy would be interesting to consider in the paper as well as the explicit procedure how we build the estimator $\hat{p}$. Is it the estimator based on the relative frequencies of occuring of each element? In this case what value should be considered for the elements which are in the domain but did not occure in the sample?

### Reviewer 3

Originality: This work is original; the idea of restricting to calibrated distributions and subsequently finding a condition to obtain properness is new AFAIK. Clarity: For readers somewhat familiar with the material surrounding the paper content, the paper is clear. The organization of the paper is good. All of the proofs I checked were correct, aside from typos/what I think are minor errors that do not affect the result. However, I think the example from lines 218 to 223 is incorrect, where the authors try to show an example where the linear loss is not calibrated sample proper. Significance: For me, this is the weak point of the paper. Firstly, I think Theorems 3,4 can be improved (see comments in contributions section). Second, though mathematically nice, the restriction to calibrated distributions seems potentially problematic. Knowledge of the set of calibrated distributions is essentially knowledge of the target distribution itself. Thus, it is unclear why properness under restriction to calibrated distributions is significant. However, there may be a way to simultaneously learn calibrated distributions and minimize a loss over currently learned calibrated distributions; if the authors show something like that, in my opinion it would be very significant (although that seems worthy of another paper). The note on constructing approximately calibrated distributions in the appendix is a step towards this, but is far from it. Quality: I would score 6 or 7 at the moment. Here is a list of errata/points to be clarified: - Line 137: "Our main results will be are" - Line 214: "Since it is not a proper loss function over \Delta_X, by definition it is not sample proper over \Delta_X for any m(\epsilon, \delta, N)." I don't follow this justification - Line 221: If q_x is equal to 0 for x=N/2 + 1,..., N, how is it calibrated w.r.t p_x, which is nonzero for x=N/2+1,...,N? Also, \sqrt{m} \pm 2\sqrt{m} seems off, and I do not know why there is a -\Theta(1/N). - Line 237: reasonable loss -> reasonable losses - Theorem 1 should probably say strictly concave function f - Line 301: for where -> where - Line 412: Equation underneath should have a minus sign instead of a plus sign - Derivation under line 438: I think the third line should have an 8 in the denominator, not a 4. Also, I don't think \epsilon \leq p(B) is generally true, since if p=[0,0,0,0,1/2,1/2], B={1,2,3,4,5,6}, then t(B) = 1/6, so \epsilon = \sum_i |p_i-1/6| = 4/3, but p(B) = 1. I think \epsilon \leq 2p(B) is true, which adds another factor of 2 to the denominator. With the previous change, there is a 16 in the denominator, which doesn't change the end result. - Line 457: parenthesis in subscript - Line 463: I think c_2^{1/(1-r)} should be in the denominator, not c_2^{r/(1-r)} - Line 466: What's the point of Bernstein's inequality here instead of the simpler Hoeffding's? - Line 474 derivation: Why is \sum_x p_x^{1-r} = N^r? (It is \leq N, which still lets the result go through) - Line 477 equation underneath: How do you get a net power of N^{r-2}? I get N^{2r-3} (which still lets the result go through) - Observation 1. in appendix E does not seem to be correct, as despite e^{-x} being nonnegative, twice differentiable, decreasing, and convex, e^{-1/x} is not concave on strictly positive reals. - For the proof of observation 2, casework seems unnecessary, and there is an extra minus sign under line 509. - Line 537: q_t should be q_x. Edit after response: I think the authors' fixed example works. Now the linear loss is not calibrated sample proper when m is o(N), which is still saying something since the authors give losses that are calibrated sample proper with m=O(polylog(ln N)). I buy that with constant probability, \hat p_1 \leq 1/4 - \Theta(1/sqrt{m}) and \hat p_2 \leq 1+ 1/4 + \Theta(1/\sqrt{m}), since with constant probability a pair of i.i.d. Gaussians are less than 1 sd below/greater than 1 sd above their mean, but a more rigorous argument should be used in the final version. On the calibration assumption, I think the authors clarifying that this work is currently more applicable to evaluating algorithm outputs than designing learning algorithms, and the references cited on designing calibrated prediction schemes are good justification for the work. It would still be nice to have a clearer link between this work and existing distribution learning algorithms. My final score is a strong 7.


text:
Fourier-Mukai transform for abelian varieties

Let $A$ be an abelian variety over $\mathbb{C}$, $L$ be a very ample line bundle on $A$, then the dual abelian variety is $\hat{A} \cong A/K(L)$ with $K(L)$ the kernel of surjective morphism $A \to Pic^0(A)$. Let $P$ be the Poincare sheaf on $A \times \hat{A}$. It is known that $\Phi_{A \to \hat{A}}^{P}$ (i.e.the Fourier-Muaki functor with kernel $P$ ) is a derived equivalence between $D^b(A)$ and $D^b(\hat{A})$.

Suppose $H \subseteq K(L)$ is a subgroup, and let $\tilde{A} = A/H$. Do we still have derived equivalence between $D^b(A)$ and $D^b(\tilde{A})$?

I feel that one could similarly define a Poincare sheaf $\tilde{P}$ on $A \times \tilde{A}$, but I am not sure if this gives the equivalence.

-
The Poincare bundle and the associated FM transform are independent of the polarization $L$. –  Piotr Achinger Dec 12 '13 at 20:48
This would imply that $D^b(A)= D^b(A')$ for any $A'$ isogenous to $A$, by taking a sufficiently large tensor power of $A$. That seems wrong, but I don't know a derived category invariant that would prove it. –  Will Sawin Dec 12 '13 at 22:29

No. As Will Sawin indicates, every finite subgroup $H$ of $A$ is contained in $K(L)$ for some very ample line bundle on $A$: indeed, let $L_1$ be your favorite very ample line bundle on $A$, and let $n = \# H$; then $H \subset A[n] \subset K(nL_1)$. Thus you are asking whether every abelian variety $B$ which is isogenous to $A$ is a Fourier-Mukai partner of $A$.

This is not true: in order for complex abelian varieties to be Fourier-Mukai partners, it is necessary but not sufficient that they be isogenous. Indeed, Proposition 5.1 of

MR1827500 (2002a:14017) Bridgeland, Tom Maciocia, Antony Complex surfaces with equivalent derived categories. Math. Z. 236 (2001), no. 4, 677–697.

shows that any complex abelian surface has only finitely many Fourier-Mukai partners. On the other hand, it is shown in

Hosono, Shinobu; Lian, Bong H.; Oguiso, Keiji; Yau, Shing-Tung Kummer structures on K3 surface: an old question of T. Shioda. Duke Math. J. 120 (2003), no. 3, 635–647.

that for every positive integer $n$, there is a complex abelian surface having precisely $n$ Fourier-Mukai partners. Via Hodge theory the question is reduced to the study of positive definite integral quadratic forms....which is quite nontrivial and interesting in its own right, of course.

-
Thank you! May I ask one more question: If $H \subset A$ is a finite group, does there always exist an ample line bundle $L$ on $A$, such that $K(L) \cong H$? –  Li Yutong Dec 13 '13 at 3:40
No, because $A/K(L) \cong A^{\vee}$, whereas for "most" finite subgroups $H$ of $A$, $A/H$ is not isomorphic to $A^{\vee}$. For instance, if $A$ is an elliptic curve without complex multiplication and $H$ has squarefree order $n > 1$, then $A/H$ cannot be isomorphic to $A$ since $A$ has no endomorphisms of order $n$. –  Pete L. Clark Dec 13 '13 at 4:46