override def buildFeatures()

in core/src/main/scala/com/spotify/featran/transformers/StandardScaler.scala [62:73]


  override def buildFeatures(a: Option[Double], c: (Double, Double), fb: FeatureBuilder[_]): Unit =
    a match {
      case Some(x) =>
        val r = (withStd, withMean) match {
          case (true, true)   => (x - c._1) / c._2
          case (true, false)  => (x - c._1) / c._2 + c._1
          case (false, true)  => x - c._1
          case (false, false) => x
        }
        fb.add(name, r)
      case None => fb.add(name, if (withMean) 0.0 else c._1)
    }