Class: RandomRDDs

eclairjs/mllib/random. RandomRDDs

new RandomRDDs()

Source:

Methods

(static) exponentialJavaRDD0(jsc, mean, size, numPartitions, seed) → {module:eclairjs.FloatRDD}

Java-friendly version of [[RandomRDDs#exponentialRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
size number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) exponentialJavaRDD1(jsc, mean, size, numPartitions) → {module:eclairjs.FloatRDD}

[[RandomRDDs#exponentialJavaRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
size number
numPartitions number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) exponentialJavaRDD2(jsc, mean, size) → {module:eclairjs.FloatRDD}

[[RandomRDDs#exponentialJavaRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
size number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) exponentialJavaVectorRDD0(jsc, mean, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Java-friendly version of [[RandomRDDs#exponentialVectorRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
numRows number
numCols number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.RDD

(static) exponentialJavaVectorRDD1(jsc, mean, numRows, numCols, numPartitions) → {module:eclairjs.RDD}

[[RandomRDDs#exponentialJavaVectorRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
numRows number
numCols number
numPartitions number
Source:
Returns:
Type
module:eclairjs.RDD

(static) exponentialJavaVectorRDD2(jsc, mean, numRows, numCols) → {module:eclairjs.RDD}

[[RandomRDDs#exponentialJavaVectorRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
numRows number
numCols number
Source:
Returns:
Type
module:eclairjs.RDD

(static) exponentialRDD(sc, mean, size, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD comprised of `i.i.d.` samples from the exponential distribution with the input mean.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
mean number Mean, or 1 / lambda, for the exponential distribution.
size number Size of the RDD.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Double] comprised of `i.i.d.` samples ~ Pois(mean).
Type
module:eclairjs.RDD

(static) exponentialVectorRDD(sc, mean, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD[Vector] with vectors containing `i.i.d.` samples drawn from the exponential distribution with the input mean.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
mean number Mean, or 1 / lambda, for the Exponential distribution.
numRows number Number of Vectors in the RDD.
numCols number Number of elements in each Vector.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`)
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Vector] with vectors containing `i.i.d.` samples ~ Exp(mean).
Type
module:eclairjs.RDD

(static) gammaJavaRDD0(jsc, shape, scale, size, numPartitions, seed) → {module:eclairjs.FloatRDD}

Java-friendly version of [[RandomRDDs#gammaRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
shape number
scale number
size number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) gammaJavaRDD1(jsc, shape, scale, size, numPartitions) → {module:eclairjs.FloatRDD}

[[RandomRDDs#gammaJavaRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
shape number
scale number
size number
numPartitions number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) gammaJavaRDD2(jsc, shape, scale, size) → {module:eclairjs.FloatRDD}

[[RandomRDDs#gammaJavaRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
shape number
scale number
size number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) gammaJavaVectorRDD0(jsc, shape, scale, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Java-friendly version of [[RandomRDDs#gammaVectorRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
shape number
scale number
numRows number
numCols number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.RDD

(static) gammaJavaVectorRDD1(jsc, shape, scale, numRows, numCols, numPartitions) → {module:eclairjs.RDD}

[[RandomRDDs#gammaJavaVectorRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
shape number
scale number
numRows number
numCols number
numPartitions number
Source:
Returns:
Type
module:eclairjs.RDD

(static) gammaJavaVectorRDD2(jsc, shape, scale, numRows, numCols) → {module:eclairjs.RDD}

[[RandomRDDs#gammaJavaVectorRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
shape number
scale number
numRows number
numCols number
Source:
Returns:
Type
module:eclairjs.RDD

(static) gammaRDD(sc, shape, scale, size, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD comprised of `i.i.d.` samples from the gamma distribution with the input shape and scale.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
shape number shape parameter (> 0) for the gamma distribution
scale number scale parameter (> 0) for the gamma distribution
size number Size of the RDD.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Double] comprised of `i.i.d.` samples ~ Pois(mean).
Type
module:eclairjs.RDD

(static) gammaVectorRDD(sc, shape, scale, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD[Vector] with vectors containing `i.i.d.` samples drawn from the gamma distribution with the input shape and scale.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
shape number shape parameter (> 0) for the gamma distribution.
scale number scale parameter (> 0) for the gamma distribution.
numRows number Number of Vectors in the RDD.
numCols number Number of elements in each Vector.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`)
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Vector] with vectors containing `i.i.d.` samples ~ Exp(mean).
Type
module:eclairjs.RDD

(static) logNormalJavaRDD0(jsc, mean, std, size, numPartitions, seed) → {module:eclairjs.FloatRDD}

Java-friendly version of [[RandomRDDs#logNormalRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
std number
size number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) logNormalJavaRDD1(jsc, mean, std, size, numPartitions) → {module:eclairjs.FloatRDD}

[[RandomRDDs#logNormalJavaRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
std number
size number
numPartitions number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) logNormalJavaRDD2(jsc, mean, std, size) → {module:eclairjs.FloatRDD}

[[RandomRDDs#logNormalJavaRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
std number
size number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) logNormalJavaVectorRDD0(jsc, mean, std, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Java-friendly version of [[RandomRDDs#logNormalVectorRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
std number
numRows number
numCols number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.RDD

(static) logNormalJavaVectorRDD1(jsc, mean, std, numRows, numCols, numPartitions) → {module:eclairjs.RDD}

[[RandomRDDs#logNormalJavaVectorRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
std number
numRows number
numCols number
numPartitions number
Source:
Returns:
Type
module:eclairjs.RDD

(static) logNormalJavaVectorRDD2(jsc, mean, std, numRows, numCols) → {module:eclairjs.RDD}

[[RandomRDDs#logNormalJavaVectorRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
std number
numRows number
numCols number
Source:
Returns:
Type
module:eclairjs.RDD

(static) logNormalRDD(sc, mean, std, size, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD comprised of `i.i.d.` samples from the log normal distribution with the input mean and standard deviation
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
mean number mean for the log normal distribution
std number standard deviation for the log normal distribution
size number Size of the RDD.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Double] comprised of `i.i.d.` samples ~ Pois(mean).
Type
module:eclairjs.RDD

(static) logNormalVectorRDD(sc, mean, std, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD[Vector] with vectors containing `i.i.d.` samples drawn from a log normal distribution.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
mean number Mean of the log normal distribution.
std number Standard deviation of the log normal distribution.
numRows number Number of Vectors in the RDD.
numCols number Number of elements in each Vector.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Vector] with vectors containing `i.i.d.` samples.
Type
module:eclairjs.RDD

(static) normalRDD(sc, size, numPartitionsopt, seedopt) → {module:eclairjs.RDD}

Generates an RDD comprised of `i.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^)`, use `RandomRDDs.normalRDD(sc, n, p, seed).map(v => mean + sigma * v)`.
Parameters:
Name Type Attributes Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
size number Size of the RDD.
numPartitions number <optional>
Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number <optional>
Random seed (default: a random long integer).
Source:
Returns:
RDD[Double] Optional comprised of `i.i.d.` samples ~ N(0.0, 1.0).
Type
module:eclairjs.RDD

(static) normalVectorRDD(sc, numRows, numCols, numPartitionsopt, seedopt) → {module:eclairjs.RDD}

Generates an RDD[Vector] with vectors containing `i.i.d.` samples drawn from the standard normal distribution.
Parameters:
Name Type Attributes Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
numRows number Number of Vectors in the RDD.
numCols number Number of elements in each Vector.
numPartitions number <optional>
Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number <optional>
Random seed (default: a random long integer).
Source:
Returns:
RDD[Vector] with vectors containing `i.i.d.` samples ~ `N(0.0, 1.0)`.
Type
module:eclairjs.RDD

(static) poissonJavaRDD0(jsc, mean, size, numPartitions, seed) → {module:eclairjs.FloatRDD}

Java-friendly version of [[RandomRDDs#poissonRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
size number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) poissonJavaRDD1(jsc, mean, size, numPartitions) → {module:eclairjs.FloatRDD}

[[RandomRDDs#poissonJavaRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
size number
numPartitions number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) poissonJavaRDD2(jsc, mean, size) → {module:eclairjs.FloatRDD}

[[RandomRDDs#poissonJavaRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
size number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) poissonJavaVectorRDD0(jsc, mean, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Java-friendly version of [[RandomRDDs#poissonVectorRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
numRows number
numCols number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.RDD

(static) poissonJavaVectorRDD1(jsc, mean, numRows, numCols, numPartitions) → {module:eclairjs.RDD}

[[RandomRDDs#poissonJavaVectorRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
numRows number
numCols number
numPartitions number
Source:
Returns:
Type
module:eclairjs.RDD

(static) poissonJavaVectorRDD2(jsc, mean, numRows, numCols) → {module:eclairjs.RDD}

[[RandomRDDs#poissonJavaVectorRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
mean number
numRows number
numCols number
Source:
Returns:
Type
module:eclairjs.RDD

(static) poissonRDD(sc, mean, size, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD comprised of `i.i.d.` samples from the Poisson distribution with the input mean.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
mean number Mean, or lambda, for the Poisson distribution.
size number Size of the RDD.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Double] comprised of `i.i.d.` samples ~ Pois(mean).
Type
module:eclairjs.RDD

(static) poissonVectorRDD(sc, mean, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD[Vector] with vectors containing `i.i.d.` samples drawn from the Poisson distribution with the input mean.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
mean number Mean, or lambda, for the Poisson distribution.
numRows number Number of Vectors in the RDD.
numCols number Number of elements in each Vector.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`)
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Vector] with vectors containing `i.i.d.` samples ~ Pois(mean).
Type
module:eclairjs.RDD

(static) uniformJavaRDD0(jsc, size, numPartitions, seed) → {module:eclairjs.FloatRDD}

Java-friendly version of [[RandomRDDs#uniformRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
size number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) uniformJavaRDD1(jsc, size, numPartitions) → {module:eclairjs.FloatRDD}

[[RandomRDDs#uniformJavaRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
size number
numPartitions number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) uniformJavaRDD2(jsc, size) → {module:eclairjs.FloatRDD}

[[RandomRDDs#uniformJavaRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
size number
Source:
Returns:
Type
module:eclairjs.FloatRDD

(static) uniformJavaVectorRDD0(jsc, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Java-friendly version of [[RandomRDDs#uniformVectorRDD]].
Parameters:
Name Type Description
jsc JavaSparkContext
numRows number
numCols number
numPartitions number
seed number
Source:
Returns:
Type
module:eclairjs.RDD

(static) uniformJavaVectorRDD1(jsc, numRows, numCols, numPartitions) → {module:eclairjs.RDD}

[[RandomRDDs#uniformJavaVectorRDD]] with the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
numRows number
numCols number
numPartitions number
Source:
Returns:
Type
module:eclairjs.RDD

(static) uniformJavaVectorRDD2(jsc, numRows, numCols) → {module:eclairjs.RDD}

[[RandomRDDs#uniformJavaVectorRDD]] with the default number of partitions and the default seed.
Parameters:
Name Type Description
jsc JavaSparkContext
numRows number
numCols number
Source:
Returns:
Type
module:eclairjs.RDD

(static) uniformRDD(sc, size, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD comprised of `i.i.d.` samples from the uniform distribution `U(0.0, 1.0)`. To transform the distribution in the generated RDD from `U(0.0, 1.0)` to `U(a, b)`, use `RandomRDDs.uniformRDD(sc, n, p, seed).map(v => a + (b - a) * v)`.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
size number Size of the RDD.
numPartitions number Number of partitions in the RDD (default: `sc.defaultParallelism`).
seed number Random seed (default: a random long integer).
Source:
Returns:
RDD[Double] comprised of `i.i.d.` samples ~ `U(0.0, 1.0)`.
Type
module:eclairjs.RDD

(static) uniformVectorRDD(sc, numRows, numCols, numPartitions, seed) → {module:eclairjs.RDD}

Generates an RDD[Vector] with vectors containing `i.i.d.` samples drawn from the uniform distribution on `U(0.0, 1.0)`.
Parameters:
Name Type Description
sc module:eclairjs.SparkContext SparkContext used to create the RDD.
numRows number Number of Vectors in the RDD.
numCols number Number of elements in each Vector.
numPartitions number Number of partitions in the RDD.
seed number Seed for the RNG that generates the seed for the generator in each partition.
Source:
Returns:
RDD[Vector] with vectors containing i.i.d samples ~ `U(0.0, 1.0)`.
Type
module:eclairjs.RDD