Thanks. I guess that  -"_1 _     means that subtraction is performed over
the first dimension of the left argument

cheers
 
Roelof  
 
Contact information
 
Dr. Roelof K. Brouwer PEng
Professor 
Department of Computing Science
School of Advanced Technologies and Mathematics
Thompson Rivers University
900 McGill Road, PO Box 3010
Kamloops, BC, Canada,V2C 5N3
 
skype RoelofBrouwer
telephone numbers
1-250 828 5219 work
1-250-377-6133 fax
home page www.tru.ca/advtech/compsci/faculty/rbrouwer
email [EMAIL PROTECTED]
www.cariboo.tru.ca/advtech/compsci/faculty/rbrouwer/pickup/flighttoNanaimo.w
mv
www.picasaweb.google.com/rkbrouwer


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Roger Hui
Sent: September 4, 2007 6:23 PM
To: General forum
Subject: Re: [Jgeneral] normalize data

In norm, if you change the -"1 and %"1 to -"_1 _ and %"_1 _
then the function would work on an argument of any rank.
Also, the [ can be elided.  Thus:

norm1=: (-"_1 _ mean) %"_1 _ %:@:variance



----- Original Message -----
From: Raul Miller <[EMAIL PROTECTED]>
Date: Tuesday, September 4, 2007 17:40
Subject: Re: [Jgeneral] normalize data
To: General forum <[email protected]>

> On 9/4/07, Roelof Brouwer <[EMAIL PROTECTED]> wrote:
>    mean=:+/%#
>    variance=: (mean@:*:)-(*:@ mean)
>    normalize_data=: ([-mean)%(%:@: variance)
>    norm_data=: normalize_data"1&.|:
>    norm=: ([- " 1 mean)%"1 %:@: variance
> 
> ...
> 
> With the above definitions (which include a couple names supplied
> by me), the following holds:
> 
>    (norm -: norm_data) ?3 3$0
> 1
> 
> So... what was the question?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to