ehsan66 / ICAOD

Finding Optimal Designs for Nonlinear Models
0 stars 0 forks source link

Total Cost of an Empire #1

Open lsandig opened 1 year ago

lsandig commented 1 year ago

Hi, while trying to understand the details of how ICAOD works, I noticed a discrepancy between the paper and the implementation. Eq. (13) in the article gives the total cost of an empire as

Q_i = c_i - \zeta \frac{1}{N_i} \sum_{r=1}^{N_i} d_{r,i}

with

On the other hand, the implementation seems to be essentially

ImperialistCost + zeta * mean(ColoniesCost)

https://github.com/ehsan66/ICAOD/blob/08a95cf543c6ac7dbd216efe5f85f02783d87538/R/2-InternalCommonFunctions.R#L131 https://github.com/ehsan66/ICAOD/blob/08a95cf543c6ac7dbd216efe5f85f02783d87538/R/2-InternalCommonFunctions.R#L385 https://github.com/ehsan66/ICAOD/blob/08a95cf543c6ac7dbd216efe5f85f02783d87538/R/2-InternalCommonFunctions.R#L535 https://github.com/ehsan66/ICAOD/blob/08a95cf543c6ac7dbd216efe5f85f02783d87538/R/3-UserMinimaxFunctions.R#L2705 https://github.com/ehsan66/ICAOD/blob/08a95cf543c6ac7dbd216efe5f85f02783d87538/R/6-UserBayesFunctions.R#L1103

Have I overlooked a flipped sign somewhere, or is this an error?

ehsan66 commented 1 year ago

Both versions should be correct. As I remember, in the manuscript for the sake of simplicity for a minmax problem, the algorithm for a maximization problem was intruduced. Here, it could be the minimazion problem. But I dont have the manuscript to check.

lsandig commented 1 year ago

I don't think it is due to the difference between a minimization / maximization problem. When we flip the sign of the objective function, this should affect both of $ci$ and $d{r,i}$, and not just one of them. FWIW, Atashpaz-Gargari/Lucas (2007) and also Lin et al. (2013), which you cite, have the "+" variant.