Skip to content

Commit 2b4371e

Browse files
committed
fix mllib python doc warnings
1 parent 2ca60ac commit 2b4371e

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

python/pyspark/mllib/evaluation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,10 @@ def ndcgAt(self, k):
334334
"""
335335
Compute the average NDCG value of all the queries, truncated at ranking position k.
336336
The discounted cumulative gain at position k is computed as:
337-
sum,,i=1,,^k^ (2^{relevance of ''i''th item}^ - 1) / log(i + 1),
337+
sum,,i=1,,^k^ (2^{relevance of ''i''th item}^ - 1) / log(i + 1),
338338
and the NDCG is obtained by dividing the DCG value on the ground truth set.
339339
In the current implementation, the relevance value is binary.
340-
341-
If a query has an empty ground truth set, zero will be used as ndcg together with
340+
If a query has an empty ground truth set, zero will be used as NDCG together with
342341
a log warning.
343342
"""
344343
return self.call("ndcgAt", int(k))

python/pyspark/mllib/fpm.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ class FPGrowth(object):
6161
def train(cls, data, minSupport=0.3, numPartitions=-1):
6262
"""
6363
Computes an FP-Growth model that contains frequent itemsets.
64-
:param data: The input data set, each element
65-
contains a transaction.
66-
:param minSupport: The minimal support level
67-
(default: `0.3`).
68-
:param numPartitions: The number of partitions used by parallel
69-
FP-growth (default: same as input data).
64+
65+
:param data: The input data set, each element contains a
66+
transaction.
67+
:param minSupport: The minimal support level (default: `0.3`).
68+
:param numPartitions: The number of partitions used by
69+
parallel FP-growth (default: same as input data).
7070
"""
7171
model = callMLlibFunc("trainFPGrowthModel", data, float(minSupport), int(numPartitions))
7272
return FPGrowthModel(model)

0 commit comments

Comments
 (0)