Class RegressionDatasetBuilder

    • Method Detail

      • create

        public static RegressionDatasetBuilder create()
        Creates new regression dataset builder, without any sample.
        Returns:
        new regression dataset builder, without any sample
      • create

        public static RegressionDatasetBuilder create​(List<Double> x,
                                                      List<Double> y)
        Creates new regression dataset builder, using the passed data as samples.
        Parameters:
        x - X values to use to create the regression
        y - Y values to use to create the regression
        Returns:
        new regression dataset builder
      • build

        public static RegressionDataset build​(RegressionDataset dataset)
        Creates new regression dataset cloning the passed dataset.
        The options and the data are NOT cloned.
        Parameters:
        dataset - dataset to clone.
        Returns:
        new regression dataset instance
      • setLoadData

        public RegressionDatasetBuilder setLoadData​(boolean loadData)
        Sets true if the samples will be loaded as dataset data.
        Parameters:
        loadData - true if the samples will be loaded as dataset data
        Returns:
        new regression dataset builder
      • setHidden

        public RegressionDatasetBuilder setHidden​(boolean hidden)
        Sets true if the dataset will be created in hidden status.
        Parameters:
        hidden - true if the dataset will be created in hidden status
        Returns:
        new regression dataset builder
      • setSamples

        public RegressionDatasetBuilder setSamples​(List<Double> y,
                                                   double starting,
                                                   double increment)
        Description copied from class: AbstractBuilder
        Sets samples, using the passed Y values.
        X values are creating starting from passed argument with increment of passed argument.
        Overrides:
        setSamples in class AbstractBuilder<RegressionDatasetBuilder>
        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
      • setSamples

        public RegressionDatasetBuilder setSamples​(HasDataPoints dataset)
        Sets the samples by the passed dataset, DataPoint based, data as source.
        Parameters:
        dataset - dataset instance to use getting data as source
        Returns:
        new regression dataset builder
      • setSamples

        public RegressionDatasetBuilder setSamples​(HasTimeSeriesItems dataset)
        Sets the samples by the passed time series dataset, TimeSeriesItem based, data as source.
        Parameters:
        dataset - dataset instance to use getting data as source
        Returns:
        new regression dataset builder
      • buildLinearRegression

        public RegressionDataset buildLinearRegression()
        Creates a regression dataset, to add to a chart.
        Returns:
        regression dataset to add to a chart
      • buildPolynomialRegression

        public RegressionDataset buildPolynomialRegression()
        Creates a regression dataset, to add to a chart.
        It uses the default degree, 2.
        Returns:
        regression dataset to add to a chart
      • buildPolynomialRegression

        public RegressionDataset buildPolynomialRegression​(int degree)
        Creates a regression dataset, to add to a chart, using the passed maximum degree.
        Parameters:
        degree - the maximum degree of the polynomial
        Returns:
        regression dataset to add to a chart
      • buildPowerRegression

        public RegressionDataset buildPowerRegression()
        Creates a regression dataset, to add to a chart.
        Returns:
        regression dataset to add to a chart
      • buildExponentialRegression

        public RegressionDataset buildExponentialRegression()
        Creates a regression dataset, to add to a chart.
        Returns:
        regression dataset to add to a chart
      • buildTheilSenRegression

        public RegressionDataset buildTheilSenRegression()
        Creates a regression dataset, to add to a chart.
        Returns:
        regression dataset to add to a chart
      • buildRobustPolynomialRegression

        public RegressionDataset buildRobustPolynomialRegression()
        Creates a regression dataset, to add to a chart.
        It uses the default degree, 2.
        Returns:
        regression dataset to add to a chart
      • buildRobustPolynomialRegression

        public RegressionDataset buildRobustPolynomialRegression​(int degree)
        Creates a regression dataset, to add to a chart, using the passed maximum degree.
        Parameters:
        degree - the maximum degree of the robust polynomial
        Returns:
        regression dataset to add to a chart