I'm afraid that what is happenning here is not simple. u=: (mp~ |:) (-"1 mean) v=: (mp~ |:)@(-"1 mean)
u A A mp~ |: (-"1 mean) A (|: A -"1 mean A) mp A v A (mp~ |:) A -"1 mean A (|: A -"1 mean A) mp A -"1 mean A It is not obvious that these two verbs are mathematically equivalent. That is why my post may be hard to follow. Louis > On 13 Feb 2017, at 17:25, Raul Miller <[email protected]> wrote: > > Eh... ok, but that's pretty hard to follow, and there's much simpler > ways of recognizing what's going on here. > > -- > Raul > > >> On Mon, Feb 13, 2017 at 10:15 AM, Louis de Forcrand <[email protected]> wrote: >> I forgot to divide by m, see my correction. >> >> Louis >> >>> On 13 Feb 2017, at 15:24, Raul Miller <[email protected]> wrote: >>> >>> I'm having problems following your reasoning here. >>> >>> Consider: >>> >>> A=: 5 3 $ 90 60 90 90 90 30 60 60 60 60 60 90 30 30 30 >>> mean=: +/%# >>> mp=: +/ . * >>> C=: A - B=: (E=: (m,m) $ 1) mp A % m=: #A >>> u=: ((mp~ |:) (-"1 mean)) % # >>> v=: (mp~ |:)@(-"1 mean) % # >>> u A >>> 504 360 180 >>> 360 360 0 >>> 180 0 720 >>> (|:C) mp A >>> 2520 1800 900 >>> 1800 1800 0 >>> 900 0 3600 >>> >>> If I understand your presentation, those two results should have been >>> the same. But they are not... >>> >>> Can you run through your work with some example values and see whether >>> you think it's the presentation or my understanding of it that needs >>> to change? >>> >>> Thanks, >>> >>> -- >>> Raul >>> >>> >>> >>>> On Mon, Feb 13, 2017 at 6:36 AM, Louis de Forcrand <[email protected]> >>>> wrote: >>>> A few corrections: >>>> >>>> u is >>>> (|:C) mp A % m >>>> and v is >>>> (|:C) mp C % m >>>> but we can multiply both by m when showing that they are equal. >>>> >>>> In addition, I forgot a division by m here: >>>>> +/ (i{Et) * j {"1 E >>>> that should read >>>> +/ (i{Et) * j {"1 E % m. >>>> >>>> Louis >>>> >>>>> On 13 Feb 2017, at 01:35, Louis de Forcrand <[email protected]> wrote: >>>>> >>>>> The two statements are executing two different procedures which happen to >>>>> be mathematically equivalent: >>>>> >>>>> u=: ((mp~ |:) (-"1 mean)) % # >>>>> v=: (mp~ |:)@(-"1 mean) % # >>>>> >>>>> If (u -: v) A for a matrix A, then >>>>> (((mp~ |:) (-"1 mean)) -: (mp~ |:)@(-"1 mean)) A. >>>>> >>>>> Let >>>>> C=: A - B=: (E=: (m,m) $ 1) mp A % m=: #A >>>>> then u is >>>>> (|:C) mp A >>>>> and v is >>>>> (|:C) mp C. >>>>> >>>>> Let's look at u: >>>>> (|:C) mp A >>>>> (|:A-B) mp A >>>>> ((At=: |:A) - Bt=: |:B) mp A >>>>> (At mp A) - Bt mp A >>>>> >>>>> Now for v: >>>>> (|:C) mp C >>>>> (At - Bt) mp A - B >>>>> (At mp A) - (At mp B) - (Bt mp A) + Bt mp B >>>>> >>>>> We can see that if >>>>> (Bt mp B) -: At mp B >>>>> then (u -: v) A. >>>>> >>>>> At mp B >>>>> At mp E mp A % m >>>>> >>>>> Bt mp B >>>>> (|: E mp A % m) mp E mp A % m >>>>> At mp (Et=: |:E) mp E mp A % *:m >>>>> At mp (E mp E % m) mp A % m >>>>> >>>>> Now (and for the coup de grace): >>>>> (<i,j) { E mp E % m >>>>> +/ (i{Et) * j {"1 E >>>>> +/ (m$1) * m $ 1 % m >>>>> 1 for all i and j between 0 and m. >>>>> Therefor >>>>> E -: E mp E % m. >>>>> >>>>> And thus >>>>> Bt mp B >>>>> At mp E mp A % m >>>>> At mp B >>>>> >>>>> (u -: v) A for all matrices A. # >>>>> >>>>> Cheers, >>>>> Louis >>>>> >>>>> PS: I hope I didn't make and mistakes, but I might have. Thanks for >>>>> checking! >>>>> >>>>>> On 12 Feb 2017, at 18:54, Raul Miller <[email protected]> wrote: >>>>>> >>>>>> It's not so much that it's of no use, but that it's redundant. >>>>>> >>>>>> When your hook is a train where the first verb is a hook, you can >>>>>> restructure either of them so that the other of those two hooks takes >>>>>> over the responsibility of obtaining the hook's "left argument" >>>>>> (presumably, this would eliminate the other hook). >>>>>> >>>>>> I hope this helps, >>>>>> >>>>>> -- >>>>>> Raul >>>>>> >>>>>> >>>>>>> On Sun, Feb 12, 2017 at 10:18 AM, R.E. Boss <[email protected]> >>>>>>> wrote: >>>>>>> I think the problem is that the big hook is of no use, that's what >>>>>>> creates confusion. >>>>>>> >>>>>>> (data mp1 mn data)% # data >>>>>>> 504 360 180 >>>>>>> 360 360 0 >>>>>>> 180 0 720 >>>>>>> >>>>>>> data mp1 mn data >>>>>>> 2520 1800 900 >>>>>>> 1800 1800 0 >>>>>>> 900 0 3600 >>>>>>> >>>>>>> mp1 mn data >>>>>>> 2520 1800 900 >>>>>>> 1800 1800 0 >>>>>>> 900 0 3600 >>>>>>> >>>>>>> >>>>>>> R.E. Boss >>>>>>> >>>>>>> >>>>>>> -----Original Message----- >>>>>>> From: Programming [mailto:[email protected]] On >>>>>>> Behalf Of 'Mike Day' via Programming >>>>>>> Sent: zondag 12 februari 2017 12:02 >>>>>>> To: [email protected] >>>>>>> Subject: Re: [Jprogramming] Hooked again >>>>>>> >>>>>>> It looks to me as if the two left hooks form one big left hook, not >>>>>>> that I'm into boxing: >>>>>>> >>>>>>> mn =: -"1 mean >>>>>>> mp1=: mp~|: >>>>>>> >>>>>>> ((mp1 mn)%#)data NB. big "hook" >>>>>>> 504 360 180 >>>>>>> 360 360 0 >>>>>>> 180 0 720 >>>>>>> >>>>>>> ((mp1 @: mn)%#)data NB. mp1 after mn using @: >>>>>>> 504 360 180 >>>>>>> 360 360 0 >>>>>>> 180 0 720 >>>>>>> >>>>>>> (([: mp1 mn)%#)data NB. mp1 after mn using [: >>>>>>> 504 360 180 >>>>>>> 360 360 0 >>>>>>> 180 0 720 >>>>>>> >>>>>>> Any use? >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> >>>>>>>> On 12/02/2017 08:06, Lippu Esa wrote: >>>>>>>> ]data=. 5 3 $ 90 60 90 90 90 30 60 60 60 60 60 90 30 30 30 >>>>>>>> >>>>>>>> mean=: +/%# >>>>>>>> mp=: +/ . * >>>>>>>> covmat=: ((mp~|:)(-"1 mean))%# NB. divede by n not n-1 to comply with >>>>>>>> the example >>>>>>> >>>>>>> >>>>>>> --- >>>>>>> This email has been checked for viruses by Avast antivirus software. >>>>>>> https://www.avast.com/antivirus >>>>>>> >>>>>>> ---------------------------------------------------------------------- >>>>>>> For information about J forums see http://www.jsoftware.com/forums.htm >>>>>>> ---------------------------------------------------------------------- >>>>>>> For information about J forums see http://www.jsoftware.com/forums.htm >>>>>> ---------------------------------------------------------------------- >>>>>> For information about J forums see http://www.jsoftware.com/forums.htm >>>>> >>>>> ---------------------------------------------------------------------- >>>>> For information about J forums see http://www.jsoftware.com/forums.htm >>>> ---------------------------------------------------------------------- >>>> For information about J forums see http://www.jsoftware.com/forums.htm >>> ---------------------------------------------------------------------- >>> For information about J forums see http://www.jsoftware.com/forums.htm >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
