Skip to content

Commit

Permalink
Fix some points
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewuathe committed Sep 3, 2015
1 parent aef9564 commit a97ee97
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ private[ml] class LibSVMRelation(val path: String, val numFeatures: Int, val vec
val rowBuilders = Array(
(pt: LabeledPoint) => Seq(pt.label),
if (vectorType == "dense") {
(pt: LabeledPoint) => Seq(pt.features.toSparse)
} else {
(pt: LabeledPoint) => Seq(pt.features.toDense)
} else {
(pt: LabeledPoint) => Seq(pt.features.toSparse)
}
)

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

private def checkPath(parameters: Map[String, String]): String = {
require(parameters.contains("path"), "'path' must be specified")
parameters.get("path")
parameters.get("path").get
}

/**
Expand Down

0 comments on commit a97ee97

Please sign in to comment.