[math] Pearson Correaltion NaNs

2012-11-06 Thread Martin Rosellen
Dear all, I am having difficulties using the Pearson Correlation because it seems that it does not work if some cell is NaN. Is that intended? Here is some code: public static void main(String[] args) { double [] row1 = new double[]{3,4}; double [] row2 = new double[]{1,8};

Re: [math] Pearson Correaltion NaNs

2012-11-06 Thread Gilles Sadowski
Hello. I am having difficulties using the Pearson Correlation because it seems that it does not work if some cell is NaN. Is that intended? Very likely. [When NaN appears in a computation, it propagates and the result is NaN.] Here is some code: public static void main(String[] args) {

Re: [EMAIL] About mail and jdk 7

2012-11-06 Thread sebb
On 6 November 2012 13:27, Fabien Grenier fabien.gren...@rtone.fr wrote: Commons components use shared mailing lists; please include the component name at the start of the subject in future (as I have done here) Hi there, I have a problem using commons.mail with jdk 7. I try to send an email

Re: [math] Pearson Correaltion NaNs

2012-11-06 Thread Gilles Sadowski
On Tue, Nov 06, 2012 at 03:06:07PM +0100, Martin Rosellen wrote: Hi, I analyse blood tests and not every blood sample is analysed for the same values. It would be best if rows (tuples) that contain a NaN are ignored. It would be dangerous if Commons Math would simply discard NaN values as

Re: [math] Pearson Correaltion NaNs

2012-11-06 Thread Martin Rosellen
Hi Gilles, On Tue, Nov 06, 2012 at 03:06:07PM +0100, Martin Rosellen wrote: Hi, I analyse blood tests and not every blood sample is analysed for the same values. It would be best if rows (tuples) that contain a NaN are ignored. It would be dangerous if Commons Math would simply discard NaN

Why execute a ping unavailable address will raise exception?

2012-11-06 Thread nie fei
Hi all, I'm a new learner for this API. CommandLine cmdLine = CommandLine.parse(ping 10.80.41.171 -n 1); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); DefaultExecutor exec = new DefaultExecutor(); PumpStreamHandler streamHandler = new

Re: Why execute a ping unavailable address will raise exception?

2012-11-06 Thread Yi Huang
I did not use exec for a while but from what I remember, you had better set the default exit value. For example, if default exit value is set to 1, then exec will return 1 if it think the command is ok. Then your system will say there is an error because the system exit value 1 is an error while 0

Re: Why execute a ping unavailable address will raise exception?

2012-11-06 Thread nie fei
Ok, thank you very much. You are right, in that case, the %errorcode% returned is 1 Incorrect function. BR, /niefei On Wed, Nov 7, 2012 at 3:38 PM, Yi Huang ethanhuang1...@gmail.com wrote: I did not use exec for a while but from what I remember, you had better set the default exit value.