diff options
Diffstat (limited to 'mllib/src')
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala b/mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala index c4e5fd8e46..555da8c7e7 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala @@ -625,6 +625,21 @@ class PythonMLLibAPI extends Serializable { } /** + * Java stub for Python mllib RandomRDDGenerators.logNormalRDD() + */ + def logNormalRDD(jsc: JavaSparkContext, + mean: Double, + std: Double, + size: Long, + numPartitions: java.lang.Integer, + seed: java.lang.Long): JavaRDD[Double] = { + val parts = getNumPartitionsOrDefault(numPartitions, jsc) + val s = getSeedOrDefault(seed) + RG.logNormalRDD(jsc.sc, mean, std, size, parts, s) + } + + + /** * Java stub for Python mllib RandomRDDGenerators.poissonRDD() */ def poissonRDD(jsc: JavaSparkContext, @@ -638,6 +653,33 @@ class PythonMLLibAPI extends Serializable { } /** + * Java stub for Python mllib RandomRDDGenerators.exponentialRDD() + */ + def exponentialRDD(jsc: JavaSparkContext, + mean: Double, + size: Long, + numPartitions: java.lang.Integer, + seed: java.lang.Long): JavaRDD[Double] = { + val parts = getNumPartitionsOrDefault(numPartitions, jsc) + val s = getSeedOrDefault(seed) + RG.exponentialRDD(jsc.sc, mean, size, parts, s) + } + + /** + * Java stub for Python mllib RandomRDDGenerators.gammaRDD() + */ + def gammaRDD(jsc: JavaSparkContext, + shape: Double, + scale: Double, + size: Long, + numPartitions: java.lang.Integer, + seed: java.lang.Long): JavaRDD[Double] = { + val parts = getNumPartitionsOrDefault(numPartitions, jsc) + val s = getSeedOrDefault(seed) + RG.gammaRDD(jsc.sc, shape, scale, size, parts, s) + } + + /** * Java stub for Python mllib RandomRDDGenerators.uniformVectorRDD() */ def uniformVectorRDD(jsc: JavaSparkContext, @@ -664,6 +706,22 @@ class PythonMLLibAPI extends Serializable { } /** + * Java stub for Python mllib RandomRDDGenerators.logNormalVectorRDD() + */ + def logNormalVectorRDD(jsc: JavaSparkContext, + mean: Double, + std: Double, + numRows: Long, + numCols: Int, + numPartitions: java.lang.Integer, + seed: java.lang.Long): JavaRDD[Vector] = { + val parts = getNumPartitionsOrDefault(numPartitions, jsc) + val s = getSeedOrDefault(seed) + RG.logNormalVectorRDD(jsc.sc, mean, std, numRows, numCols, parts, s) + } + + + /** * Java stub for Python mllib RandomRDDGenerators.poissonVectorRDD() */ def poissonVectorRDD(jsc: JavaSparkContext, @@ -677,6 +735,36 @@ class PythonMLLibAPI extends Serializable { RG.poissonVectorRDD(jsc.sc, mean, numRows, numCols, parts, s) } + /** + * Java stub for Python mllib RandomRDDGenerators.exponentialVectorRDD() + */ + def exponentialVectorRDD(jsc: JavaSparkContext, + mean: Double, + numRows: Long, + numCols: Int, + numPartitions: java.lang.Integer, + seed: java.lang.Long): JavaRDD[Vector] = { + val parts = getNumPartitionsOrDefault(numPartitions, jsc) + val s = getSeedOrDefault(seed) + RG.exponentialVectorRDD(jsc.sc, mean, numRows, numCols, parts, s) + } + + /** + * Java stub for Python mllib RandomRDDGenerators.gammaVectorRDD() + */ + def gammaVectorRDD(jsc: JavaSparkContext, + shape: Double, + scale: Double, + numRows: Long, + numCols: Int, + numPartitions: java.lang.Integer, + seed: java.lang.Long): JavaRDD[Vector] = { + val parts = getNumPartitionsOrDefault(numPartitions, jsc) + val s = getSeedOrDefault(seed) + RG.gammaVectorRDD(jsc.sc, shape, scale, numRows, numCols, parts, s) + } + + } /** |