This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.spark.ml.classification | |
import breeze.linalg.{DenseVector => BDV} | |
import breeze.numerics.sigmoid | |
import breeze.optimize.{CachedDiffFunction, DiffFunction, LBFGS} | |
import org.apache.spark.broadcast.Broadcast | |
import org.apache.spark.ml.linalg.{BLAS, Vector, Vectors} | |
import org.apache.spark.ml.param.ParamMap | |
import org.apache.spark.mllib.util.MLUtils | |
import org.apache.spark.rdd.RDD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz._ | |
import Scalaz._ | |
object RPN { | |
type DoubleListState[A] = State[List[Double], A] | |
def eval(input: String) = { | |
def binOp(op: String): Option[(Double, Double) => Double] = op match { | |
case "+" => Some(_ + _) | |
case "-" => Some(_ - _) |