Class QuantileTransform

java.lang.Object
smile.plot.vega.QuantileTransform

public class QuantileTransform extends Object
The quantile transform calculates empirical quantile values for an input data stream. If a groupby parameter is provided, quantiles are estimated separately per group. Among other uses, the quantile transform is useful for creating quantile-quantile (Q-Q) plots.
  • 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.
    • step

      public QuantileTransform step(double step)
      Sets a probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the probs parameter is not provided.
      Parameters:
      step - a probability step size for sampling quantile values.
      Returns:
      this object.
    • probs

      public QuantileTransform probs(double[] probs)
      Sets an array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the step parameter will be used.
      Parameters:
      probs - an array of probabilities in the range (0, 1).
      Returns:
      this object.
    • groupby

      public QuantileTransform 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 QuantileTransform as(String... fields)
      Sets the output field names for the probability and quantile values.
      Parameters:
      fields - The output field names for the probability and quantile values.
      Returns:
      this object.