Calibration of the metric for E. coli: Preliminary results

I use the model for growth that is used in Figure 4.


(and use internal variables from now on)

New metric:

K>> hist(p)

K>> hist(log10(p))

K>> sum(p<.05)
ans =

Looks good, but I will repeat it with more repetitions.

Now I test the old metric:

K>> hist(p2)

K>> hist(log10(p2))

K>> sum(p2<.05)
ans =

K>> sum(p2<.1)

ans =

It seems there was a bias. I will also repeat it with more repetitions.


New Figure 4

Growth 0.1. New maintenance. Old data. New metric.

>> fig_pap_coli_11(1,1)


Growth 0.4:

>> fig_pap_coli_11(1,1)

Idea about Bayes

The problem with Bayes is that one must try all probability distributions with all possible parameters. I still think there should be a way to avoid this. What about this one?

What Bayes is actually doing is comparing how low is the cost in the actual configuration, compared with how low it could have been. We might do it by finding the ratio of the cost in the actual configuration, over the average cost for all configurations. This average cost might be computed along each neuron, or at a random sample in the whole space.

Warning: Perhaps all wrong in neuron branching

In principle, our way of finding the optimal diameter was wrong: Murray’s law is satisfied by optimal systems, but is not a recipe to find the optimum. To do so, one must know the cost parameters (relation between the two terms and relative ‘importance’ of each branch), and then calculate the cost. When we just fix two branches and calculate the third with Murray’s law, we are implicitly changing the parameters of the cost (we go to a bifurcation whose ‘best fitting’ parameters are different than the initial ones). If we calculate the new cost with the old parameters, in some cases it may increase instead of decrease. For example:

>> d1=2; d2=1; d3=1;
>> C=L1*d1^2 + L1/d1 + L2*d2^2 + .5*L2/d2 + L3*d3^2 + .5*L3/d3
C =
>> d1^3-d2^3-d3^3
ans =
>> d2=(d1^3-d3^3)^(1/3);
>> d1^3-d2^3-d3^3
ans =
>> C=L1*d1^2 + L1/d1 + L2*d2^2 + .5*L2/d2 + L3*d3^2 + .5*L3/d3
C =

However, I think it is possible to do it correctly. For example, one can first calculate reasonable parameters for the network, and then calculate the optimum for each branch, with respect to those parameters. Also, do not think that the results found so far are completely meaningless: Although they are strictly incorrect, they do indicate a trend to larger deviations for shorter branch lengths.

New Figure 3 (Bayes)

>> fig_pap_bayes_09(1,zeros(100))

Correction in the neuron branching data (lengths)

Something trivial: For some reason, they were in tenths of milimiter. I divide over 10, so that they are now in mm.

>> clear
>> load(‘c:\hipertec\BranchingNeurons\Datos\datos_branching.mat’)
>> longitudes=longitudes/10;
>> save(‘c:\hipertec\BranchingNeurons\Datos\datos_branching.mat’)

Branching in neurons: Looks good

I will calculate the diameter of mother branches, instead of the diameter of children branches.

Advantage: Only one branch is used per calculation, while if we calculate the children we use each branch twice.
Disadvantage: We get fewer data (about one half).
Note: It is unclear to me which is the correct way of doing it. Depends on what is actually tuned in the animal, and that is unknown (it will probably be a combination of the three diameters).

>> load datos_branching
>> diametros_opt=primarios_opt(diametros,bifurcaciones,3);
>> plot(abs(diametros-diametros_opt),longitudes,’.’)
>> xlabel(‘Deviation (\mum)’)
>> ylabel(‘Length (mm)’)

Looks right, but lacking statistics. I remove the absolute value:

>> plot((diametros-diametros_opt),longitudes,’.’)

More positive deviations than negative. We see this better with the histogram:

>> hist(diametros-diametros_opt,20)
>> xlabel(‘Deviation (\mum)’)

This agrees with the shape of the cost, which is much steeper in for negative deviations.

We compute the metric, which takes into account both the effect associated to length, and the effect associated to the sign.

>> [m,coste_real,coste_perm,errormedio]=metrica_branching_02(diametros,bifurcaciones,longitudes,10^5,3,1);
>> m
m =
>> hist(coste_perm,200)
>> hold on
>> ejes=axis;
>> axis(axis)
>> plot(coste_real*[1 1],ejes(3:4),’r’)

I’d say it is as good as was to be expected, taking into account the small amount of data that we have.


Surprisingly, it works worse:

>> diametros_opt=secundarios_opt(diametros,bifurcaciones,3);
>> plot(abs(diametros-diametros_opt),longitudes,’.’)

This looks reasonable, and the three possible outlayers may be compensated by the better statistics. But the sign of the deviations does not help here:

>> plot((diametros-diametros_opt),longitudes,’.’)

>> hist(diametros-diametros_opt,20)

Deviations are mostly negative. Now I see that this had to happen: If the mother is too thick (positive deviation) then the children are too thin (negative deviation).

The metric is not so good as in the other case:
>> [m,coste_real,coste_perm,errormedio]=metrica_branching_02(diametros,bifurcaciones,longitudes,10^5,3,2);
>> m
m =

I compute the metric again, but using the old program, which does not take into account the sign of the deviation (or at least not fully, because it keeps the sign of deviations, only randomizing the order. Thus, in the permuted systems there are the same number of deviations of each sign, so we still have the bias).

>> [m,coste_real,coste_perm,errormedio]=metrica_branching_02_03ago09(diametros,bifurcaciones,longitudes,10^5,3,2);
>> m
m =

Results improve, being better than those got for the mothers (probably due to the better statistics).

Second exploration of phase transitions: Transitions due to alternate optima

>> x=-1:.00001:1;
>> coste=(abs(x-.5)).^.5+.7*(abs(x+.6)).^.5;
>> plot(x,coste)

>> [calorespecifico,T,costemedio,varianza]=coste2calorespecifico(coste,[0 .5],1);

Apparently, no effect with just a change in the slope:

>> coste=(abs(x-.5)).^1+.7*(abs(x+.6)).^1;
>> plot(x,coste)

>> [calorespecifico,T,costemedio,varianza]=coste2calorespecifico(coste,[0 .5],1);

First exploration of phase transitions: Fake transitions due to the binning.

I study the specific heat without doing the simulated annealing. I just assume one state per bin, and compute the probability as exp(-cost/temperature) for each state. Then the specific heat is the variance of the cost divided by the square of the temperature.

It seems that the binning may produce fake phase transitions near zero temperature, when the cost is narrow near the minimum:

Quadratic cost, and no fake phase transition despite the coarse binning:

>> x=-1:.01:1;
>> coste=(abs(x)).^2;
>> [calorespecifico,T,costemedio,varianza]=coste2calorespecifico(coste,[0 1],1);

Linear cost, and the fake phase transition appears:

>> coste=(abs(x)).^1;
>> [calorespecifico,T,costemedio,varianza]=coste2calorespecifico(coste,[0 .5],1);

Much more evident for sublinear cost:

>> coste=(abs(x)).^.5;
>> [calorespecifico,T,costemedio,varianza]=coste2calorespecifico(coste,[0 .5],1);

If I make a tighter binning, the maximum changes a lot (it even disappears if the binning is tight enough):

>> x=-1:.00001:1;
>> coste=(abs(x)).^.5;
>> [calorespecifico,T,costemedio,varianza]=coste2calorespecifico(coste,[0 .5],1);