[PYTHON MATRIX-SIG] Final conventions for alpha2
Mon, 19 Aug 1996 21:37:49 +0100 (BST)
On Mon, 19 Aug 1996, Konrad HINSEN wrote:
> > This is called "selection" (one of the 3 main operators) operators.
> I am not sure what you are referring to. Is that a special term from
> GA applications?
Sorry, I edited that line about three times and it doesn't make sense.
Selection is one of the three main GA operators, i.e., just about every GA
would include a line:
Offspring = my_take(Parents,indices,axis=(-1 or -2))
I will not insist on the default axis issue, since you have obviously
given a lot more thought to the subject than I can claim to have done. As
long as the default values are documented and explained, that should be
fine. But even if take and friends should have axis=0 by default, please,
not sort(), argsort() and fft(), and any other matrix operations. :-)
> Unless your array is very big, this variant might actually be more
> expensive than the first one, because it involves three interpreted
> function calls. The best solution for such applications would be
> a special function that inverts a permutation (which is O(N), unlike
> sorting). Than you would write
> rank = inv_permutation(argsort(cost))
> This function would potentially be more generally useful than your
I hadn't thought of that, but I agree with you here.
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com