commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "VanIngen, Erik (FIPS)" <Erik.VanIn...@fao.org>
Subject [math]How to do standardizing (normalizing)
Date Wed, 29 Sep 2010 10:13:01 GMT
Hi Apache Commons Math users

I am looking for an easy way of standardizing my values a mean 0 and a standard deviation
of 1. What is the best way to do that?

I have tried this:
DescriptiveStatistics stats = new DescriptiveStatistics();
// adding values
....
// Compute Mean and StandardDeviation
double mean  = stats.getMean();
double std = stats.getStandardDeviation();

and then standardize each value according z = (x- mean)/std

But I would like to have just a function of standardize an array according the parameters
mean and std. Is there something like this in Apache Math Commons?

Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message