On Fri, 10 Feb 2012, Luca wrote:
> I have a confidence value that can be associated with the solution
> given by an optimization routine and it is as follows:
>
> C = exp(-A)/(exp(-A) + exp(-B))
>
> where A, B and C are some energy values returned by the optimization
> routine and C represents the confidence or the probability assigned to
> the solution A. Also, B is always greater than A.
>
> After some simple manipulation, the expression becomes:
>
> C = 1.0 / (1 + exp(A-B))
>
c = 1/(1 + e^(a - b))
> Now, in the beginning my issue was that the values A, B and C were
> usually quite large (in tens of thousands). So this expression was
> giving values of 0.5 when A and B were very close and when the
> difference was something a bit larger (in absolute numbers), then the
> expression would basically become 1.
No, it would basicaly be 0 or 1.
If a and b are very close, then e^(a-b) is close to 1 and c close to 1/2.
If a << b, then a - b is very negative and c is close to 1.
If b <= a, then a - b is very positive and c is close to 0.
(x << y notation for x is much smaller than y, y is much larger than x)
> So, I realized I needed to do some normalization and the first thing I
> tried was divide everything by A. So, now the expression becomes:
>
> C = 1.0 / (1 + exp(1-B/A))
>
1/(1 + e^(a-b)) does not equal 1/(1 + exp(1 - b/a))
which has different behavior for b << a.
c = 1/(1 + (exp(1 - b/a))^a) provided 0 < 1 - b/a.
> Now typically B/A is something from 1 to 1.01. So, now I have a
> similar problem: As exp(1-B/A) will basically be 0.5.
>
> So, what I would like to do is introduce some scaling, normalization
> on this expression that would help me basically capture the changes in
> my data range. I would be grateful for any suggestions that anyone
> might have.
>
c = e^(-a) / (e^(-a) + e^(-b)) = 1/(1 + e^a e^(-b))
= e^b / (e^a + e^b) = 1/(1 + e^a / e^b)
Use the ratio of e^a to e^b, it'll be more accurate.
-- ??
1/c = 1 + e^a / e^b
-log c = log 1/c = sum(n=1,oo) ((-1)^(n+1) (e^a / e^b)^n / n)
log c = sum(n=1,oo) ((-1)^n (e^a / e^b)^n / n)
----