[x] u&.:v y Under Conjunction
In mathematical terms:
- Verb v defines a transformation of the argument(s) (x and) y taken as a whole into the v-domain
- Next, verb u operates on the transformed argument(s)
- Lastly the result is transformed back from the v-domain to the original domain.
We say that u is applied under v.
Example: Addition (+) applied under logarithm (^.) gives multiplication
u =: + v =: ^. 3 4 u&.:v 5 1 15 4
3 4 u&.v 5 1 15 4
1. Compute the Geometric Mean as: the Arithmetic Mean taken in the "log-domain"
y =: 2 4 8 16 mean =: +/ % # NB. The Arithmetic Mean of y mean y 7.5 ^ mean ^. y NB. The Geometric Mean: log (^.), then arithmetic mean, then antilog (^) 5.65685 mean&.:^. y NB. ditto, but done using (&.:) NOTE: (&.) DOES NOT WORK 5.65685
Note: Under (Dual) (&.) does not give the same answer as (&.:)
mean&.:^. y 5.65685 mean&.^. y 2 4 8 16
Contrast this with the above Example of addition under logarithm.
This is because mean does not have rank 0, it has rank Infinity
mean b.0 _ _ _ (mean&.^.) b.0 0 0 0
See below: More Information (1.)
2. Compute standard deviation as the root-mean-square of a list of differences from the mean value
y =: 0 _3 1 2 NB. list of differences from the mean value u =: mean =: +/ % # NB. mean value of y v =: *: NB. square of y stddev =: u&.:v NB. square root of mean of sum of squares of y stddev 0 _3 1 2 1.87083
Under (Dual) (&.)
2. [x] u&.:v y is the same as
- v^:_1 [x] u&:v y
- [x] v^:_1 @: (u&:v) y
- v^:_1 [(v x)] u (v y)
3. u&.:v y is the same as
- v^:_1 u v y
- v^:_1 @: u @: v y
- ([: v^:_1 [: u v) y
4. x u&.:v y is the same as
- v^:_1 (v x) u (v y)
- x v^:_1 @: u &: v y
- x ([: v^:_1 v@[ u v@]) y