Skip to content

Commit cd82540

Browse files
committed
Sparkling water update
1 parent 7c8794f commit cd82540

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tutorials/sparkling-water/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,15 @@
225225
idfModel: IDFModel,
226226
h2oContext: H2OContext,
227227
hamThreshold: Double = 0.5):String = {
228-
val msgRdd = sc.parallelize(Seq(msg))
229-
val msgVector: DataFrame = idfModel.transform(
230-
hashingTF.transform (
231-
tokenize (msgRdd))).map(v => SMS("?", v)).toDF
232-
val msgTable: H2OFrame = h2oContext.asH2OFrame(msgVector)
233-
msgTable.remove(0) // remove first column
234-
val prediction = dlModel.score(msgTable)
235-
236-
if (prediction.vecs()(1).at(0) < hamThreshold) "SPAM DETECTED!" else "HAM"
228+
val msgRdd = sc.parallelize(Seq(msg))
229+
val msgVector: DataFrame = idfModel.transform(
230+
hashingTF.transform (
231+
tokenize (msgRdd))).map(v => SMS("?", v)).toDF
232+
val msgTable: H2OFrame = h2oContext.asH2OFrame(msgVector)
233+
msgTable.remove(0) // remove first column
234+
val prediction = dlModel.score(msgTable)
235+
236+
if (prediction.vecs()(1).at(0) < hamThreshold) "SPAM DETECTED!" else "HAM"
237237
}
238238
```
239239

0 commit comments

Comments
 (0)