Conditioning does two things, and so perhaps should have been split into two verbs.
(1) It reduces the visual size of the result. (2) It makes sure that the sum of each row is 1. Both of these steps are somewhat arbitrary. To keep (2) from interfering with (1) I decided to adjust the main diagonal - this has the effect of making the markov transitions slightly more "stable" - feeding back into the current state as necessary. That said, you might also consider what happens with different matrices. For example, try i.7 7 Thanks, -- Raul On Sat, Aug 9, 2014 at 2:48 PM, Brian Schott <[email protected]> wrote: > I am not clear of the purpose of the conditioning, but *&16 seems to remove > the problem while changing the answer. > > > On Sat, Aug 9, 2014 at 2:16 PM, Raul Miller <[email protected]> wrote: > > > [snip] > > > > > > And here's a conditioner: > > D=:3 :'(+=@i.@#*1-+/"1)<.&.(*&20)(%+/"1)y' > > > > Example use: > > A D ?6 6$0 > > [[0.3,0.15,0.2,0.15,0.05,0.15] > > [0.25,0.1,0.2,0.25,0.05,0.15] > > [0.05,0.25,0.15,0.05,0.25,0.25] > > [0.25,0,0.3,0.3,0,0.15] > > [0.35,0.35,0.05,0,0.2,0.05] > > [0.3,0.2,0.2,0,0,0.3] > > ] > > > > But this approach has an ugliness in it: > > > > A D i.5 5 > > [[_2.22045e_16,0.1,0.2,0.3,0.4] > > [0.1,0.25,0.2,0.2,0.25] > > [0.15,0.15,0.3,0.2,0.2] > > [0.15,0.15,0.2,0.3,0.2] > > [0.15,0.15,0.2,0.2,0.3] > > ] > > > > There's a simple fix for this (4 characters added to the above code can > > make the first element of the 5 by 5 matrix be zero), but there might be > a > > better way? > > > > Ideas? > > > > Thanks, > > > > -- > > Raul > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > (B=) <-----my sig > Brian Schott > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
