Commit 335d58b53913fe6ffd046045aeaa913b7f24b88a
1 parent
e8e6082191
Exists in
master
...
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
app/com/piki_ds/ver2ggh/gghScore.scala
View file @
335d58b
1 | 1 | /** |
2 | 2 | * Created by Evan on 2016. 5. 18.. |
3 | 3 | */ |
4 | + | |
4 | 5 | package com.piki_ds.ver2ggh |
5 | 6 | |
6 | -import java.util.Date | |
7 | - | |
8 | 7 | import com.piki_ds.ver2ggh |
9 | 8 | import com.piki_ds.data.contents.report.Util |
9 | +import java.util.Date | |
10 | 10 | import org.apache.hadoop.fs.Path |
11 | 11 | import org.apache.spark.SparkContext |
12 | 12 | import org.apache.spark.mllib.linalg.Vectors |
... | ... | @@ -156,7 +156,7 @@ |
156 | 156 | val gghScaled = gghVer3.withColumn("gghScaled", (column("ggh") - gghMean) / gghStd).selectExpr("*", "1000 / (1 + exp(-gghScaled)) as scaledGgh").drop("gghScaled") |
157 | 157 | |
158 | 158 | gghScaled.map{x => |
159 | - s"${x(0)},${x.getAs[Double]("gghScaled").toInt}" | |
159 | + s"${x(0)},${x.getAs[Double]("scaledGgh").toInt}" | |
160 | 160 | }.saveAsTextFile(s"hdfs://pikinn/preprocess/timelineScore/content/ggh/$saveDay") |
161 | 161 | |
162 | 162 | /*//////// CTR and CTR Time 계산 |