Skip to content

Commit d35bb5d

Browse files
committed
fixed compilation issues, but have not added tests yet
1 parent bfade12 commit d35bb5d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

mllib/src/main/scala/org/apache/spark/ml/classification/AdaBoost.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ class AdaBoost extends Classifier[AdaBoost, AdaBoostModel]
5757
val featuresColName = paramMap(featuresCol)
5858
val wl = paramMap(weakLearner)
5959
val featuresRDD: RDD[Vector] = wl match {
60-
case wlTagged: WeakLearner =>
60+
case wlTagged: WeakLearner[_] =>
6161
val wlParamMap = paramMap(weakLearnerParamMap)
6262
val wlFeaturesColName = wlParamMap(wl.featuresCol)
63-
val origFeaturesRDD = dataset.select(featuresColName.attr).as(wlFeaturesColName.attr)
63+
// TODO: How do I get this to use the string value of wlFeaturesColName?
64+
val origFeaturesRDD = dataset.select(featuresColName.attr).as('wlFeaturesColName)
6465
wlTagged.getNativeFeatureRDD(origFeaturesRDD, wlParamMap)
6566
case _ =>
6667
dataset.select(featuresColName.attr).map { case Row(features: Vector) => features }

mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class LogisticRegressionModel private[ml] (
149149
}
150150

151151
override def predictRaw(features: Vector): Vector = {
152-
val m = margin(m)
152+
val m = margin(features)
153153
Vectors.dense(Array(-m, m))
154154
}
155155
}

0 commit comments

Comments
 (0)