File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
mllib/src/main/scala/org/apache/spark/mllib/evaluation Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,14 @@ import org.apache.spark.sql.DataFrame
3131 * (prediction, label) pairs.
3232 */
3333@ Since (" 1.1.0" )
34- class MulticlassMetrics @ Since (" 3.0 .0" ) (predAndLabelsWithOptWeight : RDD [_]) {
34+ class MulticlassMetrics @ Since (" 1.1 .0" ) (predAndLabelsWithOptWeight : RDD [_ <: Product ]) {
3535 val predLabelsWeight : RDD [(Double , Double , Double )] = predAndLabelsWithOptWeight.map {
3636 case (prediction : Double , label : Double , weight : Double ) =>
3737 (prediction, label, weight)
3838 case (prediction : Double , label : Double ) =>
3939 (prediction, label, 1.0 )
40+ case other =>
41+ throw new IllegalArgumentException (s " Expected tuples, got $other" )
4042 }
4143
4244 /**
You can’t perform that action at this time.
0 commit comments