Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Renamed schema_temp with more descriptive camelCase variable names.
  • Loading branch information
sharp-pixel committed Aug 19, 2017
commit d14c21e14b37501f75cf39244da7d93fa66b47fc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ private[clustering] trait GaussianMixtureParams extends Params with HasMaxIter w
*/
protected def validateAndTransformSchema(schema: StructType): StructType = {
SchemaUtils.checkColumnType(schema, $(featuresCol), new VectorUDT)
val schema_temp = SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType)
SchemaUtils.appendColumn(schema_temp, $(probabilityCol), new VectorUDT)
val schemaWithPredictionCol = SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType)
SchemaUtils.appendColumn(schemaWithPredictionCol, $(probabilityCol), new VectorUDT)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ private[regression] trait AFTSurvivalRegressionParams extends Params
SchemaUtils.checkNumericType(schema, $(labelCol))
}

val temp_schema = if (hasQuantilesCol) {
val schemaWithQuantilesCol = if (hasQuantilesCol) {
SchemaUtils.appendColumn(schema, $(quantilesCol), new VectorUDT)
} else schema

SchemaUtils.appendColumn(temp_schema, $(predictionCol), DoubleType)
SchemaUtils.appendColumn(schemaWithQuantilesCol, $(predictionCol), DoubleType)
}
}

Expand Down