You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ds/prob/count-min-sketch.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,21 @@ A count-min sketch is used to determine the frequency of distinct values in a st
4
4
5
5
You can initialize the count-min sketch and specify a width (the number of counters in each array) and depth (the number of counter-arrays).
6
6
7
-
```redis Initialize a sketch with dimensions
7
+
```redis:[run_confirmation=true] Initialize a sketch with dimensions
8
8
CMS.INITBYDIM bikes:profits 2000 5 // initializes a count-min sketch with 2000 counters in each array and 5 counter-arrays
9
9
10
10
```
11
11
12
12
You can also initialize a count-min sketch by providing an acceptable error rate and probability for inflated (over) count for your use case:
13
13
14
14
15
-
```redis Initialize a sketch with tolerances
15
+
```redis:[run_confirmation=true] Initialize a sketch with tolerances
16
16
CMS.INITBYPROB bikes:profits 0.001 0.01 // initializes the count-min sketch with 0.1% estimation of error and 1% desired probability for inflated count
17
17
```
18
18
19
19
You can increase the frequency associated with an item by a supplied increment:
0 commit comments