public class DataCleaner extends Object
Modifier and Type | Method and Description |
---|---|
static List<Double> |
linearInterpolation(List<Double> values)
Returns a copy of the original list with all missing values replaced by
a linear interpolation of the adjacent list entries.
|
static List<Double> |
zeroesAnnihilation(List<Double> values,
double threshold)
Returns a copy of the original list with all values considered to be
erroneously equal to zero replaced by
Double.NaN . |
public static List<Double> zeroesAnnihilation(List<Double> values, double threshold)
Double.NaN
.
A value is considered to be erroneously equal to zero if on both sides
the adjacent list entries have an absolute value greater than or equal to
the specified threshold. The adjacent list entry is defined as the next
entry that is not equal to Double.NaN
.values
- threshold
- null
if the original list is null
public static List<Double> linearInterpolation(List<Double> values)
Double.NaN
.
The boundary conditions are that a value of
is assumed before the first element of the list and a value of
after the last one.values
- null
if the original list is null
Copyright © 2014–2016. All rights reserved.