aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/stat/_statistics.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyspark/mllib/stat/_statistics.py')
-rw-r--r--python/pyspark/mllib/stat/_statistics.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/mllib/stat/_statistics.py b/python/pyspark/mllib/stat/_statistics.py
index 67d5f0e44f..49b26446db 100644
--- a/python/pyspark/mllib/stat/_statistics.py
+++ b/python/pyspark/mllib/stat/_statistics.py
@@ -164,7 +164,6 @@ class Statistics(object):
of fit test of the observed data against the expected distribution,
or againt the uniform distribution (by default), with each category
having an expected frequency of `1 / len(observed)`.
- (Note: `observed` cannot contain negative values)
If `observed` is matrix, conduct Pearson's independence test on the
input contingency matrix, which cannot contain negative entries or
@@ -176,6 +175,8 @@ class Statistics(object):
contingency matrix for which the chi-squared statistic is computed.
All label and feature values must be categorical.
+ .. note:: `observed` cannot contain negative values
+
:param observed: it could be a vector containing the observed categorical
counts/relative frequencies, or the contingency matrix
(containing either counts or relative frequencies),