Scaling expression for better data range?

In summary, the participants in the conversation discuss an issue with scaling an expression involving energy values and confidence levels. They consider using normalization and a scaling factor to address the problem, with one suggestion being to use derivative information to determine the appropriate value for the factor variable.
  • #1
pamparana
128
0
Hello everyone,

I have a bit of an issue regarding scaling of an expression. So, the scenario is as follows.

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))

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.

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))

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.

Thanks,
Luca
 
Mathematics news on Phys.org
  • #2
For some reason, for me this formula resembles Statistical Mechanics, more exactly the Partition Function.

If this formula didnt come directly from it, maybe you could read about it, see if it applies to your problem, and see if there is already some technique for doing what you want.
 
  • #3
Hello,

it is sort of derived from the Ising model but actually it is just a coincidence that it looks like the partition function.

My problem is actually much simpler:

So, ok.

C= 1 / (1 + e^(B/A)) for the moment assume B >= A, So C can range from 0.5 to 1.

Typically, B/A ranges from 1 to 1.01. What I would like to do is have some sort of scaling so when B/A is "close" to 1, then C is close to 0.5 but when it starts to diverge, then C starts to get closer to 1. However, I do not want a linear scale as I want to exaggerate the differences.

I can now a priori what the maximum B and A values will be. I was wondering what suitable function can I use. One thing that comes to mind is to actually use the exponential:

So,

C = 1 / (1 + e^(e^(factor)*B/A)).

However, I am not sure how I can derive this "factor" term in a suitable way from B and A values that would make sense.

Thanks,

Luca
 
  • #4
Hey pamparana.

Have you considered modelling your variables on derivative information?

Basically what I am getting at is using derivative information to work backwards to get an empirical value for your 'factor' variable. So if you specify specific derivative behaviour at some given point, then you can use that to get equations for 'factor' and hence evaluate it for those given conditions.
 
  • #5


I understand your concern with scaling this expression. One possible solution could be to use a logarithmic scale for your values A and B, as they are currently in the thousands. This would allow for a wider range of values to be captured and may help with the issue of the expression becoming 1 for larger differences between A and B. Additionally, you could try using a different normalization factor, such as dividing by the mean or standard deviation of your data set, instead of just A. This could help capture the changes in your data range more accurately. Another option could be to use a different function instead of the exponential, such as a sigmoid function, which would also allow for a wider range of values to be captured. Ultimately, the best approach would depend on the specific characteristics of your data and what you are trying to achieve with this expression. I hope these suggestions are helpful and wish you success in finding a solution that works for your needs.
 

What does it mean to "scale" an expression?

Scaling an expression means to modify it by a common factor, in order to change the size or scope of the expression. This can involve multiplying or dividing the expression by a constant value.

Why would you want to scale an expression?

Scaling an expression can be useful for a variety of reasons, such as simplifying calculations, adjusting the units of measurement, or comparing different data sets. It can also help to make an expression more visually appealing or easier to understand.

How do you determine the appropriate scale for an expression?

The appropriate scale for an expression will depend on the specific context and goals of the analysis. Factors such as the range of values, precision needed, and desired level of detail can all influence the choice of scale. It may require some trial and error or consultation with other experts to determine the most suitable scale for a given expression.

Can you scale an expression by a negative value?

Yes, it is possible to scale an expression by a negative value. This will result in the expression being reflected or inverted, depending on the type of scale used. For example, if a graph is scaled by a negative value, the resulting graph will be a mirror image of the original.

Are there any limitations to scaling an expression?

While scaling can be a useful tool, there are some limitations to consider. Scaling an expression by a very large or very small value can result in loss of precision or important details. Additionally, scaling cannot change the fundamental properties or relationships within an expression, so it may not always be the best approach for achieving certain goals.

Similar threads

Replies
7
Views
977
Replies
1
Views
731
  • General Math
Replies
4
Views
826
Replies
5
Views
1K
Replies
4
Views
596
Replies
13
Views
1K
Replies
2
Views
1K
Replies
6
Views
1K
Replies
3
Views
856
Back
Top