Answers for "Compute the variance of this RDD’s elements"

0

Compute the variance of this RDD’s elements

# variance()

m = sc.parallelize([1, 2, 3]).variance()
# 0.666...
Posted by: Guest on March-12-2020
0

Compute the mean of this RDD’s elements.

sc.parallelize([1, 2, 3]).mean()
# 2.0
Posted by: Guest on March-11-2020

Code answers related to "Compute the variance of this RDD’s elements"

Python Answers by Framework

Browse Popular Code Answers by Language