Home > Back-end >  && [c] data mining order table to realize how to use data structure space saving algorithm!!!!!!!!!!
&& [c] data mining order table to realize how to use data structure space saving algorithm!!!!!!!!!!

Time:09-16

Algorithm requirements:

A given error rate epsilon ∈ (0, phi), the algorithm set m a counter, and m=1/epsilon, the content of each counter for (e, f, d),
E is a data item, approximate frequency f, e, d for approximate frequency f and the biggest difference between the real frequency f value, namely the error,

For each element in data stream S e according to the following process record each data item frequency,
If the current counter in e, f value of the counter to add 1;
If there is no e in current counter counter, but the current counter number is less than m, the new counter, make its value (e, 1, 0);
If there is no e in current counter counter, and the current counter number is m, and then find the f value is the smallest counter and set the counter to record the information for (em, FM, dm) will be changed to record the current data item e, to counter the values for (e, FM + 1, FM), FM and dm is the counter the original records of corresponding approximate frequency and the error of data items,

When the user's queries to meet phi frequent items, the output of counter records meet f & gt; Phi N all data items,
  • Related