@@ -961,7 +961,7 @@ private[python] class PythonMLLibAPI extends Serializable {
961
961
def estimateKernelDensity (
962
962
sample : JavaRDD [Double ],
963
963
bandwidth : Double , points : java.util.ArrayList [Double ]): Array [Double ] = {
964
- return new KernelDensity ().setSample(sample).setBandwidth(bandwidth).estimate(
964
+ new KernelDensity ().setSample(sample).setBandwidth(bandwidth).estimate(
965
965
points.asScala.toArray)
966
966
}
967
967
@@ -985,20 +985,28 @@ private[python] class PythonMLLibAPI extends Serializable {
985
985
*/
986
986
def generateLinearInputWrapper (
987
987
intercept : Double ,
988
- weights : JArrayList [Double ], xMean : JArrayList [Double ],
989
- xVariance : JArrayList [Double ], nPoints : Int , seed : Int , eps : Double ): Array [LabeledPoint ] = {
990
- return LinearDataGenerator .generateLinearInput(
991
- intercept, weights.asScala.toArray, xMean.asScala.toArray,
992
- xVariance.asScala.toArray, nPoints, seed, eps).toArray
988
+ weights : JList [Double ],
989
+ xMean : JList [Double ],
990
+ xVariance : JList [Double ],
991
+ nPoints : Int ,
992
+ seed : Int ,
993
+ eps : Double ): Array [LabeledPoint ] = {
994
+ LinearDataGenerator .generateLinearInput(
995
+ intercept, weights.asScala.toArray, xMean.asScala.toArray,
996
+ xVariance.asScala.toArray, nPoints, seed, eps).toArray
993
997
}
994
998
995
999
/**
996
1000
* Wrapper around the generateLinearRDD method of LinearDataGenerator.
997
1001
*/
998
1002
def generateLinearRDDWrapper (
999
- sc : JavaSparkContext , nexamples : Int , nfeatures : Int ,
1000
- eps : Double , nparts : Int , intercept : Double ): JavaRDD [LabeledPoint ] = {
1001
- return LinearDataGenerator .generateLinearRDD(
1003
+ sc : JavaSparkContext ,
1004
+ nexamples : Int ,
1005
+ nfeatures : Int ,
1006
+ eps : Double ,
1007
+ nparts : Int ,
1008
+ intercept : Double ): JavaRDD [LabeledPoint ] = {
1009
+ LinearDataGenerator .generateLinearRDD(
1002
1010
sc, nexamples, nfeatures, eps, nparts, intercept)
1003
1011
}
1004
1012
}
0 commit comments