text:
Endofunctors of CRing which give schemes when composed with schemes? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-20T02:42:24Z http://mathoverflow.net/feeds/question/13251 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/13251/endofunctors-of-cring-which-give-schemes-when-composed-with-schemes Endofunctors of CRing which give schemes when composed with schemes? Steven Gubkin 2010-01-28T12:14:46Z 2010-07-22T02:52:01Z
Background

Yet another homework inspired question: A scheme is reduced if no section of the structure sheaf is nilpotent. To every scheme $X$ there is a scheme $X_{red}$ and a morphism $i: X_{red} \rightarrow X$ such that every morphism from a reduced scheme into $X$ factors through $X_{red}$. Hartshorne Ex. 2.2.6 guides you through the construction of this scheme. Basically you leave the topological space alone, but you mod out the nilpotents in the structure sheaf. This gives you a presheaf, which you then sheafify to get the structure sheaf of $X_{red}$.

I have been trying to run through all of the constructions in Hartshorne from a functor of points perspective in addition to the "standard" approach, so naturally I was interested in seeing this construction as well.

From this perspective $X$ is a functor $CRing \rightarrow Sets$, namely $Hom(Spec(-),X)$ if you were using the standard definition of schemes. The functor from $F: CRing \rightarrow CRing$ taking $A$ to $A/nil(A)$ seems relevant here, so it seems natural to ask if $X \circ F: CRing \rightarrow Sets$ is the reduced scheme associated to $X$. I won't spell out the details, but this actually turns out to be true (I think at least!). This brings me to my questions.

Questions

Did I mess up, or does the construction above pan out?

Is there a nice characterization of the functors $CRing \rightarrow Cring$ which will give a scheme when composed with any scheme $CRing \rightarrow Sets$?

Even if there is no simple characterization of all such functors, is there a large class of such functors which is nice?

Do you have any other examples of standard constructions in algebraic geometry which are of this form?
 http://mathoverflow.net/questions/13251/endofunctors-of-cring-which-give-schemes-when-composed-with-schemes/13255#13255 Answer by YBL for Endofunctors of CRing which give schemes when composed with schemes? YBL 2010-01-28T13:01:28Z 2010-01-28T13:01:28Z
Actually $X$ is identified with the covriant functor $CRing \to Sets$ $A\mapsto Hom(Spec(A),X)$.

The functor $X\circ F$ is usually called the de Rham space of $X$. This is not the reduced scheme associated to $X$ because you mod out by nilpotents on the source instead of $X$: for $X=Sepc(B)$ you get $Hom(Spec(A);Spec(B)\circ F) = Hom(B,A/nil(A))$ instead $Hom(Spec(A);Spec(B)_red) = Hom(B/nil(B),A)$.
 http://mathoverflow.net/questions/13251/endofunctors-of-cring-which-give-schemes-when-composed-with-schemes/13962#13962 Answer by James Borger for Endofunctors of CRing which give schemes when composed with schemes? James Borger 2010-02-03T11:57:35Z 2010-07-22T02:52:01Z
Here is a nontrivial example I like. Let $W:\mathrm{Rings}\to\mathrm{Rings}$ denote the Witt vector functor of some fixed finite length. (You can consider the $p$-typical Witt vectors, for some prime $p$, but everything works with the other standard flavors.) Then the functor $W_*(-)=-\circ W$ is an endofunctor of the category of functors $\mathrm{Rings}\to\mathrm{Sets}$, and it takes schemes to schemes. The scheme $W_*(X)=X\circ W$ is the so-called arithmetic jet space of $X$, extensively studied by Buium in the case of $p$-adic formal schemes. The fiber over $p$ is the Greenberg transform.

There is a standard method for proving $W_*$ takes schemes to schemes (or rather for proving almost that), though it probably doesn't work for every functor $F:\mathrm{Rings}\to\mathrm{Rings}$ such that $F_*$ takes schemes to schemes. First you show that the category of sheaves of sets on the category of affine schemes w.r.t. the etale topology is stable under $W_*$. This is true since $W$ takes etale covers of rings to the same and also takes cocartesian squares of etale rings maps to the same. (These properties of $W$ are not obvious.) Then you show $W_*$ takes sheaf epimorphisms to the same, and etale maps of sheaves to the same. (These properties are much easier.) Therefore any etale equivalence relation on an affine scheme is sent to an etale equivalence relation on an affine scheme, and the quotient of the first is sent to the quotient of the second. Therefore the category of quasi-compact quasi-separated algebraic spaces is stable under $W_*$. I have no doubt you could find reasonable abstract properties on the endofunctor $W$ of Rings that allow this argument to go through.

Showing $W_*$ takes schemes to schemes is a bit subtler. You have to deal with quasi-compactness issues (as a right adjoint, $W_*$ doesn't necessarily behave well w.r.t. disjoint unions) and also the fact that it's harder to tell whether a functor is represented by a scheme than by an algebraic space. But as I said, in the Witt vector example above, it is true.

Presumably the same argument works, and is much easier, for the functor $F$ defined by $F(R)=R[t]/(t^{n+1})$. Then $F_*(X)$ should be the usual jet space functor of length $n$. The case $n=1$ should give the total space of the tangent bundle, at least when $X$ is smooth.

Edit: I'm reminded below that this example is just a particular case of the representability of the Weil restriction of scalars for a finite flat map $A\to B$. There you consider the endofunctor of the category of $A$-algebras given by $F(R)=B\otimes_A R$. In particular, it's reasonable to view $W_*$ as a generalized Weil resitrction of scalars.
 http://mathoverflow.net/questions/13251/endofunctors-of-cring-which-give-schemes-when-composed-with-schemes/32876#32876 Answer by Martin Brandenburg for Endofunctors of CRing which give schemes when composed with schemes? Martin Brandenburg 2010-07-22T01:18:04Z 2010-07-22T01:18:04Z
It seems to me that you want to get the functor $X \mapsto X_{red}$ (schemes) from a "functor of points"-approach out of the functor $A \to A_{red}$ (rings). This is not possible in a simple formal way (see VBL's answer), but the concept may be generalized as follows:

Let $P$ be a full subcategory of $Ring$, which is local in the sense that for every partition of unity of a ring $A=(f_1,...,f_n)$, all the localizations $A_{f_i}$ belong to $P$ if and only if $A$ belongs to $P$. Now you can endow $P$ with the Zariski topology and define $P$-schemes as sheaves on $P$, which are covered by representable ones. Let $Sch_P$ denote the category of $P$-schemes.

My point is: If $P$ is a reflective subcategory of $Ring$, then also $Sch_P$ is a reflective subcategory of $Sch$. If $F : Ring \to P$ is a retraction, then we may extend this retraction on representable functors and then, by gluing, to $Sch \to Sch_P$.

Of course, you could also formulate this construction in the language of affine schemes or locally ringed spaces. I don't think that this matters here. The functor of points approach does not help you to extend a retraction $Ring \to P$ to $Sch \to Sch_P$ in a formal way, gluing is necessary. In particular, the construction of the reduced scheme structure does have nothing to do with precomposing endofunctors of rings.

format: plain


text:
## [library] bump.lua v3.1.4 - Collision Detection

kikito
Inner party member
Posts: 3142
Joined: Sat Oct 03, 2009 5:22 pm
Contact:

### Re: [library] bump.lua v3.1.4 - Collision Detection

To solve it I just let the resolveCollision method return the new x and y position and I use them as newx and newy instead of wx, wy. It works but I hate the way it is done... I would love to hear some better ideas from you guys..
Well the only thing I can say is that the code seems a bit "involved" - there's lots of indirection - and maybe that's on me because there's certainly a bit of indirection in the bump demo as well. But you are adding lots of extra conditionals that make the code difficult to read, without adding much value. That makes finding bugs like this difficult.

Here's an example:

Code: Select all

if self.collidable then newx, newy = self:processCollisions(newx, newy) end

My suggestion would be adding a processCollisions method to Object, which by default would do nothing:

Code: Select all

function Object:processCollisions(x,y)
return x,y
end
That way you can remove that previous conditional and just do:

Code: Select all

newx, newy = self:processCollisions(newx, newy)
Another one:

Code: Select all

if len > 0 then
for i=1, #cols do ...
else
self.onGround = false
end
The whole point of that conditional is setting the onGround variable when the length is 0. So do that directly instead, and avoid the extra conditional:

Code: Select all

self.onGround = len > 0
Finally, this one:

Code: Select all

local other = cols[i].other
if self.resolveCollision and other.collidable then
self:resolveCollision(other)
end
You can add an empty resolveCollision to Object. And the collidable should be checked on the filter instead of afterwards. This will allow you to remove the if, and will be faster, since some collisions will be skipped and won't need to be calculated. And since you only have one instance of other now, you can use it directly. So those 4 lines could become just one:

Code: Select all

self:resolveCollision(cols[i].other)
In addition to this, once a teleport is detected you probably want to skip the rest of the collisions anyway. So one possible option is changing self.resolveCollision to "immediately return" when there has been a teleport. So if you make resolveCollisions return x and y only when there has been a teleport, you can exit the processCollision function right there. Here's the code after all the changes:

Code: Select all

Object:processCollisions(goalx, goaly)
local wx, wy, cols, len = self.collisionWorld:move(self, goalx, goaly, self.filter)
self.onGround = self.len > 0

for i=1, #cols do
local rx,ry = self.resolveCollision(cols[i].other)
if rx then return rx, ry end
end

return wx, wy
end

Jasoco wrote:
Thu Aug 31, 2017 7:27 pm
I've always had problems teleporting a Bump object so I just remove the object before changing the coordinates then recreate it when it gets to the new location.
A couple things: first, world:move uses world:update internally, so even if you only use move, you are still using update anyway. Second, what update does is equivalent to removing the object and recreating it. It just optimizes the case in which the object has not moved at all, or has moved so little that it is in the same cell group. So even if what you do works, it's bound to be a bit slower than using update. But whatever floats your boat
When I write def I mean function.

Party member
Posts: 490
Joined: Fri May 03, 2013 6:42 pm
Location: Germany

### Re: [library] bump.lua v3.1.4 - Collision Detection

thanks for your help, I appreciate it.

Code: Select all

self.onGround = len > 0

Im now working so long with löve but I still wasnt aware that this is a thing I could do. Shame on me and my if else constructs.

kikito
Inner party member
Posts: 3142
Joined: Sat Oct 03, 2009 5:22 pm
Contact:

### Re: [library] bump.lua v3.1.4 - Collision Detection

Fri Sep 01, 2017 4:03 am
thanks for your help, I appreciate it.
You were a bit lucky Lots of other things fight for my limited free time, and reviewing other peoples's code takes a lot of it, so I can't do it often. But I know it helps individuals. And those ifs really jumped at me.

Just so you know, this technique of "removing conditionals and just calling object methods" has a name: "Tell, don't ask", in case you want to expand your knowledge on it.
Fri Sep 01, 2017 4:03 am
Shame on me and my if else constructs.
No shame! No one is born knowing everything. I also had to learn all this, and there's still a bunch of stuff I don't know.
When I write def I mean function.

BörnedByLOVE
Prole
Posts: 9
Joined: Wed Aug 16, 2017 9:56 pm

### Re: [library] bump.lua v3.1.4 - Collision Detection

Hi kikito, hi everybody!
I found out about LÖVE this summer and worked through Sheepolutions excellent tutorials, which I highly recommend as a starting point in Lua/LÖVE. (There is one about collisions which was a real eye-opener for me. )
I had some basic experience in scripting coming from python, putting together some textbased scripts for personal use. That helped and I had the feeling that I made faster progress in Lua/LÖVE in weeks and months than in Python/Pygame in years.

Then I felt ready for new adventures, and here I am willing to learn the usage of bump.lua.
(Necessary introduction, because after working through this thread I feel like the dumbest person here so far. So, run for the hills, dummy alarm!)

But anyway: After reading a lot and tinkering a lot I was able to copy and paste and write together my first working little bump-snippet!
(Two rects, one moves with arrow keys, one moves with WASD, and both can collide.)
There it is, at the bottom of the post, perhaps some starters like me will find it useful.

So, the basic usage of bump.lua (as I understand it so far):
-----------------------------------------------------------------------------
Step 1: At the beginning of your script, require the library.
Step 2: In love.load(): Build a bump-world
Step 3: In love.load(): Build some objects and add them to the bump-world.
Step 4: In love.update(): Use the built-in methods, especially move.
----- >a) Write your code as if you would move stuff conventionally.
----- >b) Give those x- and y-variables to bump.lua.
----- >c) Get them back from bump.lua.
----- >d) Use them in your code.
Step 5: In love.draw(): Draw your stuff.

