Class BinningFilter
java.lang.Object
com.compomics.util.math.statistics.linear_regression.filters.BinningFilter
public class BinningFilter extends Object
Filters by binning.
- Author:
- Marc Vaudel
-
Constructor Summary
Constructors Constructor Description BinningFilter()
Empty default constructor -
Method Summary
Modifier and Type Method Description static ArrayList<ArrayList<Double>>
getFilteredInputFixedBins(ArrayList<Double> x, ArrayList<Double> y, int nBins)
Returns a list containing first the filtered xs and then the filtered ys.static ArrayList<ArrayList<Double>>
getFilteredInputFixedBinsSize(ArrayList<Double> x, ArrayList<Double> y, int binSize)
Returns a list containing first the filtered xs and then the filtered ys.
-
Constructor Details
-
BinningFilter
public BinningFilter()Empty default constructor
-
-
Method Details
-
getFilteredInputFixedBins
public static ArrayList<ArrayList<Double>> getFilteredInputFixedBins(ArrayList<Double> x, ArrayList<Double> y, int nBins)Returns a list containing first the filtered xs and then the filtered ys. The filtered values correspond to the median of the points grouped in the given number of bins.- Parameters:
x
- x seriesy
- y seriesnBins
- the number of bins to create- Returns:
- a filtered list of x and y
-
getFilteredInputFixedBinsSize
public static ArrayList<ArrayList<Double>> getFilteredInputFixedBinsSize(ArrayList<Double> x, ArrayList<Double> y, int binSize)Returns a list containing first the filtered xs and then the filtered ys. The filtered values correspond to the median of the points grouped in the given bin size.- Parameters:
x
- x seriesy
- y seriesbinSize
- the maximal bin size- Returns:
- a filtered list of x and y
-