turicreate.Sketch.quantile

Sketch.quantile(quantile_val)

Returns a sketched estimate of the value at a particular quantile between 0.0 and 1.0. The quantile is guaranteed to be accurate within 1%: meaning that if you ask for the 0.55 quantile, the returned value is guaranteed to be between the true 0.54 quantile and the true 0.56 quantile. The quantiles are only defined for numeric arrays and this function will throw an exception if called on a sketch constructed for a non-numeric column.

Parameters:
quantile_val : float

A value between 0.0 and 1.0 inclusive. Values below 0.0 will be interpreted as 0.0. Values above 1.0 will be interpreted as 1.0.

Returns:
out : float | str

An estimate of the value at a quantile.

Raises:
RuntimeError

If the sarray is a non-numeric type.