Package smile.plot.vega
Class QuantileTransform
java.lang.Object
smile.plot.vega.QuantileTransform
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 Summary
Modifier and TypeMethodDescriptionSets the output field names for the probability and quantile values.Sets the data fields to group by.probs
(double[] probs) Sets an array of probabilities in the range (0, 1) for which to compute quantile values.step
(double step) Sets a probability step size (default 0.01) for sampling quantile values.Returns the specification in pretty print.toString()
-
Method Details
-
toString
-
toPrettyString
Returns the specification in pretty print.- Returns:
- the specification in pretty print.
-
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
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
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 probability and quantile values.- Parameters:
fields
- The output field names for the probability and quantile values.- Returns:
- this object.
-