Computes the semivariance of a set of values with respect to a given cutoff value. We define the downside semivariance of a set of values x
against the cutoff value cutoff
to be
Σ (x[i] - target)2 / df
where the sum is taken over all i
such that x[i] < cutoff
and df
is the length of x
(non-bias-corrected) or one less than this number (bias corrected). The upside semivariance is defined similarly, with the sum taken over values of x
that exceed the cutoff value.
The cutoff value defaults to the mean, bias correction defaults to true
and the "variance direction" (upside or downside) defaults to downside. The variance direction and bias correction may be set using property setters or their values can provided as parameters to {@link #evaluate(double[],double,Direction,boolean,int,int)}.
If the input array is null, evaluate
methods throw IllegalArgumentException.
If the array has length 1, 0
is returned, regardless of the value of the cutoff.
Note that this class is not intended to be threadsafe. If multiple threads access an instance of this class concurrently, and one or more of these threads invoke property setters, external synchronization must be provided to ensure correct results.
@since 2.1