Time Series Library
Time | TagName | Value |
---|---|---|
12:00 | signal1 | 0 |
12:01 | signal1 | 0.5 |
12:02 | signal1 | 1 |
12:03 | signal1 | 0.5 |
12:04 | signal1 | 1 |
val rs = new LinearInterpolation.interpolateDate(sig1Raw, sig2Raw)
spark-shell --jars target/scythe-0.0.1-SNAPSHOT.jar
import spark.implicits._
import spark.sqlContext._
val df = spark.read.format("com.databricks.spark.csv")
.option("header", "true")
.option("delimiter", ",")
.option("inferSchema", "true")
.load("src/test/resources/example.csv")
df.printSchema
df.show
import com.hortonworks.scythe.cronus.Helper
val ch = Helper
val map = ch.interpolate ("mpg1", List("mpg1", "mpg2"), "function", ds)
val map = ch.interpolate (
"ps", List("ps", "ss"),
"tagName", "yyyy-MM-dd HH:mm", df
)
map.values.foreach { println }
val hourlyResampled = new Sample().downSample("H", "AVG", df).select("avg(value)").collect
95% precision
val rs = new PatternMatching.findPattern(.05, p, s)