« first day (2111 days earlier)      last day (2733 days later) » 

11:01 PM
I think it would help to say uniform is on the Haar measure
 
is that explicable in less technical language?
very few people will know what it means
 
or, less intimidatingly, is a distribution invariant under applying any fixed orthogonal matrix to either side
actually, i guess what is important is to emphasize that this is a continuous distribution, and so being uniform is a matter of density
 
Matrix of reals I assume
 
I added a quote from the wiki
@HWalters yes they have to be real
 
unlike in the discrete case, a one-to-one mapping of values from a uniform distribution might not lead to a uniform distribution
would you allow the following strategy: generate random matrices up to machine precision, test if they are orthogonal up to machine precision, accept the first that succeeds?
oh, wait, that's rule out by the running time
 
11:05 PM
it is indeed :)
I did anticipate that
 
:)
 
:)
 
Real numbers can't be represented on a computer, so mathematical definitions using them don't really apply.
What is "orthogonal" or "uniform" for IEEE 754 numbers?
 
yes, i was wondering if there are practical ambiguities due to machine precision
 
0
Q: Code golf a random orthogonal matrix

LembikAn orthogonal matrix is a square matrix with real entries whose columns and rows are orthogonal unit vectors (i.e., orthonormal vectors). This means that M^T M = I, where I is the identity matrix and ^T signifies matrix transposition. The task is to write code that takes a positive integer n >...

 
11:06 PM
I don't want to make this the focus. Do I really need to say how close to the identity M^T M is?
I added that I should be the identity to 4 decimal places
I really don't want this to be about machine precision
 
that's fair
might special orthogonal make for a cleaner challenge?
 
what is special orthogonal?
 
determinant 1
 
is that over a group?
hmm..
 
it's a subgroup: all orthogonal matrices have determinant 1 or -1
there's 2 identical connected components
 
11:10 PM
it's an interesting question
why would that be cleaner though?
 
i suspect the most common method to generate an orthogonal matrix would be to generate a special orthogonal one, then with 50% chance flip the first row
 
Why would you post the question in the middle of a discussion of how to improve it?
 
@feersum I actually posted it before but the notice came up in the middle
but your question still holds
it probably wasn't the best move.. the problem is I need to go to sleep
 
i'd suggest at least a note that this is orthogonal, not special orthogonal, so people don't miss the difference
when i googled random orthogonal matrix, some SO methods came out
 
@xnor done
thanks..it's great there are people here who are good at math!
I did think about having it as fastest-code as that is really my favourite :)
but I think there are very few people interested in those
 
11:15 PM
is a library function that generates a random gaussian matrix ok?
i.e. uniform independent gaussian in each entry
 
@xnor as long as it isn't orthogonal then yes
 
how about a function that performs the gram-schmidt decomposition to orthogonalize a matrix?
 
I think so yes
I did wonder about excluding those
I can still change my mind if you convince me :)
 
when you say then "which creates orthogonal matrices", you mean that outputs a random orthogonal matrix, rather than one whose output is guaranteed orthogonal?
 
I meant any function that outputs a matrix which is guaranteed to be orthogonal but I see your point
hmmm
your point is quite subtle ;)
argh
 
11:18 PM
i'm trying to figure out if orthogonalize(random_gaussian(n)) works
not sure if it's uniform
 
ok so I think I want to ban any function which takes some input and outputs a matrix which guarantees to be orthogonal.. which is not what I said above
what do you think about that rule?
 
i think it's good
i found a citation for the cheap method, it would indeed work
be sure your wording also excludes matrix decompositions one of whose components is orthogonal
 
This rule bans the use of any existing function which takes in some input and outputs a matrix which is guaranteed to be orthogonal.
please suggest improvements!
 
So no identity matrix functions? :P
 
haha
 
11:21 PM
you have to make the identity all by yourself :)
 
Also the number 1 would be forbidden in Matlab.
 
the empty matrix also cannot be produced
 
Since scalars there are actually 1x1 matrices.
 
hmmm
 
you could allow built-ins that take no inputs, or only n
 
11:23 PM
This rule bans the use of any existing function which takes in some input and outputs a matrix of size at least n by n which is guaranteed to be orthogonal. As an extreme example, if you want the n by n identity matrix, you will have to create it yourself.
better?
 
i prefer the less restrictive one, but that's fine too
 
it at least deals with feersum's example
 
so literals like [[1]] are fine
 
yes
 
oh, but numpy.matrix([[1]]) cannot be done
 
11:25 PM
why not?
remember n > 1
 
yes, but i'm considering a recursive/iterative strategy where i build up to n
and it needs a base case
 
right but matrices smaller than n are ok
so [[1]] is ok
 
oh
well, that makes my strategy much better: i can just start with n-1 and not bother building up to there
that seems like an exploit
 
can you keep it orthogonal and uniform?
 
Well, dimension > 1 would cover the cases so far...
 
11:28 PM
@Lembik i'm trying to
 
I think that's fine
I am tired :)
goodnight
 
good night :-)
i'll be sure to think as many ways as possible to exploit the rules while you're asleep and can't change anything :)
 
sounds good :)
which language are you coding in?
 
python with scipy
 
cool
good luck!
 
11:31 PM
hmm, I think should be doable with plain Python.
 
probably, at least by gram-schmidt on a random gaussian matrix
 
yes
gauss is the shortest distribution in random :)
 
@LuisMendo negating is fine: the gaussians are independent and symmetric, so each negated gaussian is still a gaussian and is still independent
taking the absolute value of the diagonal entries would also work
 
@Geobits dammit
 
11:47 PM
\o/ gold golf good
 
11:59 PM
@xnor Thanks! Anyway, without QR this is harder than I want to accomplish...
@ConorO'Brien Congrats! Welcome to the club :-P
 

« first day (2111 days earlier)      last day (2733 days later) »