Skip to content

Commit

Permalink
Removing default environment from Scala DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalohlava committed Apr 3, 2014
1 parent fcc23d7 commit d583f14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
12 changes: 0 additions & 12 deletions h2o-scala/src/main/scala/water/api/dsl/DefaultEnv.scala

This file was deleted.

2 changes: 1 addition & 1 deletion h2o-scala/src/main/scala/water/api/dsl/H2ODsl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import water.fvec.Frame
import water.Key

/** The object carry global environment and provides basic global methods such as head, tail, nrows, ... */
object H2ODsl extends H2ODslImplicitConv with T_R_Env[DFrame] with T_H2O_Env[HexKey, DFrame] with DefaultEnv[HexKey, DFrame] {
object H2ODsl extends H2ODslImplicitConv with T_R_Env[DFrame] with T_H2O_Env[HexKey, DFrame] {
// Binary operator type alias
type BOp = T_NV_Transf[scala.Double]
// Filter operator type alias
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ makes a prediction over train data and compute MSE of prediction."""")
val predict:DFrame = model.score(f.frame())

println("Prediction on train data: \n" + predict)
// compute mean squared errors
val serr = (response - predict)^2

val response = f(2) // take 2nd column as response
val serr = (response - predict)^2 // compute mean squared errors
println("Errors per row: " + serr)
// make a sum
val rss = serr collect (0.0, new CDOp() {
Expand Down

0 comments on commit d583f14

Please sign in to comment.