




























































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































































Continuous Numerous Flows that can Turn into a Torrent: Complex Event Processing (EPL)
Final Forward Transfer.............................................................................................................. 84 Strategies........................................................................................................................................ 84 Neural Networks 101..................................................................................................................... 88 Streaming Machine Learning vs Continual Learning.................................................................... 88 Different Settings...................................................................................................................... 88 What Type of Drift they can Handle......................................................................................... 88 Different Goals.......................................................................................................................... 89 Different Evaluations................................................................................................................ 89 Online CL.................................................................................................................................. 89 Answers to questions.......................................................................................................................... 90 Breadth of Streaming Data Engineering........................................................................................ 90 Which are the four approaches to tame velocity? List them all before comparing and contrasting two of them............................................................................................................. 90 Which are the three time-models we introduced? List them all before comparing and contrasting two of them............................................................................................................. 90 What are the basic types of windows? List them all and describe the behavior of at least two of them...................................................................................................................................... 90 What is a context, and how does it relate to interval-based time model? Give an example that supports your explanation......................................................................................................... 91 !!! Why do we say that a Complex Event Processor can tame the torrent effect? Support your claim with an example.............................................................................................................. 91 What are latency/throughput? Given an example of both in the same domain........................ 92 Is there an exact incremental algorithm for computing average, median and distinct? Why?. 92 !!! Describe the Kafka components at a conceptual, system, and physical level. Illustrate them using an example....................................................................................................................... 92 !!! Illustrate the programming model of Spark Structured Streaming at the logical and physical level. Illustrate them using an example...................................................................... 93 How does Spark Structured Stream treat late arrivals in windowed aggregation? Illustrate it using an example....................................................................................................................... 93 Depth of Streaming Data Engineering........................................................................................... 94 What’s the difference between the stream-only and the absolute time models? Explain it, proposing examples of queries that can be answered in both models and queries that can be answered only with the absolute time model............................................................................ 94 What’s the difference between the absolute and the interval-based time models? Explain it, proposing examples of queries that can be answered in both models and queries that can be answered only with the interval-based time model................................................................... 94 What are streams and events? How do they relate to each other? Give an example................ 94 !!! What is a tumbling logical window? Give an example at the conceptual level and show that you know both EPL’s and Spark Structured Streaming’s syntax....................................... 94 !!! What is a hopping logical window? Give an example at the conceptual level and show that you know both EPL’s and Spark Structured Streaming’s syntax.............................................. 95 What is the role of the output clause in EPL? Does it exist in Spark Structured Streaming? Give an example that supports your explanation...................................................................... 95 What’s the role of the followed by operator (->) in EPL? Is it possible to implement it in Spark Structured Streaming? Give an example that supports your explanation....................... 95 Explain stream to stream joins. Given an example in EPL or Spark Structured Streaming that illustrates the different results you obtain using an inner and a left outer join......................... 96 Explain stream to table joins. Given an example in EPL or Spark Structured Streaming that illustrates the different results you obtain using an inner and a left outer join......................... 97 What makes Kafka scale horizontally? Explain it using an example....................................... 97 What’s the role of a topic in Kafka? How does it relate to partitions and brokers? Explain it using an example....................................................................................................................... 98
!!! Which are the typical Streaming Machine Learning algorithms for classification? Illustrate one of them in detail................................................................................................................ 113 !!! What are the key factors to consider when building an SML Ensemble Classification model?..................................................................................................................................... 114 How does SML regression compare to time series forecasting w.r.t. types of input features, training, forecasting horizon, and adaptability?...................................................................... 115 Depth of Streaming Machine Learning........................................................................................ 116 !!! Which are the drift detectors that monitor the error rate? Illustrate how one of them works. ................................................................................................................................................. 116 !!! Which are the data drift detectors? Illustrate how one of them works............................... 117 How does ADWIN detect a concept drift? Illustrate it with an example................................ 118 How does the SML version of KNN work? Illustrate it with an example.............................. 118 !!! How does the SML version of Naïve Bayes work? Illustrate it with an example............. 118 How does the Hoeffding Tree work? Illustrate it with an example........................................ 119 How does the Hoeffding Adaptive Tree work? Illustrate it with an example......................... 119 What is Hoeffding Bound? How and why is it used in SML to build a decision tree?........... 119 !!! Why is the Poisson distribution used in SML ensemble methods? What’s the impact of the value of lambda? Illustrate how lambda is used in the SML methods.................................... 120 Breadth and Depth of Continual Learning................................................................................... 120 What’s the stability-plasticity dilemma? Illustrate your explanation with a narrative example and discuss the different learning abilities that a CL solution should have............................ 120 What are the main differences between Streaming Machine Learning and Continual Learning? Discuss them w.r.t to the setting, the goals, and the evaluation process................................. 121 What are the main differences between Streaming Machine Learning and Continual Learning w.r.t. the concept drifts they manage? Discuss also which cases require avoiding forgetting and which do not..................................................................................................................... 122 What are the three main scenarios in Continual Learning? Describe each of them briefly.... 123 !!! How do CL replay strategies work? Explain one specific strategy in detail. What are the other two categories of CL strategies? Briefly explain them.................................................. 124 !!! How do CL regularization strategies work? Explain one specific strategy in detail. What are the other two categories of CL strategies? Briefly explain them...................................... 125 !!! How do CL architectural strategies work? Explain one specific strategy in detail. What are the other two categories of CL strategies? Briefly explain them............................................ 126 !!! Which are the primary evaluation metrics used in Continual Learning? Illustrate what they measure and why they are all useful to assess the properties of a method............................. 128 Exercises........................................................................................................................................... 128 EPL.............................................................................................................................................. 128 Basics...................................................................................................................................... 128 SQL style queries.................................................................................................................... 129 Event Based style queries....................................................................................................... 129 Grouping and average operator............................................................................................... 129 Logical Tumbling Window..................................................................................................... 129 Physical Tumbling Window.................................................................................................... 129 Logical Sliding Window......................................................................................................... 129 Physical Sliding Window........................................................................................................ 129 Average over a window........................................................................................................... 130 Output clause........................................................................................................................... 130 Pattern Matching..................................................................................................................... 131 Every....................................................................................................................................... 132 Pattern Guards......................................................................................................................... 133 Example on IBM stock market............................................................................................... 134 Creating a table from an unbounded stream........................................................................... 134
4 types of velocity/streams in streaming data engineering:
You only know the order of arrival of events. You cannot measure the time between events, but only know if something happened before or after another event. Events can be forgotten so answers can change over time.
We know when (what time) an event arrives. This helps to know not only if something happened before another, but how much time passed between two events.
Here we also know how much an event is long, and so if one or more event overlaps or get the events that last more or less than a certain amount of time.
CEP systems allow to define rules to generate composite events from primitive ones (raise if ).
Store events so that a service writes once and clients can read many times asynchronously.
from TemperatureSensorEvent where temperature > 50;
select sensor, avg(temperature) from TemperatureSensorEvent group by sensor; You evaluate data by only saving what matters and so you can delete old data. In the case of the average you save the number of events seen so far and the previous average so you can compute the new one just by saving two values in memory.
They instruct the engine how long to retain relevant events or under what conditions events can be discarded. In EPL the possible window types are:
output [all | first | last | snapshot] every output_rate [seconds | events] It is used to create logical hopping windows. Here is an explanation of the keywords: