In the previous unit, what I showed you
was a way to rescue MaxEnt models to
describe the language abundance P(n)
by reference to a hidden variable, epsilon
which we referred to as "programmer time"
and what we assumed was that the system
was constrained in two ways:
it was constrained not only to having
a certain average number of projects per
language. We fixed the average popularity
of languages, but we also fixed the average
programmer time devoted to projects
in a particular language. And so this
distribution, here, looks like this.
in functional form. And when we integrate
out this variable, epsilon, we get
something that looks like this.
So we get a different prediction for
the language distribution. And we get
a prediction that, I argue, looks
reasonably good.
It certainly looks better than the
exponential distribution.
I feel honor-bound to tell you
about the controversy
that happens when we try to make
these models... and in particular
there is a very different mechanistic
model that looks quite similar.
So this is the Fisher log series.
And the argument behind the Fisher log
series, to explain this distribution,
involves the idea of a "hidden" additional
constraint.
In the open source question, what I've
done is describe that additional
constraint as "programmer time", just
because it seems like it might be a
constraint in the system. OK?
That the average programmer time
for languages is fixed, not just the
average number of projects.
But, and so that means that languages
can vary in their popularity, but also
in their efficiency. In the ecological
modelling, this is "species"
languages are species, and this is the
abundance of species.
So that means the number of particular
instances of the species in the wild.
And also metabolic rate: how much energy
a particular species consumes.
And so in that case, the system is
constrained to a certain average
species abundance, and a certain average
species energy consumption
Here languages are constrained to a certain
abundance, and a certain consumption of
programmer energy. That's the analogy.
So, we can also build a mechanistic model.
of programming language popularity.
And previously, when we studied the taxi-cab
problem, what we did was,
when we produced the mechanistic model,
we were able to find a very simple one
that had the same predictions as the
MaxEnt model did.
Here, by contrast, what we're going to find
is that the mechanistic model
is going to produce similar behavior, but
the functional form will actually be
slightly distinct. So, here's the mechanistic
model... we imagine that
languages all start out with a baseline
popularity. Whoever invents the language,
for example, has to write
at least one project. There is at least one
programmer at the beginning
of a language's invention, who knows how
to program in that language, somewhat
by definition. And so there's two ways
that that popularity can grow.
It can grow, for example, linearly.
So, on day 1 there's 1 programmer.
And on day 2, that one programmer is
joined by another programmer.
And on day 3, those two programmers
are joined by a third.
And so, over time, what you have is
a growth rate that's linear...
in time.
But, perhaps a more plausible model
for how languages accrue popularity
is multiplicative.
At time 1, there's 1 programmer, and he has
some efficiency of converting other
programmers to his cause. So maybe he's
able to double the number of programmers.
And he's able to double the number of
programmers, because his language
is particularly good, and perhaps perhaps
people who like to program in that language
happen to be particularly persuasive.
And so on the second day, those two
programmers each themselves
go out and convert two people,
because they are the same as the
original programmer in their effectiveness
and the language itself is just as
convincing as it was before.
So each of those two programmers goes out
and gathers two for each and we go to 4
And by a similar argument, we go to 8,
and so this would be the
exponential growth model...
where the number of programmers
as a function of time increases
multiplicatively, as opposed to additively.
So, let's make this model a little more
realistic, and in particular, let's allow
the multiplicative factor,
which in this case we set to 2, we're
going to allow this multiplicative factor
to vary. And in fact, we're going to draw
this multiplicative factor, alpha, from some
distribution. And in fact, it doesn't really
matter what that distribution is
as long as alpha is always greater than 0,
so it's not possible for all programmers
to suddenly disappear.
so it's always greater than zero,
and it's bounded at some point,
so it's impossible for a language to become
infinitely popular after a finite number
of steps. So we're going to draw...
each day we're going to draw a number,
alpha, from this distribution, here.
So, after one day, there are alpha programmers.
After two days, there is alpha... or rather
alpha(1) programmers. (This is the
draw on the first day.) On the second day
there's alpha(2) times alpha(1)
programmers, and so on.
alpha(3) times alpha(2) times alpha(1)
So this is now growth that occurs through
a random multiplicative process.
It's similar to growth that would happen
through a random additive process
except now, instead of adding a random
number of programmers each day
you multiply the total number of
programmers each day, by some factor alpha
drawn from this distribution.
So, you can always convert this multiplicative
process into an additive process,
by a very simple
trick of taking the logarithm.
Over time, if we count programmer numbers
we're multiplying, but if you're working in
log space, we're just adding.
We're adding a random number to the
distribution, as long as alpha is always
strictly greater than zero, these will
always be well defined.
Now, all of a sudden, it looks like the
additive model in log space.
And what we know from the central limit
theorem, is that if you add together
lots of random numbers, that distribution
tends towards a Gaussian distribution.
with some particular mean (mu) and some
particular variance (sigma).
Let's not worry about what mu and sigma
are in particular, but rather note that
that growth happens in log space
The distribution of these sums over long
time scales will end up looking like a
Gaussian distribution.
The average boost per day to a language
looks in log space like a Gaussian
distribution. What that means
is that the exponential growth model
with random kicks, random multiplicative
kicks, actually looks like
a Gaussian in log space, or what we call
a log-normal
in actual number space
So, instead of looking at the logarithm of
the popularity of the language,
just look at the total popularity of
the language, and what that means is
that it looks like the exponential of
log(n) minus some mean squared
over two sigma squared... and then you
just have to be careful to normalize
things properly here.
So, this is the log-normal distribution.
And a mechanistic model where language
growth happens multiplicatively
where a language gains new adherents
in proportion to the number of adherents
it already has, where a language gains
new projects in proportion to the number
of projects it already has
dependent upon the environment -
that's where the multiplicative randomness
comes from. Alpha is a random number
it's not a constant. It's not 2. It's not
the language always necessarily doubles.
But the fact that it grows through
a multiplicative random process
as opposed to an additive process
means that you have a log-normal growth.
And so now you can say, "OK, let's imagine
that languages grow through this
log-normal process.
And let's find the best fit parameters
for mu and sigma." And if you do that, you find
that the mechanistic log-normal model looks
pretty good as well.
We were impressed by how well
the blue line fit this distribution
compared to the red exponential model
the MaxEnt model, constraining only N
That was the red model. Here the blue
model does well... this is the Fisher-log
series.
Unfortunately, a mechanistic model... and
I've given you a short account
of the mechanistic model, here.
Where what's happening is you're adding
together lots of small multiplicative
random kicks
The mechanistic model also works [?]
I will tell you that this fits better.
If you do a statistical analysis, both of
these models have two parameters
If you do a statistical analysis, the
Fisher-log series actually fits better
in particular, it's able to explain these
really high-popularity languages better
these deviations here seem larger
than the deviations here, but you have
to remember that this is on a log scale
So this gets much closer up here
than this does here.
So the mechanistic model, at least
visually, looks like it's extremely
competitive, with the Fisher log
series model
derived from a MaxEnt argument
Statistically speaking, if you look at
these two, this one
is actually slightly dispreferred.
But like many people, what you want is some
ironclad evidence for one versus the other.
And I think the best way to look for
that kind of evidence is to figure out
what, if anything, this epsilon really is
in the real world.
If we were able to build a solid theory
about what epsilon was, and how we could
measure it in the data, then we could see if
this here, this joint distribution, was
well reproduced.
If we could find evidence, for example,
for the fact that these two co-vary.
That here we have a term that boosts
the popularity of a language if it becomes
more efficient. So, if this goes down,
this can get higher, and the language
can still have the same probability
of being found with those properties.
And of course, the problem is that we don't
know how to measure this, sort of,
mysterious programmer time...
programmer efficiency.
The ecologists have a much better time
with this.
Because the ecologists, they know what
their epsilon is.
They know that their epsilon is metabolic
energy units intake.
So this is "how much a particular instance
of this species consumes in energy
over the course of a day, or
over the course of its lifetime."
And they're able to measure that, and
in fact, they're able to measure this
joint distribution. If we come to study
the open source ecosystem, so far
we don't really have a way to measure this
and so we're unable to measure the joint
and so now we're left with one model that's
mechanistic, right, popularity accrual model
and over here, this model that talks about
there being two constraints on the system
Average number and average
programmer time
Lo que le mostré en la unidad anterior
fue una manera de rescatar los modelos de
máxima entropía
para describir la
abundancia de lenguajes P(n)
en función de una variable escondida,
epsilon, que llamamos
"tiempo del programador"
y asumimos que el sistema estaba
restringido de dos formas:
Estaba restringido no solo a tener
un cierto numero promedio de proyectos
por lenguaje, también fijamos
la popularidad promedio
de los lenguajes, pero también fijamos
el promedio del tiempo del programador
dedicado a los proyectos
en un lenguaje en particular.
Entonces esta distribución,
aquí, se ve así,
en su forma funcional, y cuando integramos
en esta variable, epsilon, obtenemos
algo que se ve como esto.
Así que obtenemos una predicción diferente
para le distribución de los lenguajes.
Obtenemos una predicción que, digo yo,
se ve razonablemente bien.
Ciertamente se ve mejor que la
distribución exponencial.
Me siento obligado comentarle
acerca de la controversia
que hay cuando tratamos de hacer
estos modelos… En particular
hay un modelo muy diferente que
se ve bastante similar.
Es la serie de logaritmos de Fisher.
Y el argumento detrás
de la serie de Fisher,
para explicar esta distribución,
implica la idea de
una restricción adicional "oculta".
En la pregunta del código abierto,
lo que e hecho es incluir esa
restricción adicional como
"tiempo de programación", solo porque
parecía que seria una restricción en el
sistema, ok? Que fijáramos el promedio del
tiempo de programación por lenguaje, no
solo el numero promedio de proyectos.
Pero, y eso significa que los lenguajes
pueden variar su popularidad, y también
su eficiencia, en el modelado ecológico,
esto son especies
los lenguajes son especies, y esto es la
abundancia de especies,
lo que se interpreta como la variedad de
una especie en la naturaleza,
y también su metabolismo, cuanta energía
consume una especie en particular.
Entonces en este caso, el sistema esta
restringido al numero promedio
de abundancia de especies, y al promedio
de energía consumida por especie.
Aquí los lenguajes están restringidos a
una cierta abundancia, y a un cierto
consumo de energía de programador,
esa es la analogía.
Así que también podemos construir un
modelo de popularidad
de lenguajes de programación.
Y previamente cuando estudiamos el
problema de los taxis, lo que hicimos fue
cuando construimos el modelo, encontramos
uno muy simple era capaz de reproducir
las predicciones del modelo de
máxima entropía.
Aquí, por el contrario, lo que vamos a ver
es que el modelo va a producir
un comportamiento similar, pero la forma
funcional sera ligeramente distinta.
Así que este es el modelo…
imaginamos que
todos los lenguajes empiezan con una
popularidad mínima,
el que inventa un lenguaje, por ejemplo,
tiene que escribir al menos un proyecto,
hay al menos un programador
cuando un lenguaje es inventado,
que sabe como programar en ese lenguaje,
por definición.
Entonces la popularidad puede crecer
de dos formas.
Puede crecer, por ejemplo, linealmente,
así que en el día uno hay un programador,
en el día dos, se le uno otro programador
a ese programador.
y en el día tres, se une
un tercer programador,
y así, en el tiempo lo que obtiene
es una taza de crecimiento lineal…
Pero, quizás un modelo mas plausible
sobre como crece la popularidad
es que sea multiplicativamente…
en t 1, hay un programador, y tiene
una cierta eficiencia de convencer a otros
programadores para que se unan a la causa,
así que tal ves es capaz de duplicar
el numero de programadores.
Si es capaz de duplicar
el numero de programadores, porque
su lenguaje es particularmente bueno,
y tal vez la que usa ese lenguaje,
por coincidencia, es
particularmente persuasiva.
Así que en el segundo día, esos dos
programadores, cada uno,
buscan y convierten a dos personas,
porque son tan efectivos como
el programador original
y el lenguaje en si mismo es
tan convincente como lo era antes.
Entonces cada uno de
los programadores salen
y consiguen dos cada uno,
y así tenemos cuatro,
y por un argumento similar,
llegamos a 8,
y así este seria un modelo de
crecimiento exponencial…
donde el numero de programadores
en función del tiempo incrementa
multiplicativamente,
en vez de aditivamente.
Así que, vamos a hacer este modelo un poco
mas realista, en particular
permitamos al factor multiplicativo,
que en este caso lo ponemos en 2,
vamos a permitir que este factor varíe,
de hecho, vamos a sacar
este factor multiplicativo, alfa,
de una distribución,
de hecho, realmente no importa de que
distribución sea
mientras que el alfa sea mayor que cero,
para que no sea posible que todos
los programadores desaparezcan de repente.
así que es simple mayor que cero,
y esta limitada en algún punto,
para que sea imposible que un lenguaje
se vuelva infinitamente popular después de
un numero finito de repeticiones.
Así que vamos a tomar…
Cada día vamos a tomar un numero,
alfa, de esta distribución, esta de aquí.
Así, después de un día,
hay alfa programadores,
después de dos días, hay alfa… Mas bien,
alfa(1) programadores,
este es el numero del primer día, en el
segundo día hay alfa(2) veces alfa (1)
programadores, y así, alpha(3) veces
alpha(2) veces alpha(1).
Así que ahora crecimiento ocurre a travez
de un proceso multiplicativo aleatorio.
Es similar al crecimiento que ocurriría
a travez de un proceso aditivo aleatorio,
excepto que ahora en vez de sumar
un numero aleatorio de
programadores cada día,
multiplica el numero total de
programadores cada día,
por algún factor alfa
sacado de esta distribución.
Así, usted siempre pude
convertir este proceso
multiplicativo en uno aditivo
de una forma muy simple,
el truco es usar el logaritmo.
Con el tiempo, si contamos el numero
de programadores
que estamos multiplicando, pero estamos
trabajando en el espacio de logaritmos,
solo estamos sumando, estamos sumando
un numero aleatorio
a la distribución, siempre que alfa
sea estrictamente mayor que cero, esto
estará bien definido.
Ahora, de repente, en el espacio log.
Se parece al modelo aditivo.
Y algo que sabemos del teorema
del limite central es que si suma
muchos números aleatorios,
esa distribución tiende
a una distribución Gaussiana,
con alguna media, mu, y
una variancia, sigma, particulares.
No nos preocupemos acerca del valor
particular de estas,
sino mas bien, note que el crecimiento
ocurre en el espacio de logaritmo.
La distribución de estas sumas para
un largo tiempo terminara viéndose como
una distribución Gaussiana.
El crecimiento diario
promedio de un lenguaje
se ve en el espacio log. Como una
distribución Gaussiana, lo que significa
es que el modelo de
crecimiento exponencial
con empujones aleatorios,
empujones multiplicativos aleatorios,
realmente se ve como una Gaussiana en el
espacio log. O lo que llamamos log-normal
en el espacio de números.
Entonces, en cambio de ver el logaritmo
de la popularidad de un lenguaje,
solo mire la popularidad total
de un lenguaje,
y lo que eso significa es
que se ve como una exponencial del
log(n) menos alguna media al cuadrado
sobre dos sigma cuadrado…
Y después usted solo tiene que ser
cuidadoso al normalizar cosas aquí.
Entonces esta el la
distribución log-normal,
(Falta signo menos)
y un modelo simple donde el crecimiento
de un lenguaje ocurre multiplicativamente
donde un lenguaje gana nuevos adeptos
en proporción al numero de adeptos
que ya tiene,
donde un lenguaje gana nuevos proyectos
en proporción al numero
de proyectos que ya tiene, que ya
depende del ambiente, es de ahí que viene
la aleatoriedad de la multiplicación,
alfa es un numero aleatorio,
no una restricción,
no es 2, el lenguaje no necesariamente
tiene que duplicarse siempre,
pero el hecho de que pase por
un proceso multiplicativo aleatorio
en cambio de un proceso aditivo,
significa que tiene tendrá
un crecimiento log-normal,
y entonces puede decir,
"Ok, entonces imaginemos
que el lenguaje crece a travez de este
proceso log-normal,
y encontremos los parámetros
que mejor se ajusten para
mu y sigma". Y si hace eso, encontrara
que el mecanismo del modelo log-normal
también se ve muy bien.
Estábamos impresionados por lo
bien que la linea azul se ajustaba
a esta distribución al compararla con el
modelo exponencial rojo,
el modelo de máxima entropía,
restringiendo solo N,
ese era el modelo rojo.
Aquí al modelo azul le va bien…
Este es el modelo de
la serie de Fisher-log
Desafortunadamente, es un modelo simple…
Le he dado un resumen del modelo, aquí,
lo que pasa con este modelo es que
usted esta sumando muchos pequeños
empujones multiplicativos,
el modelo simple funciona también.
Le diré que este se ajusta mejor,
si hace un análisis estadístico, ambos
modelos tienen dos parámetros,
si hace un análisis estadístico, la serie
Fisher-log en realidad se ajusta mejor
en particular, es capas de
explicar estos lenguajes
de popularidad realmente alta,
estas desviaciones de aquí parecen mayores
que las desviaciones de aquí,
pero tiene que recordar
que esto esta en una escala logarítmica,
así que esto se acerca mucho
mas aquí arriba
que lo que este aquí.
Así que el modelo simple, al menos
visualmente parece que es
extremadamente competitivo con el
modelo de la serie de Fisher-log
derivada de un argumento
de máxima entropía.
Estadísticamente hablando,
si ve estas dos,
esta, de hecho esta es
ligeramente menos preferible
Pero, como mucha gente, lo que quiere es
evidencia que refuerce esta contra esta,
y yo creo que la mejor forma de buscar
ese tipo de evidencia es averiguar
que, si existe, es este
epsilon en el mundo real,
si fuéramos capases de
construir una teoría solida
acerca de que es epsilon,
y como podríamos medirlo en los datos
entonces podríamos ver si esto de aquí,
esta distribución conjunta,
estuviera bien recreada,
si pudiéramos encontrar evidencia,
por ejemplo, el hecho de
que estas dos co-varian,
de que aquí tenemos un
termino que impulsa la popularidad
de un lenguaje si se vuelve mas eficiente.
Entonces, si esto baja, esto puede subir,
y el lenguaje puede aun tener la misma
probabilidad de de ser encontrado
con esas propiedades,
y claro, el problema es que no sabemos
como medir este,
tipo de misterioso, tiempo de programador…
eficiencia de programador.
A los ecologistas les va mejor con esto,
porque los ecologistas
saben cuanto es su epsilon,
ellos saben que su epsilon es la
unidad de consumo de energía metabólica,
Así que es "cuanta energía consume una
cierta especie en un día,
o en toda su vida",
y ellos son capases de medir eso, y
de hecho, son capases de medir
esta distribución conjunta.
Cuando estudiamos el ecosistema del
código libre
hasta ahora, no tenemos una manera
de medir esto, y por
eso somos incapaces de
medir esta distribución conjunta, entonces
acabamos con un modelo simplificado
de incremento de la popularidad
y por aquí, este modelo que trata sobre
la existencia de dos
restricciones en el sistema,
numero promedio y tiempo de
programador promedio.