Skip to content

Commit a97ee97

Browse files
committed
Fix some points
1 parent aef9564 commit a97ee97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ private[ml] class LibSVMRelation(val path: String, val numFeatures: Int, val vec
5151
val rowBuilders = Array(
5252
(pt: LabeledPoint) => Seq(pt.label),
5353
if (vectorType == "dense") {
54-
(pt: LabeledPoint) => Seq(pt.features.toSparse)
55-
} else {
5654
(pt: LabeledPoint) => Seq(pt.features.toDense)
55+
} else {
56+
(pt: LabeledPoint) => Seq(pt.features.toSparse)
5757
}
5858
)
5959

@@ -79,7 +79,7 @@ class DefaultSource extends RelationProvider with DataSourceRegister {
7979

8080
private def checkPath(parameters: Map[String, String]): String = {
8181
require(parameters.contains("path"), "'path' must be specified")
82-
parameters.get("path")
82+
parameters.get("path").get
8383
}
8484

8585
/**

0 commit comments

Comments
 (0)