OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Is there a way to speed up vectorized log operations in scipy optimize?

  • Thread starter Thread starter we_are_all_in_this_together
  • Start date Start date
W

we_are_all_in_this_together

Guest
I'm doing some optimization in which I am calculating the $ amount needed to get the change in conversion using elasticities. Originally, I used simple elasticities but am thinking of converting to compounding elasticities. However, just doing this simple switch has increased the time it takes for me to optimize dramatically, I'm talking about like from 3 minutes to like days.

Simple Elasticity:

Code:
(ChangeInConversion * 100 / Elasticity) * -1

Compounding Elasticity:

Code:
(np.log(1 + ChangeInConversion ) / np.log(1 + Elasticity)) * 100 * -1

Are there ways to speed things up, or is this an expected behavior if you start using logs in your optimization functions? I'm using the Scipy Optimize package. Both ChangeInConversion and Elasticity are vectors of values (np.arrays).

Thanks!
<p>I'm doing some optimization in which I am calculating the $ amount needed to get the change in conversion using elasticities. Originally, I used simple elasticities but am thinking of converting to compounding elasticities. However, just doing this simple switch has increased the time it takes for me to optimize dramatically, I'm talking about like from 3 minutes to like days.</p>
<p>Simple Elasticity:</p>
<pre><code>(ChangeInConversion * 100 / Elasticity) * -1
</code></pre>
<p>Compounding Elasticity:</p>
<pre><code>(np.log(1 + ChangeInConversion ) / np.log(1 + Elasticity)) * 100 * -1
</code></pre>
<p>Are there ways to speed things up, or is this an expected behavior if you start using logs in your optimization functions? I'm using the Scipy Optimize package. Both <code>ChangeInConversion</code> and <code>Elasticity</code> are vectors of values (np.arrays).</p>
<p>Thanks!</p>
 

Latest posts

I
Replies
0
Views
1
Isaac P. Liu
I
U
Replies
0
Views
1
user3658366
U
G
Replies
0
Views
1
Giampaolo Levorato
G
M
Replies
0
Views
1
Marcelo Rodrigo Nascimento
M
Top