Skip to content
Prev Previous commit
Next Next commit
change featureToVector and validateSchema to private functions
  • Loading branch information
lu-wang-dl committed Apr 23, 2018
commit 3ffb32291503a628c63a7014d27f2313f04c5497
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private[clustering] trait KMeansParams extends Params with HasMaxIter with HasFe
* Validates the input schema.
* @param schema input schema
*/
protected def validateSchema(schema: StructType): Unit = {
private[clustering] def validateSchema(schema: StructType): Unit = {
val typeCandidates = List( new VectorUDT,
new ArrayType(DoubleType, false),
new ArrayType(FloatType, false))
Expand All @@ -111,7 +111,7 @@ private[clustering] trait KMeansParams extends Params with HasMaxIter with HasFe
* @return Vector feature column
*/
@Since("2.4.0")
protected def featureToVector(dataset: Dataset[_], colName: String): Column = {
private[clustering] def featureToVector(dataset: Dataset[_], colName: String): Column = {
val featuresDataType = dataset.schema(colName).dataType
featuresDataType match {
case _: VectorUDT => col(colName)
Expand Down