the-algorithm/timelines/data_processing/ml_util/aggregation_framework/metrics/TimedValue.scala
twitter-team 197bf2c563 Open-sourcing Timelines Aggregation Framework
Open sourcing Aggregation Framework, a config-driven Summingbird based framework for generating real-time and batch aggregate features to be consumed by ML models.
2023-04-28 14:17:02 -05:00

15 lines
516 B
Scala

package com.twitter.timelines.data_processing.ml_util.aggregation_framework.metrics
import com.twitter.util.Time
/**
* Case class wrapping a (value, timestamp) tuple.
* All aggregate metrics must operate over this class
* to ensure we can implement decay and half lives for them.
* This is translated to an algebird DecayedValue under the hood.
*
* @param value Value being wrapped
* @param timestamp Time after epoch at which value is being measured
*/
case class TimedValue[T](value: T, timestamp: Time)