If you get all this working, in case of a collision, bump.lua gives you the Slide response for free!
You can build some environment for your player, it doesnt float throught foggy limbo anymore, but hits walls and ground. Great, if you get this working for the first time! (Like me.)
So far so good... Problems start in the next post.
Attachments
my-first-simple-collision-test.love

BörnedByLOVE
Prole
Posts: 9
Joined: Wed Aug 16, 2017 9:56 pm

### Re: [library] bump.lua v3.1.4 - Collision Detection

As a next step I wanted to build three snippets as basic examples for the other three types of collision response:
cross, touch, bounce.
- I started with touch.

The idea was: You have a yellow arrow coming in from the left, hitting a blue wall on the right.
(Does it get stuck? Or can you move it afterwards? I found no answer in the docs, but I wanted to try out.)

But soon I had to give up and here I am. At the bottom, there is the code so far.

Although I studied the docs on github and this forum thread, I do not fully understand the filter function and how to handle it.
• How do I construct the filter function so that it produces a collision table? (Sorry, the explanation in the docs is to abstract for me...)
• How do I extract the touch (or cross or bump) "identity" of the collision object from the cols table?

Code: Select all

if other == walls
Does not work, because other is no string.

Code: Select all

A.isWall = true -- inside of the A-table
Does not work either.

