Skip to content

Commit

Permalink
fixed compilation issues, but have not added tests yet
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbradley committed Feb 5, 2015
1 parent bfade12 commit d35bb5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ class AdaBoost extends Classifier[AdaBoost, AdaBoostModel]
val featuresColName = paramMap(featuresCol)
val wl = paramMap(weakLearner)
val featuresRDD: RDD[Vector] = wl match {
case wlTagged: WeakLearner =>
case wlTagged: WeakLearner[_] =>
val wlParamMap = paramMap(weakLearnerParamMap)
val wlFeaturesColName = wlParamMap(wl.featuresCol)
val origFeaturesRDD = dataset.select(featuresColName.attr).as(wlFeaturesColName.attr)
// TODO: How do I get this to use the string value of wlFeaturesColName?
val origFeaturesRDD = dataset.select(featuresColName.attr).as('wlFeaturesColName)
wlTagged.getNativeFeatureRDD(origFeaturesRDD, wlParamMap)
case _ =>
dataset.select(featuresColName.attr).map { case Row(features: Vector) => features }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class LogisticRegressionModel private[ml] (
}

override def predictRaw(features: Vector): Vector = {
val m = margin(m)
val m = margin(features)
Vectors.dense(Array(-m, m))
}
}

0 comments on commit d35bb5d

Please sign in to comment.