Package org.apache.spark.mllib.random
Class RandomRDDs
Object
org.apache.spark.mllib.random.RandomRDDs
Generator methods for creating RDDs comprised of 
i.i.d. samples from some distribution.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic JavaDoubleRDDexponentialJavaRDD(JavaSparkContext jsc, double mean, long size) RandomRDDs.exponentialJavaRDDwith the default number of partitions and the default seed.static JavaDoubleRDDexponentialJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions) RandomRDDs.exponentialJavaRDDwith the default seed.static JavaDoubleRDDexponentialJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.exponentialRDD.exponentialJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols) RandomRDDs.exponentialJavaVectorRDDwith the default number of partitions and the default seed.exponentialJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions) RandomRDDs.exponentialJavaVectorRDDwith the default seed.exponentialJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.exponentialVectorRDD.exponentialRDD(SparkContext sc, double mean, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the exponential distribution with the input mean.exponentialVectorRDD(SparkContext sc, double mean, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the exponential distribution with the input mean.static JavaDoubleRDDgammaJavaRDD(JavaSparkContext jsc, double shape, double scale, long size) RandomRDDs.gammaJavaRDDwith the default number of partitions and the default seed.static JavaDoubleRDDgammaJavaRDD(JavaSparkContext jsc, double shape, double scale, long size, int numPartitions) RandomRDDs.gammaJavaRDDwith the default seed.static JavaDoubleRDDgammaJavaRDD(JavaSparkContext jsc, double shape, double scale, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.gammaRDD.gammaJavaVectorRDD(JavaSparkContext jsc, double shape, double scale, long numRows, int numCols) RandomRDDs.gammaJavaVectorRDDwith the default number of partitions and the default seed.gammaJavaVectorRDD(JavaSparkContext jsc, double shape, double scale, long numRows, int numCols, int numPartitions) RandomRDDs.gammaJavaVectorRDDwith the default seed.gammaJavaVectorRDD(JavaSparkContext jsc, double shape, double scale, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.gammaVectorRDD.gammaRDD(SparkContext sc, double shape, double scale, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the gamma distribution with the input shape and scale.gammaVectorRDD(SparkContext sc, double shape, double scale, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the gamma distribution with the input shape and scale.static JavaDoubleRDDlogNormalJavaRDD(JavaSparkContext jsc, double mean, double std, long size) RandomRDDs.logNormalJavaRDDwith the default number of partitions and the default seed.static JavaDoubleRDDlogNormalJavaRDD(JavaSparkContext jsc, double mean, double std, long size, int numPartitions) RandomRDDs.logNormalJavaRDDwith the default seed.static JavaDoubleRDDlogNormalJavaRDD(JavaSparkContext jsc, double mean, double std, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.logNormalRDD.logNormalJavaVectorRDD(JavaSparkContext jsc, double mean, double std, long numRows, int numCols) RandomRDDs.logNormalJavaVectorRDDwith the default number of partitions and the default seed.logNormalJavaVectorRDD(JavaSparkContext jsc, double mean, double std, long numRows, int numCols, int numPartitions) RandomRDDs.logNormalJavaVectorRDDwith the default seed.logNormalJavaVectorRDD(JavaSparkContext jsc, double mean, double std, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.logNormalVectorRDD.logNormalRDD(SparkContext sc, double mean, double std, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the log normal distribution with the input mean and standard deviationlogNormalVectorRDD(SparkContext sc, double mean, double std, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from a log normal distribution.static JavaDoubleRDDnormalJavaRDD(JavaSparkContext jsc, long size) RandomRDDs.normalJavaRDDwith the default number of partitions and the default seed.static JavaDoubleRDDnormalJavaRDD(JavaSparkContext jsc, long size, int numPartitions) RandomRDDs.normalJavaRDDwith the default seed.static JavaDoubleRDDnormalJavaRDD(JavaSparkContext jsc, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.normalRDD.normalJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols) RandomRDDs.normalJavaVectorRDDwith the default number of partitions and the default seed.normalJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions) RandomRDDs.normalJavaVectorRDDwith the default seed.normalJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.normalVectorRDD.normalRDD(SparkContext sc, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the standard normal distribution.normalVectorRDD(SparkContext sc, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the standard normal distribution.static JavaDoubleRDDpoissonJavaRDD(JavaSparkContext jsc, double mean, long size) RandomRDDs.poissonJavaRDDwith the default number of partitions and the default seed.static JavaDoubleRDDpoissonJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions) RandomRDDs.poissonJavaRDDwith the default seed.static JavaDoubleRDDpoissonJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.poissonRDD.poissonJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols) RandomRDDs.poissonJavaVectorRDDwith the default number of partitions and the default seed.poissonJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions) RandomRDDs.poissonJavaVectorRDDwith the default seed.poissonJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.poissonVectorRDD.poissonRDD(SparkContext sc, double mean, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the Poisson distribution with the input mean.poissonVectorRDD(SparkContext sc, double mean, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the Poisson distribution with the input mean.static <T> JavaRDD<T>randomJavaRDD(JavaSparkContext jsc, RandomDataGenerator<T> generator, long size) RandomRDDs.randomJavaRDDwith the default seed & numPartitionsstatic <T> JavaRDD<T>randomJavaRDD(JavaSparkContext jsc, RandomDataGenerator<T> generator, long size, int numPartitions) RandomRDDs.randomJavaRDDwith the default seed.static <T> JavaRDD<T>randomJavaRDD(JavaSparkContext jsc, RandomDataGenerator<T> generator, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples produced by the input RandomDataGenerator.randomJavaVectorRDD(JavaSparkContext jsc, RandomDataGenerator<Object> generator, long numRows, int numCols) RandomRDDs.randomJavaVectorRDDwith the default number of partitions and the default seed.randomJavaVectorRDD(JavaSparkContext jsc, RandomDataGenerator<Object> generator, long numRows, int numCols, int numPartitions) ::RandomRDDs.randomJavaVectorRDDwith the default seed.randomJavaVectorRDD(JavaSparkContext jsc, RandomDataGenerator<Object> generator, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.randomVectorRDD.static <T> RDD<T>randomRDD(SparkContext sc, RandomDataGenerator<T> generator, long size, int numPartitions, long seed, scala.reflect.ClassTag<T> evidence$1) Generates an RDD comprised ofi.i.d.samples produced by the input RandomDataGenerator.randomVectorRDD(SparkContext sc, RandomDataGenerator<Object> generator, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples produced by the input RandomDataGenerator.static JavaDoubleRDDuniformJavaRDD(JavaSparkContext jsc, long size) RandomRDDs.uniformJavaRDDwith the default number of partitions and the default seed.static JavaDoubleRDDuniformJavaRDD(JavaSparkContext jsc, long size, int numPartitions) RandomRDDs.uniformJavaRDDwith the default seed.static JavaDoubleRDDuniformJavaRDD(JavaSparkContext jsc, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.uniformRDD.uniformJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols) RandomRDDs.uniformJavaVectorRDDwith the default number of partitions and the default seed.uniformJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions) RandomRDDs.uniformJavaVectorRDDwith the default seed.uniformJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.uniformVectorRDD.uniformRDD(SparkContext sc, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the uniform distributionU(0.0, 1.0).uniformVectorRDD(SparkContext sc, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the uniform distribution onU(0.0, 1.0).
- 
Constructor Details- 
RandomRDDspublic RandomRDDs()
 
- 
- 
Method Details- 
uniformRDDGenerates an RDD comprised ofi.i.d.samples from the uniform distributionU(0.0, 1.0).To transform the distribution in the generated RDD from U(0.0, 1.0)toU(a, b), useRandomRDDs.uniformRDD(sc, n, p, seed).map(v => a + (b - a) * v).- Parameters:
- sc- SparkContext used to create the RDD.
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Double] comprised of i.i.d.samples ~U(0.0, 1.0).
 
- 
uniformJavaRDDpublic static JavaDoubleRDD uniformJavaRDD(JavaSparkContext jsc, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.uniformRDD.- Parameters:
- jsc- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
uniformJavaRDDRandomRDDs.uniformJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
uniformJavaRDDRandomRDDs.uniformJavaRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
normalRDDGenerates an RDD comprised ofi.i.d.samples from the standard normal distribution.To transform the distribution in the generated RDD from standard normal to some other normal N(mean, sigma^2^), useRandomRDDs.normalRDD(sc, n, p, seed).map(v => mean + sigma * v).- Parameters:
- sc- SparkContext used to create the RDD.
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Double] comprised of i.i.d.samples ~ N(0.0, 1.0).
 
- 
normalJavaRDDpublic static JavaDoubleRDD normalJavaRDD(JavaSparkContext jsc, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.normalRDD.- Parameters:
- jsc- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
normalJavaRDDRandomRDDs.normalJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
normalJavaRDDRandomRDDs.normalJavaRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
poissonRDDpublic static RDD<Object> poissonRDD(SparkContext sc, double mean, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the Poisson distribution with the input mean.- Parameters:
- sc- SparkContext used to create the RDD.
- mean- Mean, or lambda, for the Poisson distribution.
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Double] comprised of i.i.d.samples ~ Pois(mean).
 
- 
poissonJavaRDDpublic static JavaDoubleRDD poissonJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.poissonRDD.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
poissonJavaRDDpublic static JavaDoubleRDD poissonJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions) RandomRDDs.poissonJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
poissonJavaRDDRandomRDDs.poissonJavaRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
exponentialRDDpublic static RDD<Object> exponentialRDD(SparkContext sc, double mean, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the exponential distribution with the input mean.- Parameters:
- sc- SparkContext used to create the RDD.
- mean- Mean, or 1 / lambda, for the exponential distribution.
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Double] comprised of i.i.d.samples ~ Pois(mean).
 
- 
exponentialJavaRDDpublic static JavaDoubleRDD exponentialJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.exponentialRDD.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
exponentialJavaRDDpublic static JavaDoubleRDD exponentialJavaRDD(JavaSparkContext jsc, double mean, long size, int numPartitions) RandomRDDs.exponentialJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
exponentialJavaRDDRandomRDDs.exponentialJavaRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
gammaRDDpublic static RDD<Object> gammaRDD(SparkContext sc, double shape, double scale, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the gamma distribution with the input shape and scale.- Parameters:
- sc- SparkContext used to create the RDD.
- shape- shape parameter (greater than 0) for the gamma distribution
- scale- scale parameter (greater than 0) for the gamma distribution
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Double] comprised of i.i.d.samples ~ Pois(mean).
 
- 
gammaJavaRDDpublic static JavaDoubleRDD gammaJavaRDD(JavaSparkContext jsc, double shape, double scale, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.gammaRDD.- Parameters:
- jsc- (undocumented)
- shape- (undocumented)
- scale- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
gammaJavaRDDpublic static JavaDoubleRDD gammaJavaRDD(JavaSparkContext jsc, double shape, double scale, long size, int numPartitions) RandomRDDs.gammaJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- shape- (undocumented)
- scale- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
gammaJavaRDDpublic static JavaDoubleRDD gammaJavaRDD(JavaSparkContext jsc, double shape, double scale, long size) RandomRDDs.gammaJavaRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- shape- (undocumented)
- scale- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
logNormalRDDpublic static RDD<Object> logNormalRDD(SparkContext sc, double mean, double std, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples from the log normal distribution with the input mean and standard deviation- Parameters:
- sc- SparkContext used to create the RDD.
- mean- mean for the log normal distribution
- std- standard deviation for the log normal distribution
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Double] comprised of i.i.d.samples ~ Pois(mean).
 
- 
logNormalJavaRDDpublic static JavaDoubleRDD logNormalJavaRDD(JavaSparkContext jsc, double mean, double std, long size, int numPartitions, long seed) Java-friendly version ofRandomRDDs.logNormalRDD.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- std- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
logNormalJavaRDDpublic static JavaDoubleRDD logNormalJavaRDD(JavaSparkContext jsc, double mean, double std, long size, int numPartitions) RandomRDDs.logNormalJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- std- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
logNormalJavaRDDpublic static JavaDoubleRDD logNormalJavaRDD(JavaSparkContext jsc, double mean, double std, long size) RandomRDDs.logNormalJavaRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- std- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
randomRDDpublic static <T> RDD<T> randomRDD(SparkContext sc, RandomDataGenerator<T> generator, long size, int numPartitions, long seed, scala.reflect.ClassTag<T> evidence$1) Generates an RDD comprised ofi.i.d.samples produced by the input RandomDataGenerator.- Parameters:
- sc- SparkContext used to create the RDD.
- generator- RandomDataGenerator used to populate the RDD.
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- evidence$1- (undocumented)
- Returns:
- RDD[T] comprised of i.i.d.samples produced by generator.
 
- 
randomJavaRDDpublic static <T> JavaRDD<T> randomJavaRDD(JavaSparkContext jsc, RandomDataGenerator<T> generator, long size, int numPartitions, long seed) Generates an RDD comprised ofi.i.d.samples produced by the input RandomDataGenerator.- Parameters:
- jsc- JavaSparkContext used to create the RDD.
- generator- RandomDataGenerator used to populate the RDD.
- size- Size of the RDD.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[T] comprised of i.i.d.samples produced by generator.
 
- 
randomJavaRDDpublic static <T> JavaRDD<T> randomJavaRDD(JavaSparkContext jsc, RandomDataGenerator<T> generator, long size, int numPartitions) RandomRDDs.randomJavaRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- generator- (undocumented)
- size- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
randomJavaRDDpublic static <T> JavaRDD<T> randomJavaRDD(JavaSparkContext jsc, RandomDataGenerator<T> generator, long size) RandomRDDs.randomJavaRDDwith the default seed & numPartitions- Parameters:
- jsc- (undocumented)
- generator- (undocumented)
- size- (undocumented)
- Returns:
- (undocumented)
 
- 
uniformVectorRDDpublic static RDD<Vector> uniformVectorRDD(SparkContext sc, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the uniform distribution onU(0.0, 1.0).- Parameters:
- sc- SparkContext used to create the RDD.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD.
- seed- Seed for the RNG that generates the seed for the generator in each partition.
- Returns:
- RDD[Vector] with vectors containing i.i.d samples ~ U(0.0, 1.0).
 
- 
uniformJavaVectorRDDpublic static JavaRDD<Vector> uniformJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.uniformVectorRDD.- Parameters:
- jsc- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
uniformJavaVectorRDDpublic static JavaRDD<Vector> uniformJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions) RandomRDDs.uniformJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
uniformJavaVectorRDDRandomRDDs.uniformJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
- 
normalVectorRDDpublic static RDD<Vector> normalVectorRDD(SparkContext sc, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the standard normal distribution.- Parameters:
- sc- SparkContext used to create the RDD.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Vector] with vectors containing i.i.d.samples ~N(0.0, 1.0).
 
- 
normalJavaVectorRDDpublic static JavaRDD<Vector> normalJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.normalVectorRDD.- Parameters:
- jsc- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
normalJavaVectorRDDpublic static JavaRDD<Vector> normalJavaVectorRDD(JavaSparkContext jsc, long numRows, int numCols, int numPartitions) RandomRDDs.normalJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
normalJavaVectorRDDRandomRDDs.normalJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
- 
logNormalVectorRDDpublic static RDD<Vector> logNormalVectorRDD(SparkContext sc, double mean, double std, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from a log normal distribution.- Parameters:
- sc- SparkContext used to create the RDD.
- mean- Mean of the log normal distribution.
- std- Standard deviation of the log normal distribution.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Vector] with vectors containing i.i.d.samples.
 
- 
logNormalJavaVectorRDDpublic static JavaRDD<Vector> logNormalJavaVectorRDD(JavaSparkContext jsc, double mean, double std, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.logNormalVectorRDD.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- std- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
logNormalJavaVectorRDDpublic static JavaRDD<Vector> logNormalJavaVectorRDD(JavaSparkContext jsc, double mean, double std, long numRows, int numCols, int numPartitions) RandomRDDs.logNormalJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- std- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
logNormalJavaVectorRDDpublic static JavaRDD<Vector> logNormalJavaVectorRDD(JavaSparkContext jsc, double mean, double std, long numRows, int numCols) RandomRDDs.logNormalJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- std- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
- 
poissonVectorRDDpublic static RDD<Vector> poissonVectorRDD(SparkContext sc, double mean, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the Poisson distribution with the input mean.- Parameters:
- sc- SparkContext used to create the RDD.
- mean- Mean, or lambda, for the Poisson distribution.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism)
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Vector] with vectors containing i.i.d.samples ~ Pois(mean).
 
- 
poissonJavaVectorRDDpublic static JavaRDD<Vector> poissonJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.poissonVectorRDD.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
poissonJavaVectorRDDpublic static JavaRDD<Vector> poissonJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions) RandomRDDs.poissonJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
poissonJavaVectorRDDpublic static JavaRDD<Vector> poissonJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols) RandomRDDs.poissonJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
- 
exponentialVectorRDDpublic static RDD<Vector> exponentialVectorRDD(SparkContext sc, double mean, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the exponential distribution with the input mean.- Parameters:
- sc- SparkContext used to create the RDD.
- mean- Mean, or 1 / lambda, for the Exponential distribution.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism)
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Vector] with vectors containing i.i.d.samples ~ Exp(mean).
 
- 
exponentialJavaVectorRDDpublic static JavaRDD<Vector> exponentialJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.exponentialVectorRDD.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
exponentialJavaVectorRDDpublic static JavaRDD<Vector> exponentialJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols, int numPartitions) RandomRDDs.exponentialJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
exponentialJavaVectorRDDpublic static JavaRDD<Vector> exponentialJavaVectorRDD(JavaSparkContext jsc, double mean, long numRows, int numCols) RandomRDDs.exponentialJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- mean- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
- 
gammaVectorRDDpublic static RDD<Vector> gammaVectorRDD(SparkContext sc, double shape, double scale, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples drawn from the gamma distribution with the input shape and scale.- Parameters:
- sc- SparkContext used to create the RDD.
- shape- shape parameter (greater than 0) for the gamma distribution.
- scale- scale parameter (greater than 0) for the gamma distribution.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism)
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Vector] with vectors containing i.i.d.samples ~ Exp(mean).
 
- 
gammaJavaVectorRDDpublic static JavaRDD<Vector> gammaJavaVectorRDD(JavaSparkContext jsc, double shape, double scale, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.gammaVectorRDD.- Parameters:
- jsc- (undocumented)
- shape- (undocumented)
- scale- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
gammaJavaVectorRDDpublic static JavaRDD<Vector> gammaJavaVectorRDD(JavaSparkContext jsc, double shape, double scale, long numRows, int numCols, int numPartitions) RandomRDDs.gammaJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- shape- (undocumented)
- scale- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
gammaJavaVectorRDDpublic static JavaRDD<Vector> gammaJavaVectorRDD(JavaSparkContext jsc, double shape, double scale, long numRows, int numCols) RandomRDDs.gammaJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- shape- (undocumented)
- scale- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
- 
randomVectorRDDpublic static RDD<Vector> randomVectorRDD(SparkContext sc, RandomDataGenerator<Object> generator, long numRows, int numCols, int numPartitions, long seed) Generates an RDD[Vector] with vectors containingi.i.d.samples produced by the input RandomDataGenerator.- Parameters:
- sc- SparkContext used to create the RDD.
- generator- RandomDataGenerator used to populate the RDD.
- numRows- Number of Vectors in the RDD.
- numCols- Number of elements in each Vector.
- numPartitions- Number of partitions in the RDD (default:- sc.defaultParallelism).
- seed- Random seed (default: a random long integer).
- Returns:
- RDD[Vector] with vectors containing i.i.d.samples produced by generator.
 
- 
randomJavaVectorRDDpublic static JavaRDD<Vector> randomJavaVectorRDD(JavaSparkContext jsc, RandomDataGenerator<Object> generator, long numRows, int numCols, int numPartitions, long seed) Java-friendly version ofRandomRDDs.randomVectorRDD.- Parameters:
- jsc- (undocumented)
- generator- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- seed- (undocumented)
- Returns:
- (undocumented)
 
- 
randomJavaVectorRDDpublic static JavaRDD<Vector> randomJavaVectorRDD(JavaSparkContext jsc, RandomDataGenerator<Object> generator, long numRows, int numCols, int numPartitions) ::RandomRDDs.randomJavaVectorRDDwith the default seed.- Parameters:
- jsc- (undocumented)
- generator- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- numPartitions- (undocumented)
- Returns:
- (undocumented)
 
- 
randomJavaVectorRDDpublic static JavaRDD<Vector> randomJavaVectorRDD(JavaSparkContext jsc, RandomDataGenerator<Object> generator, long numRows, int numCols) RandomRDDs.randomJavaVectorRDDwith the default number of partitions and the default seed.- Parameters:
- jsc- (undocumented)
- generator- (undocumented)
- numRows- (undocumented)
- numCols- (undocumented)
- Returns:
- (undocumented)
 
 
-