com.cloudera.sparkts

TimeSeries

class TimeSeries[K] extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TimeSeries
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TimeSeries(index: DateTimeIndex, data: DenseMatrix, keys: Array[K])(implicit kClassTag: ClassTag[K])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val data: DenseMatrix

  9. def differences(): TimeSeries[K]

    Returns a TimeSeries where each time series is differenced with order 1.

    Returns a TimeSeries where each time series is differenced with order 1. The new TimeSeries will be missing the first date-time.

  10. def differences(lag: Int): TimeSeries[K]

    Returns a TimeSeries where each time series is differenced with the given order.

    Returns a TimeSeries where each time series is differenced with the given order. The new TimeSeries will be missing the first n date-times.

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def head(): (K, Vector)

    Gets the first univariate series and its key.

  17. val index: DateTimeIndex

  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. implicit val kClassTag: ClassTag[K]

  20. val keys: Array[K]

  21. def lags[U >: (K, Int)](lagsPerCol: Map[K, (Boolean, Int)]): TimeSeries[(K, Int)]

    This is equivalent to lags(lagsPerCol, TimeSeries.

    This is equivalent to lags(lagsPerCol, TimeSeries.laggedPairKey _). It returns TimeSeries with a new key that is a pair of (original key, lag order).

  22. def lags[U](lagsPerCol: Map[K, (Boolean, Int)], laggedKey: (K, Int) ⇒ U)(implicit arg0: ClassTag[U]): TimeSeries[U]

    IMPORTANT: this function assumes that the DateTimeIndex is a UniformDateTimeIndex, not an Irregular one.

    IMPORTANT: this function assumes that the DateTimeIndex is a UniformDateTimeIndex, not an Irregular one.

    Lags the specified individual time series of the TimeSeries instance by up to their matching lag amount. Each time series can be indicated to either retain the original value, or drop it.

    In other words, the lagsPerCol has the following structure:

    ("variableName1" -> (keepOriginalValue, maxLag), "variableName2" -> (keepOriginalValue, maxLag), ...)

    See description of the above lags function for an example of the lagging process.

  23. def lags[U >: (K, Int)](maxLag: Int, includeOriginals: Boolean): TimeSeries[(K, Int)]

    This is equivalent to lags(maxLag, includeOriginals, TimeSeries.

    This is equivalent to lags(maxLag, includeOriginals, TimeSeries.laggedPairKey _). It returns TimeSeries with a new key that is a pair of (original key, lag order).

  24. def lags[U](maxLag: Int, includeOriginals: Boolean, laggedKey: (K, Int) ⇒ U)(implicit arg0: ClassTag[U]): TimeSeries[U]

    IMPORTANT: this function assumes that the DateTimeIndex is a UniformDateTimeIndex, not an Irregular one.

    IMPORTANT: this function assumes that the DateTimeIndex is a UniformDateTimeIndex, not an Irregular one.

    Lags all individual time series of the TimeSeries instance by up to maxLag amount. The lagged time series has its keys generated by the laggedKey function which takes two input parameters: the original key and the lag order, and should return a corresponding lagged key.

    Example input TimeSeries: time a b 4 pm 1 6 5 pm 2 7 6 pm 3 8 7 pm 4 9 8 pm 5 10

    With maxLag 2, includeOriginals = true and TimeSeries.laggedStringKey, we would get: time a lag1(a) lag2(a) b lag1(b) lag2(b) 6 pm 3 2 1 8 7 6 7 pm 4 3 2 9 8 7 8 pm 5 4 3 10 9 8

  25. def mapSeries(newIndex: DateTimeIndex, f: (Vector) ⇒ Vector): TimeSeries[K]

    Applies a transformation to each series such that the resulting series align with the given time index.

  26. def mapSeries(f: (Vector) ⇒ Vector): TimeSeries[K]

    Applies a transformation to each series that preserves the time index.

  27. def mapSeriesWithKey(f: (K, Vector) ⇒ Vector): TimeSeries[K]

    Applies a transformation to each series that preserves the time index.

    Applies a transformation to each series that preserves the time index. Passes the key along with each series.

  28. def mapValues[U](f: (Vector) ⇒ U): Seq[(K, U)]

  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. def price2ret(): TimeSeries[K]

    Returns a return series for each time series.

    Returns a return series for each time series. Assumes periodic (as opposed to continuously compounded) returns.

  33. def quotients(): TimeSeries[K]

    Returns a TimeSeries where each time series is quotiented with order 1.

    Returns a TimeSeries where each time series is quotiented with order 1. The new TimeSeries will be missing the first date-time.

  34. def quotients(lag: Int): TimeSeries[K]

    Returns a TimeSeries where each time series is quotiented with the given order.

    Returns a TimeSeries where each time series is quotiented with the given order. The new TimeSeries will be missing the first n date-times.

  35. def slice(range: Range): TimeSeries[K]

  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toInstants(): IndexedSeq[(ZonedDateTime, Vector)]

  38. def toString(): String

    Definition Classes
    AnyRef → Any
  39. def union(vec: Vector, key: K): TimeSeries[K]

  40. def univariateKeyAndSeriesIterator(): Iterator[(K, Vector)]

  41. def univariateSeriesIterator(): Iterator[Vector]

  42. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped