Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Feb 15, 2018
1 parent 3a29039 commit 174c114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ final class Bucketizer @Since("1.4.0") (@Since("1.4.0") override val uid: String
defaultCopy[Bucketizer](extra).setParent(parent)
}

@Since("2.3.0")
override def write: MLWriter = new Bucketizer.BucketizerWriter(this)
}

Expand Down Expand Up @@ -309,7 +308,7 @@ object Bucketizer extends DefaultParamsReadable[Bucketizer] {
// we can get rid of this.
var paramWithoutOutputCol: Option[JValue] = None
if (instance.isSet(instance.inputCols)) {
val params = instance.extractParamMap().toSeq.asInstanceOf[Seq[ParamPair[Any]]]
val params = instance.extractParamMap().toSeq
val jsonParams = params.filter(_.param != instance.outputCol).map { case ParamPair(p, v) =>
p.name -> parse(p.jsonEncode(v))
}.toList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ final class QuantileDiscretizer @Since("1.6.0") (@Since("1.6.0") override val ui
@Since("1.6.0")
override def copy(extra: ParamMap): QuantileDiscretizer = defaultCopy(extra)

@Since("2.3.0")
override def write: MLWriter = new QuantileDiscretizer.QuantileDiscretizerWriter(this)
}

Expand All @@ -273,7 +272,7 @@ object QuantileDiscretizer extends DefaultParamsReadable[QuantileDiscretizer] wi
// we can get rid of this.
var paramWithoutOutputCol: Option[JValue] = None
if (instance.isSet(instance.inputCols)) {
val params = instance.extractParamMap().toSeq.asInstanceOf[Seq[ParamPair[Any]]]
val params = instance.extractParamMap().toSeq
val jsonParams = params.filter(_.param != instance.outputCol).map { case ParamPair(p, v) =>
p.name -> parse(p.jsonEncode(v))
}.toList
Expand Down

0 comments on commit 174c114

Please sign in to comment.