@@ -733,7 +733,6 @@ setMethod("predict", signature(object = "KMeansModel"),
733733# ' excepting that at most one value may be 0. The class with largest value p/t is predicted, where p
734734# ' is the original probability of that class and t is the class's threshold.
735735# ' @param weightCol The weight column name.
736- # ' @param probabilityCol column name for predicted class conditional probabilities.
737736# ' @param ... additional arguments passed to the method.
738737# ' @return \code{spark.logit} returns a fitted logistic regression model
739738# ' @rdname spark.logit
@@ -772,7 +771,7 @@ setMethod("predict", signature(object = "KMeansModel"),
772771setMethod ("spark.logit ", signature(data = "SparkDataFrame", formula = "formula"),
773772 function (data , formula , regParam = 0.0 , elasticNetParam = 0.0 , maxIter = 100 ,
774773 tol = 1E-6 , family = " auto" , standardization = TRUE ,
775- thresholds = 0.5 , weightCol = NULL , probabilityCol = " probability " ) {
774+ thresholds = 0.5 , weightCol = NULL ) {
776775 formula <- paste(deparse(formula ), collapse = " " )
777776
778777 if (is.null(weightCol )) {
@@ -784,7 +783,7 @@ setMethod("spark.logit", signature(data = "SparkDataFrame", formula = "formula")
784783 as.numeric(elasticNetParam ), as.integer(maxIter ),
785784 as.numeric(tol ), as.character(family ),
786785 as.logical(standardization ), as.array(thresholds ),
787- as.character(weightCol ), as.character( probabilityCol ) )
786+ as.character(weightCol ))
788787 new(" LogisticRegressionModel" , jobj = jobj )
789788 })
790789
@@ -1425,7 +1424,7 @@ setMethod("predict", signature(object = "GaussianMixtureModel"),
14251424# ' @param userCol column name for user ids. Ids must be (or can be coerced into) integers.
14261425# ' @param itemCol column name for item ids. Ids must be (or can be coerced into) integers.
14271426# ' @param rank rank of the matrix factorization (> 0).
1428- # ' @param reg regularization parameter (>= 0).
1427+ # ' @param regParam regularization parameter (>= 0).
14291428# ' @param maxIter maximum number of iterations (>= 0).
14301429# ' @param nonnegative logical value indicating whether to apply nonnegativity constraints.
14311430# ' @param implicitPrefs logical value indicating whether to use implicit preference.
@@ -1464,20 +1463,20 @@ setMethod("predict", signature(object = "GaussianMixtureModel"),
14641463# '
14651464# ' # set other arguments
14661465# ' modelS <- spark.als(df, "rating", "user", "item", rank = 20,
1467- # ' reg = 0.1, nonnegative = TRUE)
1466+ # ' regParam = 0.1, nonnegative = TRUE)
14681467# ' statsS <- summary(modelS)
14691468# ' }
14701469# ' @note spark.als since 2.1.0
14711470setMethod ("spark.als ", signature(data = "SparkDataFrame"),
14721471 function (data , ratingCol = " rating" , userCol = " user" , itemCol = " item" ,
1473- rank = 10 , reg = 0.1 , maxIter = 10 , nonnegative = FALSE ,
1472+ rank = 10 , regParam = 0.1 , maxIter = 10 , nonnegative = FALSE ,
14741473 implicitPrefs = FALSE , alpha = 1.0 , numUserBlocks = 10 , numItemBlocks = 10 ,
14751474 checkpointInterval = 10 , seed = 0 ) {
14761475
14771476 if (! is.numeric(rank ) || rank < = 0 ) {
14781477 stop(" rank should be a positive number." )
14791478 }
1480- if (! is.numeric(reg ) || reg < 0 ) {
1479+ if (! is.numeric(regParam ) || regParam < 0 ) {
14811480 stop(" reg should be a nonnegative number." )
14821481 }
14831482 if (! is.numeric(maxIter ) || maxIter < = 0 ) {
@@ -1486,7 +1485,7 @@ setMethod("spark.als", signature(data = "SparkDataFrame"),
14861485
14871486 jobj <- callJStatic(" org.apache.spark.ml.r.ALSWrapper" ,
14881487 " fit" , data @ sdf , ratingCol , userCol , itemCol , as.integer(rank ),
1489- reg , as.integer(maxIter ), implicitPrefs , alpha , nonnegative ,
1488+ regParam , as.integer(maxIter ), implicitPrefs , alpha , nonnegative ,
14901489 as.integer(numUserBlocks ), as.integer(numItemBlocks ),
14911490 as.integer(checkpointInterval ), as.integer(seed ))
14921491 new(" ALSModel" , jobj = jobj )
@@ -1684,8 +1683,6 @@ print.summary.KSTest <- function(x, ...) {
16841683# ' nodes. If TRUE, the algorithm will cache node IDs for each instance. Caching
16851684# ' can speed up training of deeper trees. Users can set how often should the
16861685# ' cache be checkpointed or disable it by setting checkpointInterval.
1687- # ' @param probabilityCol column name for predicted class conditional probabilities, only for
1688- # ' classification.
16891686# ' @param ... additional arguments passed to the method.
16901687# ' @aliases spark.randomForest,SparkDataFrame,formula-method
16911688# ' @return \code{spark.randomForest} returns a fitted Random Forest model.
@@ -1720,7 +1717,7 @@ setMethod("spark.randomForest", signature(data = "SparkDataFrame", formula = "fo
17201717 maxDepth = 5 , maxBins = 32 , numTrees = 20 , impurity = NULL ,
17211718 featureSubsetStrategy = " auto" , seed = NULL , subsamplingRate = 1.0 ,
17221719 minInstancesPerNode = 1 , minInfoGain = 0.0 , checkpointInterval = 10 ,
1723- maxMemoryInMB = 256 , cacheNodeIds = FALSE , probabilityCol = " probability " ) {
1720+ maxMemoryInMB = 256 , cacheNodeIds = FALSE ) {
17241721 type <- match.arg(type )
17251722 formula <- paste(deparse(formula ), collapse = " " )
17261723 if (! is.null(seed )) {
@@ -1749,7 +1746,7 @@ setMethod("spark.randomForest", signature(data = "SparkDataFrame", formula = "fo
17491746 impurity , as.integer(minInstancesPerNode ),
17501747 as.numeric(minInfoGain ), as.integer(checkpointInterval ),
17511748 as.character(featureSubsetStrategy ), seed ,
1752- as.numeric(subsamplingRate ), as.character( probabilityCol ),
1749+ as.numeric(subsamplingRate ),
17531750 as.integer(maxMemoryInMB ), as.logical(cacheNodeIds ))
17541751 new(" RandomForestClassificationModel" , jobj = jobj )
17551752 }
0 commit comments