Database Reference
In-Depth Information
public
MedianEstimator(
double
rate) {
this
.rate = rate;
}
public double
update(
double
value) {
if
(current == Double.
POSITIVE_INFINITY
)
current = value;
if
(current == value)
return
current;
current = current + (current < value ? rate :
-rate);
return
current;
}
}
This technique is used in later chapters to learn more interesting quantities,
such as the parameters for predictive classifiers.
Delivering Time-Series Data
Chapter 7 discusses, in depth, moving data from a back-end system to a
web-based client for rendering. Moving time-series data is no different,
especially if the back end supports some sort of publish-subscribe
mechanism.Whenthetime-seriesaggregatoremitsvalues,itcaneitheremit
them directly to a channel or, more commonly, update the back-end store
and send a notification to the back-end channel.