Class SlidingWindowBuilder
- java.lang.Object
-
- ai.libs.jaicore.ml.classification.singlelabel.timeseries.filter.SlidingWindowBuilder
-
-
Constructor Summary
Constructors Constructor Description SlidingWindowBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfit(double[] input)The function only fits a single instance of the datasetvoidfit(double[][] input)voidfit(TimeSeriesDataset2 input)the function computes the needed information for the transform function.double[]fitTransform(double[] input)the function fit and transforms a single instancedouble[][]fitTransform(double[][] input)TimeSeriesDataset2fitTransform(TimeSeriesDataset2 input)a utility function to avoid the added effort of calling the fit and transform function separateintgetDefaultWindowSize()voidsetDefaultWindowSize(int defaultWindowSize)TimeSeriesDataset2specialFitTransform(double[] instance)This is an extra fit method because it does not return a double[] array even though it gets a double [] as input as it would be defined in the .double[]transform(double[] input)This function transforms only a single instance.double[][]transform(double[][] input)TimeSeriesDataset2transform(TimeSeriesDataset2 input)represents a function working on a dataset by transforming the dataset itself.
-
-
-
Method Detail
-
setDefaultWindowSize
public void setDefaultWindowSize(int defaultWindowSize)
-
getDefaultWindowSize
public int getDefaultWindowSize()
-
transform
public TimeSeriesDataset2 transform(TimeSeriesDataset2 input)
Description copied from interface:IFilterrepresents a function working on a dataset by transforming the dataset itself.
-
fit
public void fit(TimeSeriesDataset2 input)
Description copied from interface:IFilterthe function computes the needed information for the transform function.
-
specialFitTransform
public TimeSeriesDataset2 specialFitTransform(double[] instance)
This is an extra fit method because it does not return a double[] array even though it gets a double [] as input as it would be defined in the .- Parameters:
instance- that has to be transformed- Returns:
- the tsdataset that results from one instance which consists of one matrix with each row represents one part of the instance from i to i+ window length for i < n- window length
-
fitTransform
public TimeSeriesDataset2 fitTransform(TimeSeriesDataset2 input)
Description copied from interface:IFiltera utility function to avoid the added effort of calling the fit and transform function separate- Specified by:
fitTransformin interfaceIFilter- Parameters:
input- the dataset that is to be transfromed- Returns:
- the transformed dataset
-
transform
public double[] transform(double[] input)
Description copied from interface:IFilterThis function transforms only a single instance.
-
fit
public void fit(double[] input)
Description copied from interface:IFilterThe function only fits a single instance of the dataset
-
fitTransform
public double[] fitTransform(double[] input)
Description copied from interface:IFilterthe function fit and transforms a single instance- Specified by:
fitTransformin interfaceIFilter- Parameters:
input- the to fit and transform instance- Returns:
- the transformed instance
-
transform
public double[][] transform(double[][] input)
-
fitTransform
public double[][] fitTransform(double[][] input)
- Specified by:
fitTransformin interfaceIFilter
-
-