Giter Site home page Giter Site logo

fieldeng-scythe's Introduction

fieldeng-scythe

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

Interpolation

val rs = new LinearInterpolation.interpolateDate(sig1Raw, sig2Raw)

alt tag

Start Spark shell with dependencies

spark-shell --jars target/scythe-0.0.1-SNAPSHOT.jar

Load Sample data from CSV

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

Interpolate one tag against the other

import com.hortonworks.scythe.cronus.Helper
val ch = Helper
val map = ch.interpolate ("mpg1", List("mpg1", "mpg2"), "function", ds)

Interpolate values for tag "ss" to align to "ps"

val map = ch.interpolate (
  "ps", List("ps", "ss"), 
  "tagName", "yyyy-MM-dd HH:mm", df
)
    
map.values.foreach { println }

Downsample a signal

val hourlyResampled = new Sample().downSample("H", "AVG", df).select("avg(value)").collect

Pattern Matching

95% precision

val rs = new PatternMatching.findPattern(.05, p, s)

fieldeng-scythe's People

Contributors

randerzander avatar kirkhas avatar

Watchers

James Cloos avatar  avatar

Forkers

apsaltis pm-hwks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.