I know: I have to sharpen my Lua-skills. I need more coding experience. But it would be so nice to know now, anyway!
Help appreciated! (As Number 5 said: INPUT! I need INPUT!")
Attachments
touch-behaviour-test.love


text:
# How far can mains voltage arc in air?

I wondered this while soldering a mains voltage circuit board and was surprised by how close together the traces were. It has obvious implications in design of electrical plugs, and the proximity of wires when doing anything to do with mains voltage.

I've tried asking search engines sensible questions like "how far can 240V arc at 1 atmosphere" and "how far can electricity jump" but I haven't found any easy answer. This calculator states that it only takes voltages between 400 and 3000VDC.

By asking this question, I hope future people will be able to find the answer quickly and simply.

My research suggests that the arcing distance is dependant on the medium and the pressure, so let's assume air (~79% nitrogen, ~20% oxygen, ~1% argon and a few other things) at 1 atmosphere or 1.01325 Bar.
An answer has also drawn my attention to the affect of temperature and humidity. Assuming that higher temperatures and higher humidities both increase the possible arcing distance, let's choose something harsh like 40 degrees Celsius and 95% humidity.

Given a mains voltage of 230VAC in the UK, how close would two uninsulated copper wires (as an example) need to be before an arc could form between them?

Is this different for traces on a circuit board, or pins in a plug?

For bonus points, could answers be given for 120VAC too? Would 240V arc significantly farther than 230V? How about 110V compared to 120V?

I'm looking for fairly concise answers, but perhaps the reason I haven't found a simple answer is because there isn't one...

This question is just out of curiosity. I'm not going to start rewiring mains fixtures or designing 240V circuit boards any time soon.

• Somebody once told me, as a general rule of thumb, on earth every 1000volts is 1mm .. – Piotr Kula Apr 25 '17 at 12:27
• @ppumkin: so given a linear scale, that would mean 240V could arc about 0.24mm through air, but no answer has given this figure yet. – M_M Apr 25 '17 at 12:31
• Under ideal conditions probably. But the problem is to start the arc'ing process, since if there is a less resistive route, like a PCB trace the chances of arc'ing are less likely. If there is no other route and electrons are getting crammed up on the PCB route they could possibly micro'arc at these conditions. But PCB insulation is another barrier(since insulation does not count as air gap anymore). How far apart are these PCB traces you talking about? and what voltage is going in there. – Piotr Kula Apr 25 '17 at 12:38

The breakdown voltage of air varies significantly due to changes in humidity, pressure, and temperature. However, a rough guide is that it takes 1 kV per millimeter.

Since that's about where arcs happen, you want to be nowhere near that in a real circuit. On a circuit board, you also have to consider conduction along the surface. This is why you often see talk of clearance and creapage in the same discussion.

Clearance is the straightest path between two conductors. This is where the rough guide of 1 kV/mm for arcing applies.

Creapage is the shortest distance between to conductors along a surface. The breakdown gradient for creapage is lower than for clearance since dirt can accumulate on surfaces. Some dirt is partially conductive on its own, but many things can provide leakage paths after soaking up some humidity. Take a look at specs for medical power supplies, for example, and you'll see large minimum creapage requirements to guarantee low leakage currents.

There are various safety standards out there that require minimum clearance and creapage distances according to application, voltage, and sometimes environmental parameters. For most ordinary consumer equipment, 5 mm clearance is good enough isolation between user-touchable parts and 120 V AC power. However, you really should look at the relevant standards, especially if you are doing something out of the ordinary.

• I've repeatedly read DRY AIR arcs between smooth flat plates at 3,000 volts per millimeter. – analogsystemsrf Apr 21 '17 at 12:08
• Maybe note that coating and potting can reduce the required distances by quite a bit. Coating can sometimes be hard to spot for someone not familiar with the topic, so distances might seem awfully close. – Arsenal Apr 21 '17 at 14:20
• Thanks for your informative answer. The information on creepage is very interesting, and I can see how it deserves consideration when putting traces on a circuit board. Though it was the traces that got me thinking, the question is really about arcing through air (Given a mains voltage of 230VAC in the UK, how close would two uninsulated copper wires [...] need to be before an arc could form between them?). Assuming that a higher temperature and higher humidity both increase the distance, let's choose a fairly harsh example like 40 degrees Celsius and 95% humidity. I'll edit the question. – M_M Apr 25 '17 at 12:27

Given a mains voltage of 230VAC in the UK, how close would two uninsulated copper wires (as an example) need to be before an arc could form between them?

The answer is: it depends. There are a variety of factors including air, pressure\elevation, humidity, and dirt from the environment all affect the distance that an arc can form between two conductors.

International standards boards (namely IPC, and IEC) have come up with minimum distances between insulated conductors. Uninsulated conductors are not safe for use in products so those distances are not provided. Uninsulated conductors in PCB's or connectors are covered in the clearance section of the table. These specs are to prevent arcing or any kind of fire hazard. It should also be noted that to view the actual specs you'll need to buy them from IEC (like IEC 61010-1), but there is a lot of information regarding the content of these specifications available on the web.

It should also be noted that the distance changes depending on the environment (pollution degree), an environment that sees more dirt/humidity will have a shorter spacing. The distances in the table above are for a pollution degree 2 which would probably cover most designs, if not, find a table (or buy the spec) for the pollution degree your designing for.

Is this different for traces on a circuit board, or pins in a plug?

Yes. In the first table, the distance essentially doubles for off PCB conductors.

For bonus points, could answers be given for 120VAC too? Would 240V arc significantly farther than 230V? How about 110V compared to 120V?

In the table above, if only designing for 120V the distance is shorter.

The minimum voltage required to initiate an electrical arc in gas is described by Paschen's Law.

At large gaps it depends roughly linearly on distance, and also depends on the composition, temperature and pressure of the gas. For air at standard temperature and pressure it's about 3.3MV/m. As the gap gets very small the voltage to create a spark actually increases again. The spark is caused by free electrons that are accelerated by the voltage knocking other electrons off air molecules. If the gap is too small they can't get enough of a run up to knock off another electron before hitting the positive electrode. This means that there's a minimum sparking voltage of 327V at 7.5µm in normal air.

240VAC has a peak voltage of ~340V, so you might be able to get it to briefly spark near the peak with a gap close to 7.5µm. 120VAC won't spark in air.

In the real world there can be transient overvoltages, contaminants, condensation, etc. You shouldn't rely on the above for safety purposes.

• It hasn't been mentioned by anyone yet, but would a point discharge be easier to start on, for example, the point of a stray strand of wire given the same distance as a smooth conductor? This is the principle of operation of the lightning rod where electrical stress is concentrated at the tip. – Transistor Aug 21 '18 at 14:57
• Paschen's Law is for uniform fields, and field strengths are indeed greater on surfaces with a small radius of curvature. I don't know of an easy way to calculate the breakdown voltage in a nonuniform field, but the same physical effects that cause the minimum will still apply. On a practical level, even a sewing needle has a tip that's 10s of µm across, so the field between two needles separated by 7.5µm will still be fairly uniform. I expect that you'd need something really unusually sharp to strongly affect the minimum voltage. – patstew Aug 21 '18 at 16:25


text:
# SSfpl

0th

Percentile

##### Self-Starting Nls Four-Parameter Logistic Model

This selfStart model evaluates the four-parameter logistic function and its gradient. It has an initial attribute that will evaluate initial estimates of the parameters A, B, xmid, and scal for a given set of data.

Keywords
models
##### Usage
SSfpl(input, A, B, xmid, scal)
##### Arguments
input
a numeric vector of values at which to evaluate the model.
A
a numeric parameter representing the horizontal asymptote on the left side (very small values of input).
B
a numeric parameter representing the horizontal asymptote on the right side (very large values of input).
xmid
a numeric parameter representing the input value at the inflection point of the curve. The value of SSfpl will be midway between A and B at xmid.
scal
a numeric scale parameter on the input axis.
##### Value

a numeric vector of the same length as input. It is the value of the expression A+(B-A)/(1+exp((xmid-input)/scal)). If all of the arguments A, B, xmid, and scal are names of objects, the gradient matrix with respect to these names is attached as an attribute named gradient.

nls, selfStart
library(stats) Chick.1 <- ChickWeight[ChickWeight$Chick == 1, ] SSfpl(Chick.1$Time, 13, 368, 14, 6) # response only A <- 13; B <- 368; xmid <- 14; scal <- 6 SSfpl(Chick.1\$Time, A, B, xmid, scal) # response and gradient print(getInitial(weight ~ SSfpl(Time, A, B, xmid, scal), data = Chick.1), digits = 5) ## Initial values are in fact the converged values fm1 <- nls(weight ~ SSfpl(Time, A, B, xmid, scal), data = Chick.1) summary(fm1)


text:
# Birth and death rates of roaches.

1. Jan 19, 2014

### cp255

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

Consider a population model in which the birth and death rates and  of a cockroach
population P are both proportional to sqrt(P). (Recall that in a “normal” exponential growth
model, B and  D are constants.) If the cockroach population has increased from 100 to 400
in one week, what will the population be in another week? Is this model reasonable?

2. Relevant equations

3. The attempt at a solution

So I am not sure exactly how to model this. Here is my attempt but I think it is wrong since there are too many unknowns for the information given.

B = k*sqrt(P)
D = w*sqrt(P)

Where B is the birth rate, D is the death rate, and they are both equal to different constants multiplied by the square root of P.

So here is the differential equation I cam up with...
dP/dt = (k*sqrt(P) - w*sqrt(P))P

However I think there are too many unknowns for the information given.

2. Jan 20, 2014

### Office_Shredder

Staff Emeritus
If you do a little algebra
$$\frac{dP}{dt} = (k-w) P^{3/2}$$
Now it doesn't matter what k and w are, just what k-w is. So you really only have one unknown that matters.


text:
# MechaTechnica

Introduction
While C++ 11 borrowed a lot of the implementation from boost.thread, several important differences exist between the two. This article shows the differences between the two implementations and the pitfalls you should avoid.

A quick mention about the lifetime of a thread object and thread execution is necessary.

First, when a thread is started, two possibilities exist:
1. The thread is finished before join() is called- in this case, the executing thread will no longer exist; however, its object could still be alive
2. The thread object will cease to exist before the thread execution ends- in this case, the thread will continue executing even if its object is deleted
Therefore, it is important to realize the difference between the thread object and the thread that is executing. The thread object is simply a wrapper to the operating system calls that will eventually take place. Do not worry about memory leaks if the thread object is deleted before the thread execution ends.

Simply, ensure that your executing thread is 'thread safe'; that is:
• The executing thread deals with race conditions 'properly'
• There are no deadlocks
If the thread object is deleted before the thread execution is finished, the thread becomes "detached". This means, there is no way to synchronize with your main() thread.

Auto Join vs Manual Join
I would like to just point one of the minor differences between C++ 11 and Boost. Examine the following C++ 11 code:
#include<iostream>

using namespace std;

void my_func()
{
cout<<"executing: "<<__FUNCTION__<<endl;
}

int main()
{
//you must call join; this program will throw an exception and terminate() will be called
//t.join();
return 0;
}
The code above will throw an exception when you run it. Unlike Boost, you must call join() in C++ 11. Why? Because the C++ committee agreed that auto-joining a join-able thread inside the destructor could lead to a very difficult to debug program, so they make you the programmer, join the thread explicitly.

Create and forget threads
Lets just say you are interested in creating a thread and you don't care about when it will join.

Here's how we would do this in C++ 11:
#include<iostream>
#include<condition_variable>

std::mutex m;
std::condition_variable cv;

void my_func()
{
std::cout<<"executing: "<<__FUNCTION__<<std::endl;
std::cout<<"We have "<<std::thread::hardware_concurrency()<<" cores availble to go crazy with threads"<<std::endl;
std::cout<<"sleeping "<<2000<<" milliseconds before signaling main"<<std::endl;
cv.notify_one(); //signal the main thread to proceed
}

int main()
{
std::thread(my_func).detach(); //no need for join any more
//but now we risk exiting the program before the thread is finished
std::unique_lock<std::mutex> lk(m);
cv.wait(lk);
std::cout<<"Main thread exit: "<<std::endl;
return 0;
}
In the above code, we notice we have no handle to our thread object and thus cannot call join(). The immediate problem we face now is a race condition. Will main finish before or after our thread? Luckily, we have condition_variable in C++ 11.

Therefore, we:
• Start the thread my_func
• Main blocks and waits for my my_func to signal
• my_func signals and main proceeds exiting normally
Difference between C++ thread and boost thread
A few years ago we could highlight several differences between boost.thread and C++ 11 threads. Between 2011 and 2014, Boost.Thread class has been modified to be similar to the standard. We can find very little differences if we compare the two [4][5]. Indeed, it seem the reverse has happened, C++ 11 has influenced changes in Boost.

Choosing between Boost and C++ 11 threads in a production environment
Not all compilers support C++ 11. After all, its far easier to use std::thread than including the entire boost library in your repositories; plus, those would have to be updated every once in while. For those compilers that only support Boost, you might be wondering:
• Could I install Boost.Thread only and not the entire boost package? Answer yes. You can choose with features of Boost to install and if you want just threads, you get just threads
• Do I have to link statically or dynamically with Boost? Answer both are available. You can choose to link statically or dynamically. With Boost, you can build static or dynamic libraries during installation
• Are there any performance differences? Answer no. They both should compare equally in performance timings. I personally have not seen any differences between the two
• Will there be major refactoring if my compiler support C++ 11 in the future and I decide to switch to it? Answer not really. Going back to the earlier discussion, a lot of effort has been put in Boost to make it similar to C++ 11 so refactoring would be minimal at best
Conclusion

References
[2] http://www.justsoftwaresolutions.co.uk/files/designing_mt_programs.pdf


text:
## Weighted composition operators between Bloch-type spaces.(English)Zbl 1042.47018

For analytic functions $$u$$ on the unit disk $$D$$ and analytic mappings $$\phi: D \to D$$, the weighted composition operator $$uC_\phi$$ is defined by $$uC_\phi(f) = u(f \circ \phi)$$ for $$f$$ analytic on $$D$$. In the paper under review, the authors consider these operators acting on the weighted Bloch-type spaces $$\mathbb B^\alpha$$ and $$\mathbb B^\alpha_0$$, $$0 < \alpha < \infty$$, defined by $\mathbb B^\alpha = \{f \in H(D): \sup_{z\in D} (1 -| z| ^2)^\alpha | f'(z)| < \infty\}$ and $\mathbb B^\alpha_0 =\{f \in \mathbb B^\alpha : \lim_{| z| \to 1} (1 - | z| ^2)^\alpha | f'(z)| = 0\}.$ The main results completely characterize boundedness and compactness of $$uC_\phi$$ from $$\mathbb B^\alpha$$ to $$\mathbb B^\beta$$ as well as from $$\mathbb B^\alpha_0$$ to $$\mathbb B^\beta_0$$. Finally, the authors give some examples of functions $$u$$ and $$\phi$$ for which $$uC_\phi$$ between the various spaces is bounded, compact or noncompact. Similar results were obtained by M. D. Contreras and A. G. Hernandez-Diaz [J. Aust. Math. Soc., Ser. A 69, 41–60 (2000; Zbl 0990.47018)] and A. Montes-Rodríguez [J. Lond. Math. Soc., II. Ser. 61, 872–884 (2000; Zbl 0959.47016)].

### MSC:

 47B33 Linear composition operators 30D45 Normal functions of one complex variable, normal families 30H05 Spaces of bounded analytic functions of one complex variable

### Citations:

Zbl 0990.47018; Zbl 0959.47016
Full Text:

### References:

 [1] J. Arazy, Multipliers of Bloch functions , University of Haifa Publication Series 54 , 1982. [2] L. Brown and A.L. Shields, Multipliers and cyclic vectors in the Bloch space , Michigan Math. J. 38 (1991), 141-146. · Zbl 0749.30023 [3] P.L. Duren, Theory of $$H^p$$ spaces , Academic Press, New York, 1970. · Zbl 0215.20203 [4] G.H. Hardy and J.E. Littlewood, Some properties of fractional integrals II, Math. Z. 34 (1932), 403-439. · Zbl 0003.15601 [5] K.M. Madigan, Composition operators on analytic Lipschitz spaces , Proc. Amer. Math. Soc. 119 (1993), 465-473. JSTOR: · Zbl 0793.47037 [6] K.M. Madigan and A. Matheson, Compact composition operators on the Bloch space , Trans. Amer. Math. Soc. 347 (1995), 2679-2687. JSTOR: · Zbl 0826.47023 [7] S. Ohno and R. Zhao, Weighted composition operators on the Bloch space , Bull. Austral. Math. Soc., 63 (2001), 177-185. · Zbl 0985.47022 [8] R.C. Roan, Composition operators on a space of Lipschitz functions , Rocky Mountain J. Math. 10 (1980), 371-379. · Zbl 0433.46023 [9] J.H. Shapiro, Composition operators and classical function theory , Springer-Verlag, New York, 1993. · Zbl 0791.30033 [10] J. Xiao, Composition operators associated with Block-type spaces , Complex Variables Theory Appl. 46 (2001), 109-121. · Zbl 1044.47020 [11] K.H. Zhu, Operator theory on function spaces , Marcel Dekker, New York, 1990. · Zbl 0706.47019 [12] ——–, Bloch type spaces of analytic functions , Rocky Mountain J. Math. 23 (1993), 1143-1177. · Zbl 0787.30019
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# [luatex] small script to change initial letter forms

Pablo Rodríguez oinos at web.de
Tue Jan 31 22:47:43 CET 2012

```On 01/31/2012 07:59 AM, Paul Isambert wrote:
> Pablo Rodríguez <oinos at web.de> a écrit:
>> [...]
>> Thanks for the reply, Paul.
>>
>> I'm afraid that the feature file might be easy to create, but in order
>> to make use of it you have to edit the font files (not allowed by
>> copyright law [digital fonts are protected as computer programs).
>
> Patrick has answered to that, and I suppose you will be following that
> road (if you manage to do it in ConTeXt, and I can't see why you
> wouldn't).

Thank you very much for your help, Paul.

Just for the record, the ConTeXt command is the following:

\definefontfeature[default][default][script=latn,featurefile={myligs.fea}]

Another question would be to generate a feature file that works with
initial and medial/final glyphs. (I wrote one, but it doesn't work ;-))

I guess this is a question for another mailing list.


text:
Article

# A general scaling law reveals why the largest animals are not the fastest

• Nature Ecology & Evolution 111161122 (2017)
• doi:10.1038/s41559-017-0241-4
Accepted:
Published online:

## Abstract

Speed is the fundamental constraint on animal movement, yet there is no general consensus on the determinants of maximum speed itself. Here, we provide a general scaling model of maximum speed with body mass, which holds across locomotion modes, ecosystem types and taxonomic groups. In contrast to traditional power-law scaling, we predict a hump-shaped relationship resulting from a finite acceleration time for animals, which explains why the largest animals are not the fastest. This model is strongly supported by extensive empirical data (474 species, with body masses ranging from 30 μg to 100 tonnes) from terrestrial as well as aquatic ecosystems. Our approach unravels a fundamental constraint on the upper limit of animal movement, thus enabling a better understanding of realized movement patterns in nature and their multifold ecological consequences.

Movement is one of the most fundamental processes of life. The individual survival of mobile organisms depends on their ability to reach resources and mating partners, escape predators, and switch between habitat patches or breeding and wintering grounds. By creating and sustaining individual home ranges1 and meta-communities2, movement also profoundly affects the ability of animals to cope with changes in land use and in climate3. Additionally, movement determines encounter rates and thus the strength of species interactions4, which is an important factor influencing ecosystem stability5. Accordingly, a generalized and predictive understanding of animal movement is crucial6,7.

A fundamental constraint on movement is maximum speed. The realized movement depends on ecological factors such as landscape structure, habitat quality or sociality, but the range within which this realized movement occurs meets its upper limit at maximum movement speed. Similar to many physiological and ecological parameters, movement speed of animals is often thought to follow a power-law relationship with body mass8,9,10. However, scientists have always struggled with the fact that, in running animals, the largest are not the fastest11,12,13,14. In nature, the fastest running or swimming animals such as cheetahs or marlins are of intermediate size, indicating that a hump-shaped pattern may be more realistic. There have been numerous attempts to describe this phenomenon11,12,13,15,16. Although biomechanical and morphological models have been tailored to explain this within taxonomic groups14,16,17,18, a general mechanistic model predicting the large-scale pattern (over the full body-mass range) across all taxonomic groups and ecosystem types is still lacking. Here, we fill this void with a maximum-speed model based on the concept that animals are limited in their time for maximum acceleration because of restrictions on the quickly available energy. Consequently, acceleration time becomes the critical factor determining the maximum speed of animals. In the following, we first develop the maximum-speed model (in equations that are illustrated in the conceptual Fig. 1), test the model predictions employing a global database and eventually illustrate its applications to advance a more general understanding of animal movement.

## Results

### Model development

Consistent with prior models8,10, we start with a power-law scaling of theoretical maximum speed vmax(theor) of animals with body mass M:

$v max ( theor ) =a M b$
(1)

During acceleration, the speed of an animal over time t saturates19,20,21 (Fig. 1a, solid lines) approaching vmax(theor) (Fig. 1a, dotted lines):

$v ( t ) = v max ( theor ) ( 1 - e - k t )$
(2)

The acceleration constant k describes how fast an animal reaches vmax(theor). In analogy to Newton’s second law, the acceleration k should scale relative to the ratio between maximum force, F, and body mass, M: that is, k ~ F/M. Knowing that maximum muscle force roughly scales with body mass as F ~ Md, this yields a general power-law scaling of k with body mass M:

$k=c M d - 1$
(3)

with constants c and d. As the allometric exponent d of the muscle force falls within the range 0.75 to 0.94 (refs. 14,22,23), the overall exponent (d − 1) should be negative, implying that larger animals need more time to accelerate to the same speed than smaller ones (see conceptual Fig. 1a; colour code exemplifies four animals of different size). Note that this general scaling relationship also allows for the special cases of a constant acceleration across species or a linear relationship with body mass.

Whereas prolonged high speeds are related to the maximum aerobic metabolism, maximum burst speeds are linked to anaerobic capacity24,25. For maximum aerobic speed, ‘slow twitch’ fibres are needed, which are highly efficient at using oxygen for generating adenosine triphosphate (ATP) to fuel muscle contractions. Thus, they produce energy more slowly but for a long period of time before they become fatigued, and they allow for continuous, extended muscle contractions. In contrast, maximum anaerobic speed is fuelled by a special type of ‘fast twitch’ fibres, which use ATP from the ATP storage of the fibre until it is depleted. Thus, they produce energy more quickly but also become fatigued very rapidly and only allow for short bursts of speed. As our maximum-speed model is based on this maximum anaerobic capacity, the critical time τ available for maximum acceleration is limited by the amount of fast twitch fibre and their energy storage capacity. This storage capacity is correlated with the amount of muscle tissue mass, which is directly linked to body mass. Thus, similar to the muscle tissue mass, τ should follow a power law:

$τ=f M g$
(4)

where the allometric exponent g should fall in the range 0.76 to 1.27 documented for the allometric scaling of muscle tissue mass26,27,28,29. This power law implies that larger animals should have more time for acceleration (dashed lines in conceptual Fig. 1b, c). However, the power-law relationship of the critical time τ in our model allows for a negative or positive scaling of energy availability with body mass as well as the lack of a relationship (constant energy availability across body masses (f = 0)). Although we have included power-law relationships of k and τ (equations (3) and (4)) in our model, these scaling assumptions are not strictly necessary. Instead, our only critical assumptions are that acceleration over time follows a saturation curve (equation (1)) and that the time available for anaerobic acceleration is limited.

Within the critical time τ, after which the energy available for acceleration is depleted, the animal reaches its realized maximum speed vmax (points in Fig. 1c), which may be lower than the theoretical maximum speed (Fig. 1a, dotted lines). Combining equations (1)–(4) with t = τ yields $v max =a M b (1− e − c f M d − 1 + g )$ which simplifies to

$v max =a M b (1− e − h M i )$
(5)

where i = d − 1 + g and h = cf. This equation predicts a hump-shaped relationship between realized maximum speed and body mass (conceptual Fig. 1d).

The limiting term $1- e - h M i$ represents the fraction of the theoretical maximum speed that is realized and is defined on the interval]0;1[. For low body masses, this term is close to 1 and the realized maximum speed approximates the theoretical maximum. With increasing body masses, this term decreases and reduces the realized maximum speed. Put simply, small to intermediately sized animals accelerate quickly and have enough time to reach their theoretical maximum speed, whereas large animals are limited in acceleration time and run out of readily mobilizable energy before being able to reach their theoretically possible maximum. Therefore, they have a lower realized maximum speed than predicted by a power-law scaling relationship.

### Test of model predictions by empirical database

To test the model predictions (Fig. 1d), we compiled literature data on maximum speeds of running, flying and swimming animals including not only mammals, fish and bird species but also reptiles, molluscs and arthropods. Body masses of these species range from 3 × 10−8 kg to 108,400 kg. Statistical comparison amongst multiple models (see Methods) shows that the time-dependent maximum-speed model is the most adequate (see Supplementary Table 3). Our model (Fig. 2, parameter values in Supplementary Table 4) shows that the initial power-law increase of speed with body mass is similar for running and flying animals (b = 0.26 and 0.24, respectively). However, flying animals are nearly six times as fast as running ones (a = 143 and 26, respectively). For swimming animals, the power-law increase in speed is steeper (b = 0.36, Fig. 2a). This is because water is 800 times as dense and 60 times as viscous as air30 (in which both flying and running animals move). Small aquatic animals are slower than running animals of the same body mass, whereas larger species approach a similar speed to that of their running equivalents. This implies that in water, body mass brings a greater benefit in gaining speed. The second exponent is lower for flying animals (i = −0.72) than for running (i = −0.6) and swimming ones (i = −0.56). Future research will need to disentangle the relative importance of anaerobic and musculoskeletal constraints on movement speed by measuring muscle force, muscle mass, body mass and maximum acceleration for the same species to narrow down this large range of possible exponents. Furthermore, this may allow us to address the systematic differences in the exponent i between the locomotion modes as well as potential morphological side effects (for example quadrupedal versus bipedal running, or soaring versus flapping flight).

Although the model provides strikingly strong fits with observations (R2 = 0.893), some unexplained variation remains. This might partially be explained by the fact that our data probably include not only maximum anaerobic speeds but also some slightly slower maximum aerobic speeds. Moreover, we assessed the robustness of our model by exploring this residual variation with respect to taxonomy (arthropods, birds, fish, mammals, molluscs, reptiles), primary diet (carnivore, herbivore, omnivore), thermoregulation (ectotherm, endotherm) and locomotion mode (flying, running, swimming). As taxonomy and thermoregulation are highly correlated, we made a first model without taxonomy and a second model without thermoregulation and compared them by their Bayesian information criterion (BIC) values (see Methods for details). According to this, the model including thermoregulation instead of taxonomy is the most adequate (∆BIC = 27.37). In this model, the differences between the diet types were not significant. In contrast, combinations of locomotion mode with thermoregulation exhibited significant differences (Fig. 3). In flying and running animals, endotherms generally tend to be faster than ectotherms (Fig. 3a,b). Metabolic constraints may enable endotherms to have higher activity levels than ectotherms at the low to intermediate temperatures most commonly encountered in nature31. This pattern is reversed in aquatic systems, in which endotherms (mammals and penguins) are significantly slower than ectotherms (mainly fish, Fig. 3c). We assume that this is due to the transition undergone by aquatic endotherms from a terrestrial to an aquatic lifestyle. Semi-aquatic endotherms are adapted to movement in two different media, which reduces swimming efficiency in comparison to wholly marine mammals: they have 2.4 × 105 times higher costs of transport32. But also, in marine mammals, costs of transport are considerably higher than in fish of similar size because they have higher energy expenditures for maintaining their body temperature32. Thus, the effect of thermoregulation on the allometric scaling of maximum speed depends on the locomotion mode and the medium. Future research combining maximum speed and ambient temperature data could provide a more detailed analysis of temperature effects on maximum speed. Overall, the significant effect of thermoregulation explained only ~4% of the residual variation, suggesting that the vast majority of the variation in speed across locomotion modes, ecosystem types and taxonomic groups is well explained by our maximum-speed model.

## Discussion

Our findings help to solve one of the most challenging questions in movement ecology over recent decades: why are the largest animals not the fastest? Some studies have suggested a threshold beyond which animals run more slowly than predicted by a power-law relationship owing to biomechanical constraints13, thus implying that speed scaling depends on body-mass range11,12. Others have invoked morphology, locomotion energetics and biomechanics10,11,12,13,15,17,18 to suggest that the maximum speed of running animals is constrained by the ability of muscles and bones to withstand the stress of the locomotor force hitting the ground17,18,33. Size-related increases in locomotor stress may thus be mitigated by taxon-specific adaptations of bones, muscles and postures until eventually reaching limits at which larger body sizes come at the cost of reduced speed17. As these biomechanical concepts were lacking mechanistic predictions, the hump-shaped relationship between maximum speed and body mass has often been characterized with polynomial functions including linear and quadratic terms. We have thus also used polynomials as the best available alternative to compare against our model predictions. Although they offer a flexible way to describe nonlinear patterns, we find that polynomials do not predict the overall scaling relationship as accurately as our general time-dependent maximum-speed model, which provides the single most general capture of patterns and processes across taxa and a larger body-mass range. Our speed predictions are thereby derived from only two main species traits: body mass and locomotion mode, which explain almost 90% (R2 = 0.893) of the variation in maximum speed. This general approach allows a species-level prediction of speed which is crucial for understanding movement patterns, species interactions and animal space use.

However, our model allows prediction of the speed not only of extant but also of extinct species. For example, palaeontologists have long debated the potential running speeds of large birds34 and dinosaurs35,36 that roamed past ecosystems. The benchmark of speed predictions is set by detailed morphological models35,36. Interestingly, our maximum-speed model yields similar predictions by only accounting for body mass and locomotion mode (almost 80% of the morphological speed predictions are within the confidence intervals of our model predictions; Table 1). For instance, in contrast to a power-law model, the morphological and the time-dependent model predict lower speeds for Tyrannosaurus compared with the much smaller Velociraptor. This is consistent with theories claiming that Tyrannosaurus was very likely to have been a slow runner37. A simple power-law model only yields reasonable results for lower body masses (such as flightless birds), whereas predictions for large species such as giant quadrupedal dinosaurs are unrealistically high. In contrast, our time-dependent model makes adequate predictions for small as well as large species including extinct dinosaurs (Fig. 4, green triangles). Note that the highly accurate prediction of the dinosaur speeds is achieved without free parameters as the model parameters are only obtained by fits to data of extant species (Fig. 2, and grey points in Fig. 4

).

Our model also allows inferences to be drawn about evolutionary and ecological processes by analysing the deviations of empirically measured speeds from the model predictions. Higher maximum speeds than predicted indicate evolutionary pressure on optimizing speed capacities that could, for instance, arise from coevolution of pursuit predators and their prey.

Because many physiological and ecological processes such as metabolism, growth and feeding rates depend on ambient temperature (ectotherms) or body temperature (endotherms)38,39, it is not surprising that some variables of movement speed and acceleration also increase with temperature40. In our model, such a temperature dependence could be included as a Boltzmann factor in the constant a (equation (5)). Sufficient ambient temperature measurements at the point in time and space of the animals’ maximum speed are currently lacking, but our model offers a framework to include temperature effects formally in future work.

In ecological research, our maximum-speed model provides a mechanistic understanding of the upper limit to animal movement patterns during migration, dispersal or bridging habitat patches. The travelling speed characterizing these movements is the fraction of maximum speed that can be maintained over longer periods of time. It would be interesting to analyse how travel speed scales with body mass on the large body-mass scale and whether it also follows a hump-shaped pattern. If so, animals would use an approximately fixed percentage of their maximum speed during travel. If, however, travel speed follows a power-law relationship with body mass, large and small animals would use a higher proportion of their maximum speed during travel than intermediately sized animals. This would also affect different measurements of animal space use as well as migration and dispersal distances. Although home ranges1,41 and day ranges42 of animals have been shown to follow power-law relationships with body mass, migration distances of flying animals, for example, follow a curvilinear relationship with body mass43. Our new results call for mechanistic analyses of how the hump-shaped scaling pattern of maximum speed could potentially affect other movement parameters.

The integration of our model as a species-specific scale (“what is physiologically possible”) with research on how this fraction is modified by species traits and environmental parameters such as landscape structure, resource availability and temperature (“what is ecologically realized in nature”) could help to provide a mechanistic understanding unifying physiological and ecological constraints on animal movement. In addition to generalizing our understanding across species traits and current landscape characteristics, this integrated approach will aid the prediction of how species-specific movement, and subsequently home ranges nd meta-communities, may respond to ongoing landscape fragmentation and environmental change. Thus, our approach may act as a simple and powerful tool for predicting the natural boundaries of animal movement and help in gaining a more unified understanding of the currently assessed movement data across taxa and ecosystems6,7.

## Methods

### Data

We searched for published literature providing data on the maximum speeds of running, flying and swimming animals by using the search terms “maximum speed”, “escape speed” and “sprint speed”. From this list, we excluded publications on (1) vertical speeds (mainly published for birds) to avoid side-effects of gravitational acceleration that are not included in our model, or (2) the maxima of normal speeds (including also dispersal and migration). This resulted in a data set containing 622 data points for 474 species (see Supplementary Table 1 for an overview). Our data include laboratory and field studies as well as meta-studies (which are mainly field studies but may also include a minor amount of laboratory studies). For some data points, the study type could not be ascertained, and they were marked as “unclear”. For an overview of the study type of our data, see Supplementary Table 2.

### Model fitting

We fitted several models to these data: (1) the time-dependent maximum-speed model (equation (5)), (2) three polynomial models (simple polynomial model without cofactor; polynomial model with taxon as cofactor but without interaction term; and polynomial model with taxon as cofactor with interaction term) with linear and quadratic terms, and (3) three power-law models (simple power law without cofactor; power law with taxon as cofactor but without interaction term; and power law with taxon as cofactor with interaction term). For swimming animals, we excluded reptiles and arthropods from the statistical analyses as they contained only one data point each (see Supplementary Table 1). The polynomial and power-law models were fitted by the lm function, and the time-dependent model by the nls function in R (version 3.2.3)44. The quality of the fits was compared according to the Bayesian information criterion (BIC) that combines the maximized value of the likelihood function with a penalty term for the number of parameters in the model. The model with the lowest BIC is preferred, and the results of this showed that the time-dependent maximum-speed model developed in the main text provided the best fit in all cases (see Supplementary Table 3). For flying animals, the simple polynomial model performed second best, whereas for running animals the polynomial model with taxon as cofactor with interaction term and for swimming animals the power-law model with taxon as cofactor with interaction term were second best (see Supplementary Table 3). Overall, the lower BIC values indicate that the time-dependent maximum-speed model provides a fit to the data that is substantially superior to power-law relationships, models with taxonomy as cofactor or (non-mechanistic but also hump-shaped) polynomials. The fitted parameter values of the time-dependent maximum-speed model for flying, running and swimming animals are given in Supplementary Table 4.

### Residual variation analysis

We analysed the residuals of the time-dependent maximum-speed model (Fig. 2 of the main text) with respect to taxonomy (arthropods, birds, fish, mammals, molluscs, reptiles), primary diet type (carnivore, herbivore, omnivore), locomotion mode (flying, running, swimming) and thermoregulation (ectotherm, endotherm) using linear models. As taxonomy and thermoregulation are highly correlated, we made a first model without taxonomy and a second model without thermoregulation:

Model 1: residuals ~ (thermoregulation + diet type) × locomotion mode

Model 2: residuals ~ (taxonomy + diet type) × locomotion mode

We compared the two models by means of BIC and carried out a further mixed-effects model analysis on the superior model. This model included the study type as a random factor influencing the intercept, which ensures that differences among study types do not drive our statistical results. We acknowledge that the direct inclusion of multiple covariates in the model-fitting process would be preferable to residual analysis to avoid biased parameter estimates45. However, this was impeded by the complexity of fitting the nonlinear model with four free parameters (equation (5)), and our main goal was less to estimate the exact parameters than to document the main variables affecting the unexplained variation.

### Data availability

The data supporting the findings of this study are available within the Article and its Supplementary Information files.

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. 1.

Jetz, W., Carbone, C., Fulford, J. & Brown, J. H. The scaling of animal space use. Science 306, 266–268 (2004).

2. 2.

Bauer, S. & Hoye, B. J. Migratory animals couple biodiversity and ecosystem functioning worldwide. Science 344, 1242552 (2014).

3. 3.

Parmesan, C. & Yohe, G. A globally coherent fingerprint of climate change impacts across natural systems. Nature 421, 37–42 (2003).

4. 4.

Pawar, S., Dell, A. I. & Savage, V. M. Dimensionality of consumer search space drives trophic interaction strengths. Nature 486, 485–489 (2012).

5. 5.

Neutel, A.-M. et al. Reconciling complexity with stability in naturally assembling food webs. Nature 449, 599–602 (2007).

6. 6.

Kays, R., Crofoot, M. C., Jetz, W. & Wikelski, M. Terrestrial animal tracking as an eye on life and planet. Science 348, aaa2478 (2015).

7. 7.

Hussey, N. E. et al. Aquatic animal telemetry: a panoramic window into the underwater world. Science 348, 1255642 (2015).

8. 8.

Peters, R. H. The Ecological Implications of Body Size (Cambridge Univ. Press, 1983).

9. 9.

Hedenström, A. Scaling migration speed in animals that run, swim and fly. J. Zool. 259, 155–160 (2003).

10. 10.

Bejan, A. & Marden, J. H. Unifying constructal theory for scale effects in running, swimming and flying. J. Exp. Biol. 209, 238–248 (2006).

11. 11.

Iriarte-Díaz, J. Differential scaling of locomotor performance in small and large terrestrial mammals. J. Exp. Biol. 205, 2897–2908 (2002).

12. 12.

Fuentes, M. A. Theoretical considerations on maximum running speeds for large and small animals. J. Theor. Biol. 390, 127–135 (2016).

13. 13.

Garland, T. The relation between maximal running speed and body mass in terrestrial mammals. J. Zool. 199, 157–170 (1983).

14. 14.

Clemente, C. J. & Richards, C. Muscle function and hydrodynamics limit power and speed in swimming frogs. Nat. Commun. 4, 2737 (2013).

15. 15.

Clemente, C. J., Thompson, G. G. & Withers, P. C. Evolutionary relationships of sprint speed in Australian varanid lizards. J. Zool. 278, 270–280 (2009).

16. 16.

Van Damme, R. & Vanhooydonck, B. Origins of interspecific variation in lizard sprint capacity. Funct. Ecol. 15, 186–202 (2001).

17. 17.

Dick, T. J. & Clemente, C. J. Where have all the giants gone? How animals deal with the problem of size. PLoS Biol. 15, e2000473 (2017).

18. 18.

Clemente, C. J., Withers, P. C. & Thompson, G. Optimal body size with respect to maximal speed for the yellow-spotted monitor lizard (Varanus panoptes; Varanidae). Physiol. Biochem. Zool. 85, 265–273 (2012).

19. 19.

Alexander, R. M. Principles of Animal Locomotion (Princeton Univ. Press, 2003).

20. 20.

Huey, R. B. & Hertz, P. E. Effects of body size and slope on acceleration of a lizard (Stellio stellio). J. Exp. Biol. 110, 113–123 (1984).

21. 21.

Elliott, J. P., Cowan, I. M. & Holling, C. S. Prey capture by the African lion. Can. J. Zool. 55, 1811–1828 (1977).

22. 22.

Garcia, G. J. & da Silva, J. K. On the scaling of mammalian long bones. J. Exp. Biol. 207, 1577–1584 (2004).

23. 23.

Biewener, A. A. Biomechanical consequences of scaling. J. Exp. Biol. 208, 1665–1676 (2005).

24. 24.

Jones, J. H. & Lindstedt, S. L. Limits to maximal performance. Annu. Rev. Physiol. 55, 547–569 (1993).

25. 25.

Weyand, P. G. & Bundle, M. W. Energetics of high-speed running: integrating classical theory and contemporary observations. Am. J. Physiol. Regul. Integr. Comp. Physiol. 288, R956–R965 (2005).

26. 26.

Pollock, C. M. & Shadwick, R. E. Allometry of muscle, tendon, and elastic energy storage capacity in mammals. Am. J. Physiol. Regul. Integr. Comp. Physiol. 266, R1022–R1031 (1994).

27. 27.

Alexander, Rm, Jayes, A. S., Maloiy, G. M. O. & Wathuta, E. M. Allometry of the leg muscles of mammals. J. Zool. 194, 539–552 (1981).

28. 28.

Bennett, M. B. Allometry of the leg muscles of birds. J. Zool. 238, 435–443 (1996).

29. 29.

Maloiy, G. M. O., Alexander, R., Njau, R. & Jayes, A. S. Allometry of the legs of running birds. J. Zool. 187, 161–167 (1979).

30. 30.

Comparative Physiology: Life in Water and on Land (eds Dejours, P. et al.) (FIDIA Research Series Vol. 9, Springer, 1987).

31. 31.

Gillooly, J. F., Brown, J. H., West, G. B., Savage, V. M. & Charnov, E. L. Effects of size and temperature on metabolic rate. Science 293, 2248–2251 (2001).

32. 32.

Williams, T. M. The evolution of cost efficient swimming in marine mammals: limits to energetic optimization. Phil. Trans. R. Soc. Lond. B Biol. Sci. 354, 193–201 (1999).

33. 33.

Biewener, A. A. Bone strength in small mammals and bipedal birds: do safety factors change with body size? J. Exp. Biol. 98, 289–301 (1982).

34. 34.

Blanco, R. E. & Jones, W. W. Terror birds on the run: a mechanical model to estimate its maximum running speed. Proc. R. Soc. B Biol. Sci. 272, 1769–1773 (2005).

35. 35.

Thulborn, R. A. Speeds and gaits of dinosaurs. Palaeogeogr. Palaeoclimatol. Palaeoecol. 38, 227–256 (1982).

36. 36.

Sellers, W. I. & Manning, P. L. Estimating dinosaur maximum running speeds using evolutionary robotics. Proc. R. Soc. Lond. B Biol. Sci. 274, 2711–2716 (2007).

37. 37.

Hutchinson, J. R. & Garcia, M. Tyrannosaurus was not a fast runner. Nature 415, 1018–1021 (2002).

38. 38.

Brown, J. H., Gillooly, J. F., Allen, A. P., Savage, V. M. & West, G. B. Toward a metabolic theory of ecology. Ecology 85, 1771–1789 (2004).

39. 39.

Rall, B. C. et al. Universal temperature and body-mass scaling of feeding rates. Phil. Trans. R. Soc. Lond. B Biol. Sci. 367, 2923–2934 (2012).

40. 40.

Dell, A. I., Pawar, S. & Savage, V. M. Systematic variation in the temperature dependence of physiological and ecological traits. Proc. Natl Acad. Sci. USA 108, 10591–10596 (2011).

41. 41.

Tamburello, N., Côté, I. M. & Dulvy, N. K. Energy and the scaling of animal space use. Am. Nat. 186, 196–211 (2015).

42. 42.

Carbone, C., Cowlishaw, G., Isaac, N. J. B. & Rowcliffe, J. M. How far do animals go? Determinants of day range in mammals. Am. Nat. 165, 290–297 (2005).

43. 43.

Hein, A. M., Hou, C. & Gillooly, J. F. Energetic and biomechanical constraints on animal migration distance. Ecol. Lett. 15, 104–110 (2012).

44. 44.

R Core Team. R: A Language and Environment for Statistical Computing (R Foundation for Statistical Computing, 2015).

45. 45.

Freckleton, R. P. On the misuse of residuals in ecology: regression of residuals vs. multiple regression. J. Anim. Ecol. 71, 542–545 (2002).

## Acknowledgements

M.R.H., W.J., B.C.R. and U.B. acknowledge the support of the German Centre for integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig funded by the German Research Foundation (FZT 118).

## Author information

### Affiliations

1. #### EcoNetLab, German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig, Leipzig, 04103, Germany

• Myriam R. Hirt
• , Walter Jetz
• , Björn C. Rall
•  & Ulrich Brose
2. #### EcoNetLab, Friedrich Schiller University Jena, Dornburger Strasse 159, 07743, Jena, Germany

• Myriam R. Hirt
• , Björn C. Rall
•  & Ulrich Brose
3. #### Department of Ecology and Evolutionary Biology, Yale University, New Haven, CT, 06511, USA

• Walter Jetz
4. #### Department of Life Sciences, Imperial College London, Silwood Park, Ascot, SL5 7QN, UK

• Walter Jetz

### Contributions

M.R.H. and U.B. developed the model. M.R.H. gathered the data. M.R.H. and B.C.R. carried out statistical analyses. W.J. was involved in study concept and data analyses. M.R.H. and U.B. wrote the paper. All authors discussed the results and commented on the manuscript.

### Competing interests

The authors declare no competing financial interests.

### Corresponding author

Correspondence to Myriam R. Hirt.

## Electronic supplementary material

1. ### Supplementary information

Supplementary Tables 1–5; maximum speed database


text:
# AI News, The Two Cultures: statistics vs. machine learning?

## The Two Cultures: statistics vs. machine learning?

If somebody claims a particular estimator is an unbiased estimator for $\theta$, then we try many values of $\theta$ in turn, generate many samples from each based on some assumed model, push them through the estimator, and find the average estimated $\theta$.

If we can prove that the expected estimate equals the true value, for all values, then we say it's unbiased.'

The empirical data you use might have all sorts of problems with it, and might not behave according the model we agreed upon for evaluation.'

While your method might have worked on one dataset (the dataset with train and test data) that you used in your evaluation, I can prove that mine will always work.'

Your 'proof' is only valid if the entire dataset behaves according to the model you assumed.'

I'd love to step in and balance things up, perhaps demonstrating some other issues, but I really love watching my frequentist colleague squirm.'

Whereas I will do an evaluation that is more general (because it involves a broadly-applicable proof) and also more limited (because I don't know if your dataset is actually drawn from the modelling assumptions I use while designing my evaluation.)' ML: 'What evaluation do you use, B?'

Then we can use the idea that none of us care what's in the black box, we care only about different ways to evaluate.'

The frequentist will calculate these for each blood testing method that's under consideration and then recommend that we use the test that got the best pair of scores.'

They will want to know 'of those that get a Positive result, how many will get Sick?' and 'of those that get a Negative result, how many are Healthy?' ' ML: 'Ah yes, that seems like a better pair of questions to ask.'

One option is to run the tests on lots of people and just observe the relevant proportions.

Your 'proven' coverage probabilities won't stack up in the real world unless all your assumptions stand up.

You call me crazy, yet you pretend your assumptions are the work of a conservative, solid, assumption-free analysis.'

But the interesting thing is that, once we decide on this form of evaluation, and once we choose our prior, we have an automatic 'recipe' to create an appropriate estimator.

If he wants an unbiased estimator for a complex model, he doesn't have any automated way to build a suitable estimator.'

I don't have an automatic way to create an unbiased estimator, because I think bias is a bad way to evaluate an estimator.

But given the conditional-on-data estimation that I like, and the prior, I can connect the prior and the likelihood to give me the estimator.'

We all have different ways to evaluate our methods, and we'll probably never agree on which methods are best.'

And some 'frequentist' proofs might be fun too, predicting the performance under some presumed model of data generation.'

Sometimes, you have great difficulty finding unbiased estimators, and even when you do you have a stupid estimator (for some really complex model) that will say the variance is negative.

ML: 'The lesson here is that, while we disagree a little on evaluation, none of us has a monopoly on how to create estimator that have properties we want.'

## An Empirical Evaluation of Alternative Methods of Estimation for Confirmatory Factor Analysis With Ordinal Data

We used a comprehensive simulation study to empirically test our set of theoretically generated research hypotheses pertaining to the performance of CFA for ordinal data with polychoric correlations using both full WLS (as per Browne, 1984, and B.

First, as predicted, we replicated Quiroga’s (1992) findings that polychoric correlations among ordinal variables accurately estimated the bivariate relations among normally distributed latent response variables and that modest violation of normality for latent response variables of a degree that might be expected in applied research leads to only slightly biased estimates of polychoric correlations.

As we described earlier, it has been analytically demonstrated that when CFA models are fitted using observed polychoric correlation matrices, full WLS estimation produces asymptotically correct chi-square tests of model fit and parameter standard errors (e.g., B.

Nonetheless, other studies applying full WLS estimation to the analysis of polychoric correlations have found rates of nonconvergence and improper solutions similar to those reported here: Neither Dolan (1994) nor Potthast (1993) obtained nonpositive definite weight matrices or improper solutions for any replications of their respective studies, which analyzed samples of size 200 and greater, whereas Babakus et al.

Thus, our findings are similar to those of Dolan (1994), who concluded that a sample size of 200 is not sufficient to estimate an eight-indicator model with full WLS using polychoric correlations, and to those of Potthast (1993), who reported significant problems when nine-parameter and larger models are estimated with a sample size as large as 1,000.

Our findings suggest that, for normally distributed latent response variables, parameter estimates obtained with full WLS estimation tended to be somewhat positively biased with overestimation increasing as a function of increasing model size and decreasing sample size.

However, these biases were relatively small across all cells of the simulation: Even when the 20-indicator model was estimated with N = 200, estimates of the population factor loading .70 were consistently less than .80, and estimates of the population factor correlation .30 were typically less than .40.

Dolan (1994) found that parameters tended to be slightly overestimated with N = 400 and less, whereas Potthast (1993) concluded that parameter estimate bias was trivial across all cells of her simulation study, which only had two conditions of sample size, N = 500 and N = 1,000.

As predicted, for both full WLS estimation and robust WLS estimation, we found that increasing levels of nonnormality in latent response variables was associated with greater positive bias in parameter estimates, echoing the tendency of polychoric correlations to be positively biased when observed ordinal data derives from nonnormal latent response variables.

Rather, as stated above, our intent was to evaluate the effect of violation of a crucial theoretical assumption for estimation of CFAs using polychoric correlations, namely the latent normality assumption for y*, and the manipulations we chose for our simulations were explicitly targeted to do so.

Because polychoric correlations provide robust estimates of the true correlation even when different sets of thresholds are applied to y* variables, it follows that estimation of CFA models is not substantially affected according to whether or not threshold sets are constant across indicators.

Second, to the extent that the observed ordinal variables have nonzero skewness and kurtosis (e.g., as a result of threshold sets that lead to a dramatically different distribution shape for y relative to a normal or moderately nonnormal y*), full WLS estimation is known to produce biased chi-square test statistics and parameter standard error estimates.

Potthast, 1993).15 Third, when the population y* variables are of extreme nonnormality (e.g., skewness = 5, kurtosis = 50), the likely result is that the observed ordinal variables themselves will also have exaggerated levels of skewness and kurtosis, thus again leading to low expected frequencies in observed contingency tables.

With regard to consideration of the joint effects of underlying nonnormality and varying thresholds across indicators, to the extent that these factors jointly produce observed contingency tables with low (or zero) expected cell frequencies, they are likely to lead to inaccurate polychoric correlations (as shown by Brown &

## Cross-validation (statistics)

Cross-validation, sometimes called rotation estimation,[1][2][3] or out-of-sample testing is any of various similar model validation techniques for assessing how the results of a statistical analysis will generalize to an independent data set.

In a prediction problem, a model is usually given a dataset of known data on which training is run (training dataset), and a dataset of unknown data (or first seen data) against which the model is tested (called the validation dataset or testing set).[4] The goal of cross-validation is to test the model’s ability to predict new data that were not used in estimating it, in order to flag problems like overfitting[citation needed] and to give an insight on how the model will generalize to an independent dataset (i.e., an unknown dataset, for instance from a real problem).

One round of cross-validation involves partitioning a sample of data into complementary subsets, performing the analysis on one subset (called the training set), and validating the analysis on the other subset (called the validation set or testing set).

If we then take an independent sample of validation data from the same population as the training data, it will generally turn out that the model does not fit the validation data as well as it fits the training data.

If we use least squares to fit a function in the form of a hyperplane y = a + βTx to the data (xi, yi) 1 ≤ i ≤ n, we could then assess the fit using the mean squared error (MSE).

The MSE for given estimated parameter values a and β on the training set (xi, yi) 1 ≤ i ≤ n is If the model is correctly specified, it can be shown under mild assumptions that the expected value of the MSE for the training set is (n − p − 1)/(n + p + 1) < 1 times the expected value of the MSE for the validation set[6] (the expected value is taken over the distribution of training sets).

Since in linear regression it is possible to directly compute the factor (n − p − 1)/(n + p + 1) by which the training MSE underestimates the validation MSE under the assumption that the model specification is valid, cross-validation can be used for checking whether the model has been overfitted, in which case the MSE in the validation set will substantially exceed its anticipated value.

In 2-fold cross-validation, we randomly shuffle the dataset into two sets d0 and d1, so that both sets are equal size (this is usually implemented by shuffling the data array and then splitting it in two).

In the holdout method, we randomly assign data points to two sets d0 and d1, usually called the training set and the test set, respectively.

While the holdout method can be framed as 'the simplest kind of cross-validation',[8] many sources instead classify holdout as a type of simple validation, rather than a simple or degenerate form of cross-validation.[9][10] This method, also known as Monte Carlo cross-validation,[11] randomly splits the dataset into training and validation data.

When the value being predicted is continuously distributed, the mean squared error, root mean squared error or median absolute deviation could be used to summarize the errors.

Suppose we choose a measure of fit F, and use cross-validation to produce an estimate F* of the expected fit EF of a model to an independent data set drawn from the same population as the training data.

The variance of F* can be large.[13][14] For this reason, if two statistical procedures are compared based on the results of cross-validation, it is important to note that the procedure with the better estimated performance may not actually be the better of the two procedures (i.e.

In some cases such as least squares and kernel regression, cross-validation can be sped up significantly by pre-computing certain values that are needed repeatedly in the training, or by using fast 'updating rules' such as the Sherman–Morrison formula.

An extreme example of accelerating cross-validation occurs in linear regression, where the results of cross-validation have a closed-form expression known as the prediction residual error sum of squares (PRESS).

For example, if a model for predicting stock values is trained on data for a certain five-year period, it is unrealistic to treat the subsequent five-year period as a draw from the same population.

When this occurs, there may be an illusion that the system changes in external samples, whereas the reason is that the model has missed a critical predictor and/or included a confounded predictor.

New evidence is that cross-validation by itself is not very predictive of external validity, whereas a form of experimental validation known as swap sampling that does control for human bias can be much more predictive of external validity.[15] As defined by this large MAQC-II study across 30,000 models, swap sampling incorporates cross-validation in the sense that predictions are tested across independent training and validation samples.

When there is a mismatch in these models developed across these swapped training and validation samples as happens quite frequently, MAQC-II shows that this will be much more predictive of poor external predictive validity than traditional cross-validation.

In addition to placing too much faith in predictions that may vary across modelers and lead to poor external validity due to these confounding modeler effects, these are some other ways that cross-validation can be misused: Since the order of the data is important, cross-validation might be problematic for time-series models.

For example, suppose we are interested in optical character recognition, and we are considering using either support vector machines (SVM) or k nearest neighbors (KNN) to predict the true character from an image of a handwritten character.

If we simply compared the methods based on their in-sample error rates, the KNN method would likely appear to perform better, since it is more flexible and hence more prone to overfitting[citation needed] compared to the SVM method.

It forms the basis of the validation statistic, Vn which is used to test the statistical validity of meta-analysis summary estimates.[19] It has also been used in a more conventional sense in meta-analysis to estimate the likely prediction error of meta-analysis results.[20]

## M-estimator

In statistics, M-estimators are a broad class of estimators, which are obtained as the minima of sums of functions of the data.

Least-squares estimators are a special case of M-estimators.

The definition of M-estimators was motivated by robust statistics, which contributed new types of M-estimators.

The statistical procedure of evaluating an M-estimator on a data set is called M-estimation.

More generally, an M-estimator may be defined to be a zero of an estimating function.[1][2][3][4][5][6] This estimating function is often the derivative of another statistical function.

For example, a maximum-likelihood estimate is the point where the derivative of the likelihood function with respect to the parameter is zero;

thus, a maximum-likelihood estimator is a critical point of the score function.[7] In many applications, such M-estimators can be thought of as estimating characteristics of the population.

The method of least squares is a prototypical M-estimator, since the estimator is defined as a minimum of the sum of squares of the residuals.

Another popular M-estimator is maximum-likelihood estimation.

For a family of probability density functions f parameterized by θ, a maximum likelihood estimator of θ is computed for each set of data by maximizing the likelihood function over the parameter space { θ } .

When the observations are independent and identically distributed, a ML-estimate

{\displaystyle {\hat {\theta }}}

satisfies or, equivalently, Maximum-likelihood estimators have optimal properties in the limit of infinitely many observations under rather general conditions, but may be biased and not the most efficient estimators for finite samples.

In 1964, Peter J.

Huber proposed generalizing maximum likelihood estimation to the minimization of where ρ is a function with certain properties (see below).

The solutions are called M-estimators ('M' for 'maximum likelihood-type' (Huber, 1981, page 43));

other types of robust estimator include L-estimators, R-estimators and S-estimators.

Maximum likelihood estimators (MLE) are thus a special case of M-estimators.

With suitable rescaling, M-estimators are special cases of extremum estimators (in which more general functions of the observations can be used).

The function ρ, or its derivative, ψ, can be chosen in such a way to provide the estimator desirable properties (in terms of bias and efficiency) when the data are truly from the assumed distribution, and 'not bad' behaviour when the data are generated from a model that is, in some sense, close to the assumed distribution.

M-estimators are solutions, θ, which minimize This minimization can always be done directly.

Often it is simpler to differentiate with respect to θ and solve for the root of the derivative.

When this differentiation is possible, the M-estimator is said to be of ψ-type.

Otherwise, the M-estimator is said to be of ρ-type.

In most practical cases, the M-estimators are of ψ-type.

For positive integer r, let

(

,

)

{\displaystyle ({\mathcal {X}},\Sigma )}

and

(

Θ

⊂

r

,

)

{\displaystyle (\Theta \subset \mathbb {R} ^{r},S)}

be measure spaces.

∈

Θ

{\displaystyle \theta \in \Theta }

is a vector of parameters.

An M-estimator of ρ-type

{\displaystyle T}

is defined through a measurable function

:

Θ

→

{\displaystyle \rho :{\mathcal {X}}\times \Theta \rightarrow \mathbb {R} }

.

It maps a probability distribution

{\displaystyle F}

on

{\displaystyle {\mathcal {X}}}

to the value

(

)

∈

Θ

{\displaystyle T(F)\in \Theta }

(if it exists) that minimizes

(

x

,

)

d

(

x

)

{\displaystyle \int _{\mathcal {X}}\rho (x,\theta )dF(x)}

:

For example, for the maximum likelihood estimator,

(

x

{\displaystyle \rho (x,\theta )=-\log(f(x,\theta ))}

{\displaystyle f(x,\theta )={\frac {\partial F(x,\theta )}{\partial x}}}

{\displaystyle \rho }

is differentiable, the computation of

{\displaystyle {\widehat {\theta }}}

is usually much easier.

An M-estimator of ψ-type T is defined through a measurable function

{\displaystyle \psi :{\mathcal {X}}\times \Theta \rightarrow \mathbb {R} ^{r}}

It maps a probability distribution F on

{\displaystyle {\mathcal {X}}}

to the value

{\displaystyle T(F)\in \Theta }

(if it exists) that solves the vector equation: For example, for the maximum likelihood estimator,

{\displaystyle \psi (x,\theta )=\left({\frac {\partial \log(f(x,\theta ))}{\partial \theta ^{1}}},\dots ,{\frac {\partial \log(f(x,\theta ))}{\partial \theta ^{p}}}\right)^{\mathrm {T} }}

{\displaystyle u^{\mathrm {T} }}

denotes the transpose of vector u and

{\displaystyle f(x,\theta )={\frac {\partial F(x,\theta )}{\partial x}}}

Such an estimator is not necessarily an M-estimator of ρ-type, but if ρ has a continuous first derivative with respect to

{\displaystyle \theta }

then a necessary condition for an M-estimator of ψ-type to be an M-estimator of ρ-type is

{\displaystyle \psi (x,\theta )=\nabla _{\theta }\rho (x,\theta )}

The previous definitions can easily be extended to finite samples.

If the function ψ decreases to zero as

{\displaystyle x\rightarrow \pm \infty }

the estimator is called redescending.

Such estimators have some additional desirable properties, such as complete rejection of gross outliers.

For many choices of ρ or ψ, no closed form solution exists and an iterative approach to computation is required.

It is possible to use standard function optimization algorithms, such as Newton-Raphson.

However, in most cases an iteratively re-weighted least squares fitting algorithm can be performed;

this is typically the preferred method.

For some choices of ψ, specifically, redescending functions, the solution may not be unique.

The issue is particularly relevant in multivariate and regression problems.

Thus, some care is needed to ensure that good starting points are chosen.

Robust starting points, such as the median as an estimate of location and the median absolute deviation as a univariate estimate of scale, are common.

In computation of M-estimators, it is sometimes useful to rewrite the objective function so that the dimension of parameters is reduced.

The procedure is called “concentrating” or “profiling”.

Examples in which concentrating parameters increases computation speed include seemingly unrelated regressions (SUR) models.[8] Consider the following M-estimation problem:

{\displaystyle ({\hat {\beta }}_{n},{\hat {\gamma }}_{n}):=\arg \max _{\beta ,\gamma }\textstyle \sum _{i=1}^{N}\displaystyle q(w_{i},\beta ,\gamma )}

Assuming differentiability of the function q, M-estimator solves the first order conditions:

{\displaystyle \sum _{k=1}^{N}\triangledown \beta q(w_{i},\beta ,\gamma )=0}

{\displaystyle \sum _{i=1}^{N}\triangledown \gamma q(w_{i},\beta ,\gamma )=0}

Now, if we can solve the second equation for γ in terms of

{\displaystyle \beta }

the second equation becomes:

{\displaystyle \sum _{i=1}^{N}\bigtriangledown \gamma q(w_{i},\beta ,g(W,\beta ))=0}

where g is, there is some function to be found.

Now, we can rewrite the original objective function solely in terms of β by inserting the function g into the place of

{\displaystyle \gamma }

As a result, there is a reduction in the number of parameters.

Whether this procedure can be done depends on particular problems at hand.

However, when it is possible, concentrating parameters can facilitate computation to a great degree.

For example, in estimating SUR model of 6 equations with 5 explanatory variables in each equation by Maximum Likelihood, the number of parameters declines from 51 to 30.[8] Despite its appealing feature in computation, concentrating parameters is of limited use in deriving asymptotic properties of M-estimator.[9] The presence of W in each summand of the objective function makes it difficult to apply the law of large numbers and the central limit theorem.

It can be shown that M-estimators are asymptotically normally distributed.

As such, Wald-type approaches to constructing confidence intervals and hypothesis tests can be used.

However, since the theory is asymptotic, it will frequently be sensible to check the distribution, perhaps by examining the permutation or bootstrap distribution.

The influence function of an M-estimator of

{\displaystyle \psi }

-type is proportional to its defining

{\displaystyle \psi }

Let T be an M-estimator of ψ-type, and G be a probability distribution for which

Its influence function IF is assuming the density function

{\displaystyle f(y)}

A proof of this property of M-estimators can be found in Huber (1981, Section 3.2).

M-estimators can be constructed for location parameters and scale parameters in univariate and multivariate settings, as well as being used in robust regression.

Let (X1, ..., Xn) be a set of independent, identically distributed random variables, with distribution F.

If we define we note that this is minimized when θ is the mean of the Xs.

Thus the mean is an M-estimator of ρ-type, with this ρ function.

As this ρ function is continuously differentiable in θ, the mean is thus also an M-estimator of ψ-type for ψ(x, θ) = θ − x.

For the median estimation of (X1, ..., Xn), instead we can define the ρ function as and similarly, the ρ function is minimized when θ is the median of the Xs.

While this ρ function is not differentiable in θ, the ψ-type M-estimator, which is the subgradient of ρ function, can be expressed as and

Efficiency of estimators

This video details what is meant by the efficiency of an estimator, and why it is a desirable property for an econometric estimator to have. Check out ...

Missing Term Estimation using Difference Operators, IE Part 5

Maximum Likelihood Estimation Examples

for more great signal processing content, including concept/screenshot files, quizzes, MATLAB and data files. Three examples of ..

Moment method estimation: Uniform distribution

estimation of parameters of uniform distribution using method of moments.

Precision, Accuracy, Measurement, and Significant Figures

In this video, I define Precision and Accuracy and use examples to illustrate the differences between them. I discuss the process of using a ruler to measure ...

Session 7: The Beta Regression

This class covered the conventional approach to estimating betas, which is to run a regression of returns on a stock against returns on the market index. We first ...

K-Fold Cross Validation - Intro to Machine Learning

This video is part of an online course, Intro to Machine Learning. Check out the course here: This course was designed ..

A Guide to CoreML on iOS

Apple's newly released CoreML framework makes it super simple for developers to run inference of pre-trained models on their iOS devices. Let's talk about ...

Lecture 05 - Training Versus Testing

Training versus Testing - The difference between training and testing in mathematical terms. What makes a learning model able to generalize? Lecture 5 of 18 of ...

6. Maximum Likelihood Estimation (cont.) and the Method of Moments

MIT 18.650 Statistics for Applications, Fall 2016 View the complete course: Instructor: Philippe Rigollet In this lecture, Prof. Rigollet ..


text:
# Chapter 8 - Right Triangles and Trigonometry - Common Core Cumulative Standards Review - Selected Response - Page 540: 14

$AB \approx 42.2$

#### Work Step by Step

First, we want to know what angle is opposite the side in question. The angle that is opposite to the side we are looking for is $\angle C$, so let's plug in what we know into the formula for the law of cosines: $(AB)^2 = 32^2 + 15^2 - 2(32)(15)$ cos $124^{\circ}$ Evaluate exponents first, according to order of operations: $(AB)^2 = 1024 + 225 - 2(32)(15)$ cos $124^{\circ}$ Add to simplify on the right side of the equation: $(AB)^2 = 1249 - 2(32)(15)$ cos $124^{\circ}$ Take the square root of both sides to solve: $AB \approx 42.2$

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# Plus Magazine

March 2006

## A collector's piece: solution

In last issue's outer space we worked out how many pruchases you would expect to have to make in order to obtain every one of a set of N distinct cards. The puzzle was to show that the standard deviation of this result is close to 1.3N for large N. To work out the expectation, we considered N random variables X0, X1, etc, up to XN-1. Each random variable Xi counts how many purchases you have to make to get a new card if you already have i distinct cards. The overall expectation is then just the sum of the individual expectations of the N variables.

You can use the same technique to work out the standard deviation (which is of course the square root of the variance): since the N random variables are independent of each other, the overall variance is simply the sum of the individual values.

For each individual variable Xi, the probability that you have to make j purchases to get a new card is

So each individual Xi has the well-known geometric probability distribution with parameter

This distribution has variance

Now if X is the sum of the N random variables X0, X1, ... , XN-1, then the variance of X is A little thought shows that this sum can be expressed as which is equal to

Dividing through by N2 gives

As N gets large, the first term tends to , as was stated in the hint, while the second term tends to zero. This proves that the standard deviation for large N is close to which is approximately 1.3 N — QED.

Back to Outer space


text:
## CryptoDB

### Paper: Optimal Bounded-Collusion Secure Functional Encryption

Authors: Prabhanjan Ananth Vinod Vaikuntanathan DOI: 10.1007/978-3-030-36030-6_8 Search ePrint Search Google We construct private-key and public-key functional encryption schemes in the bounded-key setting; that is, secure against adversaries that obtain an a-priori bounded number of functional keys (also known as the collusion bound).An important metric considered in the literature on bounded-key functional encryption schemes is the dependence of the running time of the encryption algorithm on the collusion bound $Q=Q(\lambda )$ (where $\lambda$ is the security parameter). It is known that bounded-key functional encryption schemes with encryption complexity growing with $Q^{1-\varepsilon }$ , for any constant $\varepsilon > 0$ , implies indistinguishability obfuscation. On the other hand, in the public-key setting, it was previously unknown whether we could achieve encryption complexity growing linear with Q, also known as optimal bounded-key FE, based on well-studied assumptions.In this work, we give the first construction of an optimal bounded-key public-key functional encryption scheme under the minimal assumption of the existence of any public-key encryption scheme. Moreover, our scheme supports the class of all polynomial-size circuits.Our techniques also extend to the private-key setting. We achieve a construction of an optimal bounded-key functional encryption in the private-key setting based on the minimal assumption of one-way functions, instead of learning with errors as achieved in prior works.
##### BibTeX
@article{tcc-2019-29972,
title={Optimal Bounded-Collusion Secure Functional Encryption},
booktitle={Theory of Cryptography},
series={Lecture Notes in Computer Science},
publisher={Springer},
volume={11891},
pages={174-198},
doi={10.1007/978-3-030-36030-6_8},
author={Prabhanjan Ananth and Vinod Vaikuntanathan},
year=2019
}