octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-contaminating emptyness indicator


From: Michael D. Godfrey
Subject: Re: Non-contaminating emptyness indicator
Date: Sat, 06 Jul 2013 12:24:15 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 07/06/2013 11:54 AM, CdeMills wrote:
Hello,

I have an application producing lots of data, collating everything into a
matrix. Sometimes one entry is missing: I would like to fill it with
something preserving the ability for statistical functions to return
something meaningfull.

For instance:
A = randn(4, 4)
A(2, 3) = NA;
mean(A) => the third column result is 'NA'

Same game for 'NaN'; furthermore
A(2, 3) = [] is rejected.

What I would like is some option like R 'skipNA = true', meaning:
- compute sum, mean, std, ... over some dimension, by default on a
column-basis
- extract a slice, and do not take into account NA and NaN values. For
'sum', the end result is a numeric value; provided at least one value is not
special; for operations like 'mean' and 'std' the degrees of freedom have to
be recomputed each time at least one NA/NaN is present.

Any clue ? Could this option be implemented into the standard implementation
? I would like not to implement a new class where NaN are automatically
discarded ?

Regards

Pascal
This is worth thinking about.  Does anyone know how or if R handles this?
R is the gold standard for statistical computation.  Therefore, some bits of
compatibility with R would be helpful.

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]