Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/21493#discussion_r192909369
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/clustering/PowerIterationClustering.scala
---
@@ -66,62 +65,35 @@ private[clustering] trait
PowerIterationClusteringParams extends Params with Has
def getInitMode: String = $(initMode)
/**
- * Param for the name of the input column for vertex IDs.
- * Default: "id"
+ * Param for the name of the input column for source vertex IDs.
+ * Default: "src"
* @group param
*/
@Since("2.4.0")
- val idCol = new Param[String](this, "idCol", "Name of the input column
for vertex IDs.",
+ val srcCol = new Param[String](this, "srcCol", "Name of the input column
for source vertex IDs.",
(value: String) => value.nonEmpty)
- setDefault(idCol, "id")
+ setDefault(srcCol, "src")
/** @group getParam */
@Since("2.4.0")
- def getIdCol: String = getOrDefault(idCol)
+ def getSrcCol: String = getOrDefault(srcCol)
/**
- * Param for the name of the input column for neighbors in the adjacency
list representation.
- * Default: "neighbors"
+ * Name of the input column for destination vertex IDs.
+ * Default: "dst"
* @group param
*/
@Since("2.4.0")
- val neighborsCol = new Param[String](this, "neighborsCol",
- "Name of the input column for neighbors in the adjacency list
representation.",
+ val dstCol = new Param[String](this, "dstCol",
+ "Name of the input column for destination vertex IDs.",
(value: String) => value.nonEmpty)
- setDefault(neighborsCol, "neighbors")
+ setDefault(dstCol, "dst")
--- End diff --
Could you put all default values in a single `setDefault` call?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]