Package smile.plot.vega
Class LoessTransform
java.lang.Object
smile.plot.vega.LoessTransform
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 Summary
Modifier and TypeMethodDescriptionSets the output field names for the smoothed points generated by the loess transform.bandwidth
(double width) Sets a bandwidth parameter in the range [0, 1] that determines the amount of smoothing.Sets the data fields to group by.Returns the specification in pretty print.toString()
-
Method Details
-
toString
-
toPrettyString
Returns the specification in pretty print.- Returns:
- the specification in pretty print.
-
bandwidth
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
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
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.
-