From 7284cd8615067fc887648fe973a418f13a5529e4 Mon Sep 17 00:00:00 2001 From: Ian Langmore Date: Tue, 4 Apr 2017 13:43:39 -0800 Subject: [PATCH] sample_stats.percentile DOCFIX. Change: 152182295 --- .../contrib/distributions/python/ops/sample_stats.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tensorflow/contrib/distributions/python/ops/sample_stats.py b/tensorflow/contrib/distributions/python/ops/sample_stats.py index 0b1ceefe7bf..26cf922d0af 100644 --- a/tensorflow/contrib/distributions/python/ops/sample_stats.py +++ b/tensorflow/contrib/distributions/python/ops/sample_stats.py @@ -44,7 +44,7 @@ def percentile(x, keep_dims=False, validate_args=False, name=None): - """Compute the `q`-th percentile of `x` along leading (sample) dimensions. + """Compute the `q`-th percentile of `x`. Given a vector `x`, the `q`-th percentile of `x` is the value `q / 100` of the way from the minimum to the maximum in in a sorted copy of `x`. @@ -58,7 +58,7 @@ def percentile(x, ```python - # Get 30th percentile with default ('linear') interpolation. + # Get 30th percentile with default ('nearest') interpolation. x = [1., 2., 3., 4.] percentile(x, q=30.) ==> 2.0 @@ -91,11 +91,10 @@ def percentile(x, axis: Optional `0-D` or `1-D` integer `Tensor` with constant values. The axis that hold independent samples over which to return the desired percentile. If `None` (the default), treat every dimension as a sample - dimension, returning a scalar + dimension, returning a scalar. interpolation : {"lower", "higher", "nearest"}. Default: "nearest" This optional parameter specifies the interpolation method to - use when the desired quantile lies between two data points - `i < j`: + use when the desired quantile lies between two data points `i < j`: * lower: `i`. * higher: `j`. * nearest: `i` or `j`, whichever is nearest.