Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxingao committed Jul 16, 2020
1 parent 72c17e9 commit 4bc1053
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,12 @@ private[clustering] trait BisectingKMeansParams extends Params with HasMaxIter
"The minimum number of points (if >= 1.0) or the minimum proportion " +
"of points (if < 1.0) of a divisible cluster.", ParamValidators.gt(0.0))


setDefault(
k -> 4,
maxIter -> 20,
minDivisibleClusterSize -> 1.0)

/** @group expertGetParam */
@Since("2.0.0")
def getMinDivisibleClusterSize: Double = $(minDivisibleClusterSize)

setDefault(k -> 4, maxIter -> 20, minDivisibleClusterSize -> 1.0)

/**
* Validates and transforms the input schema.
* @param schema input schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ private[clustering] trait GaussianMixtureParams extends Params with HasMaxIter w
@Since("2.0.0")
def getK: Int = $(k)

setDefault(
k -> 2,
maxIter -> 100,
tol -> 0.01,
blockSize -> 1)
setDefault(k -> 2, maxIter -> 100, tol -> 0.01, blockSize -> 1)

/**
* Validates and transforms the input schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,8 @@ private[clustering] trait KMeansParams extends Params with HasMaxIter with HasFe
@Since("1.5.0")
def getInitSteps: Int = $(initSteps)

setDefault(
k -> 2,
maxIter -> 20,
initMode -> MLlibKMeans.K_MEANS_PARALLEL,
initSteps -> 2,
tol -> 1e-4,
distanceMeasure -> DistanceMeasure.EUCLIDEAN)
setDefault(k -> 2, maxIter -> 20, initMode -> MLlibKMeans.K_MEANS_PARALLEL, initSteps -> 2,
tol -> 1e-4, distanceMeasure -> DistanceMeasure.EUCLIDEAN)

/**
* Validates and transforms the input schema.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ class LinearRegression @Since("1.3.0") (@Since("1.3.0") override val uid: String
@Since("1.5.0")
def setStandardization(value: Boolean): this.type = set(standardization, value)



/**
* Set the ElasticNet mixing parameter.
* For alpha = 0, the penalty is an L2 penalty.
Expand Down
1 change: 0 additions & 1 deletion python/pyspark/ml/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ def __init__(self, featuresCol="features", labelCol="label", predictionCol="pred
super(LinearSVC, self).__init__()
self._java_obj = self._new_java_obj(
"org.apache.spark.ml.classification.LinearSVC", self.uid)

kwargs = self._input_kwargs
self.setParams(**kwargs)

Expand Down

0 comments on commit 4bc1053

Please sign in to comment.