Roger
Thank you very much for this suggestion.
Building a literal matrix like this and using the key adverb
is a very practical suggestion.

Furthermore, by using i.#V as the right argument to the
function derived from /. then as well as calculating
the group totals, several other statistics can be computed
at the same time and at minimal extra cost.

Regards
David

> Roger Hui rhui000 at shaw.ca
> Tue Jul 5 00:38:57 HKT 2011

>
> As you said, for 10 sparse axes in J64 each datum
> requires 80 bytes for the indices.  If you encode the
> indices as columns in a literal matrix, then the indices
> for each datum requires 10 bytes.  The computations
> would be even simpler if you also encode each of
> the "high cardinality dimensions" (400) as 2 columns
> in this literal matrix.
>
> That is, you'd have a literal matrix I with 16=+/ 10 3#1 2
> columns,  and a corresponding vector v of the numeric
> values.  (Each a mapped file?)  Both selection and
> summation are not too complicated, with the latter
> depending heavily on the key adverb (/.).  The complications
> are not too bad compared to the alternatives.
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to