Skip to content

Commit a0b12c0

Browse files
Update count-min-sketch.md
1 parent 6295b63 commit a0b12c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ds/prob/count-min-sketch.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ A count-min sketch is used to determine the frequency of distinct values in a st
44

55
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).
66

7-
```redis Initialize a sketch with dimensions
7+
```redis:[run_confirmation=true] Initialize a sketch with dimensions
88
CMS.INITBYDIM bikes:profits 2000 5 // initializes a count-min sketch with 2000 counters in each array and 5 counter-arrays
99
1010
```
1111

1212
You can also initialize a count-min sketch by providing an acceptable error rate and probability for inflated (over) count for your use case:
1313

1414

15-
```redis Initialize a sketch with tolerances
15+
```redis:[run_confirmation=true] Initialize a sketch with tolerances
1616
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
1717
```
1818

1919
You can increase the frequency associated with an item by a supplied increment:
2020

21-
```redis Update
21+
```redis:[run_confirmation=true] Update
2222
CMS.INCRBY bikes:profit "Smokey Mountain Striker" 100
2323
CMS.INCRBY bikes:profit "Rocky Mountain Racer" 200 "Cloudy City Cruiser" 150
2424
```

0 commit comments

Comments
 (0)