Class LoessTransform

java.lang.Object
smile.plot.vega.LoessTransform

public class LoessTransform extends Object
The loess transform (for locally-estimated scatterplot smoothing) uses locally-estimated regression to produce a trend line. Loess performs a sequence of local weighted regressions over a sliding window of nearest-neighbor points. For standard parametric regression options, see the regression transform.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toPrettyString

      public String toPrettyString()
      Returns the specification in pretty print.
      Returns:
      the specification in pretty print.
    • bandwidth

      public LoessTransform bandwidth(double width)
      Sets a bandwidth parameter in the range [0, 1] that determines the amount of smoothing.
      Parameters:
      width - the bandwidth parameter in [0, 1].
      Returns:
      this object.
    • groupby

      public LoessTransform groupby(String... fields)
      Sets the data fields to group by. If not specified, a single group containing all data objects will be used.
      Parameters:
      fields - The data fields to group by. If not specified, a single group containing all data objects will be used.
      Returns:
      this object.
    • as

      public LoessTransform as(String... fields)
      Sets the output field names for the smoothed points generated by the loess transform.
      Parameters:
      fields - The output field names for the smoothed points generated by the loess transform.
      Returns:
      this object.