Package org.pepstock.charba.client.ml
Class AbstractBuilder<T>
- java.lang.Object
- 
- org.pepstock.charba.client.ml.AbstractBuilder<T>
 
- 
- Type Parameters:
- T- type of regression builder
 - Direct Known Subclasses:
- RegressionBuilder,- RegressionDatasetBuilder
 
 public abstract class AbstractBuilder<T> extends Object Common utility which is managing the samples to use to create a regression.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TsetSamples(List<Double> y)Sets samples, using the passed Y values.
 X values are creating starting from 0 with increment of 1.TsetSamples(List<Double> y, double starting)Sets samples, using the passed Y values.
 X values are creating starting from passed argument with increment of 1.TsetSamples(List<Double> y, double starting, double increment)Sets samples, using the passed Y values.
 X values are creating starting from passed argument with increment of passed argument.TsetSamples(List<Double> x, List<Double> y)Creates a simple linear regression, using the passed X and Y values.TsetSamplesByDataPoints(List<DataPoint> dataPoints)Creates a simple linear regression, using the passedDataPoints.TsetSamplesByDates(List<Date> x, List<Double> y)Creates a simple linear regression, using the passed X and Y values.TsetSamplesByTimeSeriesItems(List<TimeSeriesItem> items)Creates a simple linear regression, using the passedTimeSeriesItems.
 
- 
- 
- 
Method Detail- 
setSamplespublic final T setSamples(List<Double> y) Sets samples, using the passed Y values.
 X values are creating starting from 0 with increment of 1.- Parameters:
- y- Y values to use to create the regression
- Returns:
- regression builder
 
 - 
setSamplespublic final T setSamples(List<Double> y, double starting) Sets samples, using the passed Y values.
 X values are creating starting from passed argument with increment of 1.- Parameters:
- y- Y values to use to create the regression
- starting- starting value to create X values
- Returns:
- regression builder instance
 
 - 
setSamplespublic T setSamples(List<Double> y, double starting, double increment) Sets samples, using the passed Y values.
 X values are creating starting from passed argument with increment of passed argument.- Parameters:
- y- Y values to use to create the regression
- starting- starting value to create X values
- increment- increment to apply to the starting value
- Returns:
- regression builder instance
 
 - 
setSamplesByDatespublic T setSamplesByDates(List<Date> x, List<Double> y) Creates a simple linear regression, using the passed X and Y values.- Parameters:
- x- X values to use to create the regression
- y- Y values to use to create the regression
- Returns:
- regression builder instance
 
 - 
setSamplesByDataPointspublic T setSamplesByDataPoints(List<DataPoint> dataPoints) Creates a simple linear regression, using the passedDataPoints.- Parameters:
- dataPoints- data points to use to create the regression
- Returns:
- regression builder instance
 
 - 
setSamplesByTimeSeriesItemspublic T setSamplesByTimeSeriesItems(List<TimeSeriesItem> items) Creates a simple linear regression, using the passedTimeSeriesItems.- Parameters:
- items- time series items to use to create the regression
- Returns:
- regression builder instance
 
 
- 
 
-