Count sketch

Count sketch is a type of dimensionality reduction that is particularly efficient in statistics, machine learning and algorithms.[1][2] It was invented by Moses Charikar, Kevin Chen and Martin Farach-Colton[3] in an effort to speed up the AMS Sketch by Alon, Matias and Szegedy for approximating the frequency moments of streams[4] (these calculations require counting of the number of occurrences for the distinct elements of the stream).

The sketch is nearly identical[citation needed] to the Feature hashing algorithm by John Moody,[5] but differs in its use of hash functions with low dependence, which makes it more practical. In order to still have a high probability of success, the median trick is used to aggregate multiple count sketches, rather than the mean.

These properties allow use for explicit kernel methods, bilinear pooling in neural networks and is a cornerstone in many numerical linear algebra algorithms.[6]

Intuitive explanation

The inventors of this data structure offer the following iterative explanation of its operation:[3]

  • at the simplest level, the output of a single hash function s mapping stream elements q into {+1, -1} is feeding a single up/down counter C. After a single pass over the data, the frequency of a stream element q can be approximated, although extremely poorly, by the expected value ;
  • a straightforward way to improve the variance of the previous estimate is to use an array of different hash functions , each connected to its own counter . For each element q, the still holds, so averaging across the i range will tighten the approximation;
  • the previous construct still has a major deficiency: if a lower-frequency-but-still-important output element a exhibits a hash collision with a high-frequency element, estimate can be significantly affected. Avoiding this requires reducing the frequency of collision counter updates between any two distinct elements. This is achieved by replacing each in the previous construct with an array of m counters (making the counter set into a two-dimensional matrix ), with index j of a particular counter to be incremented/decremented selected via another set of hash functions that map element q into the range {1..m}. Since , averaging across all values of i will work.

Mathematical definition

1. For constants and (to be defined later) independently choose random hash functions and such that and . It is necessary that the hash families from which and are chosen be pairwise independent.

2. For each item in the stream, add to the th bucket of the th hash.

At the end of this process, one has sums where

To estimate the count of s one computes the following value:

The values are unbiased estimates of how many times has appeared in the stream.

The estimate has variance , where is the length of the stream and is .[7]

Furthermore, is guaranteed to never be more than off from the true value, with probability .

Vector formulation

Alternatively Count-Sketch can be seen as a linear mapping with a non-linear reconstruction function. Let , be a collection of matrices, defined by

for and 0 everywhere else.

Then a vector is sketched by . To reconstruct we take . This gives the same guarantees as stated above, if we take and .

Relation to Tensor sketch

The count sketch projection of the outer product of two vectors is equivalent to the convolution of two component count sketches.

The count sketch computes a vector convolution

, where and are independent count sketch matrices.

Pham and Pagh[8] show that this equals – a count sketch of the outer product of vectors, where denotes Kronecker product.

The fast Fourier transform can be used to do fast convolution of count sketches. By using the face-splitting product[9][10][11] such structures can be computed much faster than normal matrices.

See also

References

  1. ^ Faisal M. Algashaam; Kien Nguyen; Mohamed Alkanhal; Vinod Chandran; Wageeh Boles. "Multispectral Periocular Classification WithMultimodal Compact Multi-Linear Pooling" [1]. IEEE Access, Vol. 5. 2017.
  2. ^ Ahle, Thomas; Knudsen, Jakob (2019-09-03). "Almost Optimal Tensor Sketch". ResearchGate. Retrieved 2020-07-11.
  3. ^ a b Charikar, Chen & Farach-Colton 2004.
  4. ^ Alon, Noga, Yossi Matias, and Mario Szegedy. "The space complexity of approximating the frequency moments." Journal of Computer and system sciences 58.1 (1999): 137-147.
  5. ^ Moody, John. "Fast learning in multi-resolution hierarchies." Advances in neural information processing systems. 1989.
  6. ^ Woodruff, David P. "Sketching as a Tool for Numerical Linear Algebra." Theoretical Computer Science 10.1-2 (2014): 1–157.
  7. ^ Larsen, Kasper Green, Rasmus Pagh, and Jakub Tětek. "CountSketches, Feature Hashing and the Median of Three." International Conference on Machine Learning. PMLR, 2021.
  8. ^ Ninh, Pham; Pagh, Rasmus (2013). Fast and scalable polynomial kernels via explicit feature maps. SIGKDD international conference on Knowledge discovery and data mining. Association for Computing Machinery. doi:10.1145/2487575.2487591.
  9. ^ Slyusar, V. I. (1998). "End products in matrices in radar applications" (PDF). Radioelectronics and Communications Systems. 41 (3): 50–53.
  10. ^ Slyusar, V. I. (1997-05-20). "Analytical model of the digital antenna array on a basis of face-splitting matrix products" (PDF). Proc. ICATT-97, Kyiv: 108–109.
  11. ^ Slyusar, V. I. (March 13, 1998). "A Family of Face Products of Matrices and its Properties" (PDF). Cybernetics and Systems Analysis C/C of Kibernetika I Sistemnyi Analiz.- 1999. 35 (3): 379–384. doi:10.1007/BF02733426. S2CID 119661450.

Further reading

Read other articles:

Wojciech Witold JaruzelskiWojciech Jaruzelski pada 1968. Presiden Republik Polandia Presiden Republik III pertamaMasa jabatan31 Desember 1989 – 21 Desember 1990Perdana MenteriTadeusz Mazowiecki Pendahulu(Presiden Republik Rakyat Polandia)PenggantiLech WałęsaPresiden Republik Rakyat PolandiaMasa jabatan19 Juli 1989 – 31 Desember 1989Perdana MenteriMieczysław Rakowski, Czesław Kiszczak, Tadeusz Mazowiecki PendahuluDewan NegaraPengganti(Terbentuk Presiden Republik Polan...

 

Pusat kota Kotka Kotka merupakan sebuah kota di Finlandia. Kota ini letaknya di Finlandia bagian selatan. Tepatnya di provinsi Finlandia Selatan. Pada tahun 2009, kota ini memiliki jumlah penduduk sebesar 54.745 jiwa dan memiliki luas wilayah 949,75 km². Kota ini memiliki angka kepadatan penduduk sebesar 201,79 jiwa/km². Pranala luar Media terkait Kotka di Wikimedia Commons Situs resmi Diarsipkan 2013-12-31 di Wayback Machine. Map of Kotka Wikivoyage memiliki panduan wisata Kotka. Arti...

 

Australia terbagi menjadi 9 zona waktu, yaitu:[1] Waktu Standar McDonald, yang mencakup wilayah Pulau Heard dan Kepulauan McDonald. (UTC+05:00). Waktu Standar Cocos, yang mencakup wilayah Kepulauan Cocos dan sekitarnya. (UTC+06:30). Waktu Standar Natal, yang mencakup wilayah Pulau Natal dan sekitarnya. (UTC+07:00). Waktu Australia Barat, yang mencakup wilayah Australia Barat dan sekitarnya. (UTC+08:00). Waktu Australia Barat Tengah, yang mencakup wilayah perbatasan Australia Barat den...

BillboardSampul majalah Billboard (26 Januari 2013).KategoriMajalah musikFrekuensiper pekanSirkulasi16.327Pendiri William H. Donaldson James Hennegan Terbitan pertama1 November 1894; 129 tahun lalu (1894-11-01)PerusahaanPrometheus Global MediaNegaraAmerika SerikatBerpusat diNew York City, New YorkSitus webbillboard.comISSN0006-2510 Billboard (ditulis billboard) adalah majalah musik Amerika, bermarkas di New York City, New York dan dimiliki oleh Prometheus Global Media. Majalah Billboard ...

 

1931 film The Emperor's SweetheartDirected byHans TintnerWritten byEmil Guttmann Hans TintnerBased onThe Emperor's Sweetheart by Max Blau, Ernst Decsey and Alfred Steinberg-FrankProduced byRobert Leistenschneider Helmut SchreiberStarringLiane Haid Walter Janssen Wilhelm BendowCinematographyWilly WintersteinMusic byEmil BertéProductioncompanyAtlantis-FilmDistributed byDeutsche FoxRelease date12 January 1931Running time82 minutesCountryGermanyLanguageGerman The Emperor's Sweetheart (German: Ka...

 

Croatian table tennis player Dragutin ŠurbekPersonal informationBorn(1946-08-08)8 August 1946Zagreb, SR Croatia, YugoslaviaDied15 July 2018(2018-07-15) (aged 71) Medal record Men's table tennis Representing  Yugoslavia World Championships 1979 Pyongyang Doubles 1983 Tokyo Doubles 1975 Calcutta Doubles 1975 Calcutta Team 1969 Munich Team 1971 Nagoya Singles 1971 Nagoya Team 1973 Sarajevo Singles 1973 Sarajevo Doubles 1977 Birmingham Doubles 1981 Novi Sad Singles 1981 Novi Sad Double...

Kotofurunushi (琴古主) dari buku Gazu Hyakki Tsurezure Bukuro (百器徒然袋) Koto-furunushi (bahasa Jepang Kanji: 琴古主, Hiragana: ことふるぬし)[1] adalah salah satu yokai dalam cerita rakyat Jepang. Koto-furunushi termasuk dalam kategori yokai tsukumogami, yang mana wujudnya diambil dari koto (alat musik tradisional Jepang seperti harpa) yang berubah menjadi binatang buas.[2] Dalam gulungan bergambar karya Toriyama Sekien, ia digambarkan beriringan dengan Biwa...

 

Ne doit pas être confondu avec intersexuation. Hermaphrodite endormi, musée du Louvre. L'hermaphrodisme est un phénomène biologique dans lequel l'individu présente à la fois des organes mâles et femelles, soit simultanément soit alternativement (hermaphrodisme successif). Ce concept est à la fois utilisé en botanique et en zoologie. Le langage courant emploie ce terme pour désigner tous les cas ambigus du développement sexuel mais, dans une acception scientifique, seuls les indiv...

 

† Человек прямоходящий Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:ВторичноротыеТип:ХордовыеПодтип:ПозвоночныеИнфратип:ЧелюстноротыеНадкласс:ЧетвероногиеКлада:АмниотыКлада:Синапсиды�...

Dewan Rakyat Kanada Chambre des communes du CanadaParlemen Ke 44JenisJenisMajelis Rendah dalam Parlemen Kanada PimpinanKetuaAnthony Rota, Partai Liberal Kanada sejak 5 Desember 2019 Perdana MenteriJustin Trudeau, Partai Liberal Kanada sejak 4 November 2015 Pemimpin Pemerintah di DewanMark Holland, Partai Liberal Kanada sejak 26 Oktober 2021 Pemimpin OposisiCandice Bergen, Partai Konservatif Kanada sejak 2 Februari 2022 Pemimpin Oposisi di DewanJohn Brassard, Partai Konserv...

 

Beauty pageant edition This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Miss World 2007 – news · newspapers · books · scholar · JSTOR (December 2015) (Learn how and when to remove this message) Miss World 2007Miss World 2007 Zhang ZilinDate1 December 2007PresentersAngela ChowFernando AllendeEntertainmentDunca...

 

Castle ParkWestern part of Castle Park, with ruined St Peter's Church, garden and square in centre and Bristol Bridge in top leftCastle Park Castle Park shown within BristolOS gridST592731Coordinates51°27′21″N 2°35′17″W / 51.4558°N 2.5881°W / 51.4558; -2.5881Created1977Operated byBristol City Council Castle Park (sometimes referred to as Castle Green) is a public open space in Bristol, England, managed by Bristol City Council. It is bounded by th...

此条目序言章节没有充分总结全文内容要点。 (2019年3月21日)请考虑扩充序言,清晰概述条目所有重點。请在条目的讨论页讨论此问题。 哈萨克斯坦總統哈薩克總統旗現任Қасым-Жомарт Кемелұлы Тоқаев卡瑟姆若马尔特·托卡耶夫自2019年3月20日在任任期7年首任努尔苏丹·纳扎尔巴耶夫设立1990年4月24日(哈薩克蘇維埃社會主義共和國總統) 哈萨克斯坦 哈萨克斯坦政府...

 

District of the New York State Senate New York's 20thState Senate districtSenator  Zellnor MyrieD–Prospect Lefferts Gardens Registration77.9% Democratic4.4% Republican15.0% No party preferenceDemographics18% White50% Black20% Hispanic10% AsianPopulation (2017)318,142[1]Registered voters203,529[2] New York's 20th State Senate district is one of 63 districts in the New York State Senate. It has been represented by Democrat Zelln...

 

Bulgarian Republic Football ChampionshipBulgarian Republic Football Championship trophySportFootballFounded1945Ceased1948No. of teams16–24Country BulgariaMost titlesLevski Sofia(2 titles)RelatedcompetitionsState ChampionshipBulgarian A Football Group The Republic Football Championship was a national football competition in Bulgaria, successor of the State Championship. It was organised for only four years between 1945 and 1948. After 1948 it was reorganised as a Republic Football Group. ...

This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Nawabganj, North 24 Parganas – news · newspapers · books · scholar · JSTOR (June 2018) (Learn how and when to remove this message) This article possibly contains original research. Please improve it by verifying the claims made and adding inline citations. Statements consisting ...

 

William A. Harris William Alexander Harris, född 29 oktober 1841 nära Luray, Virginia, död 20 december 1909 i Chicago, Illinois, var en amerikansk politiker (populist). Han representerade delstaten Kansas i båda kamrarna av USA:s kongress, först i representanthuset 1893–1895 och sedan i senaten 1897–1903. Harris studerade vid Columbian College (numera George Washington University) och Virginia Military Institute. Han deltog i amerikanska inbördeskriget i Amerikas konfedererade state...

 

Cycling race 2009 Eneco Tour2009 UCI World Ranking, race 21 of 24Race detailsDates18—25 August 2009Stages7+PrologueDistance1,128.1 km (701.0 mi)Winning time26h 49' 40Results Winner  Edvald Boasson Hagen (NOR) (Team Columbia–HTC)  Second  Sylvain Chavanel (FRA) (Quick-Step)  Third  Sebastian Langeveld (NED) (Rabobank) Points  Edvald Boasson Hagen (NOR) (Team Columbia–HTC)  Team Rabobank ← 2008 2010 ͛...

Biblical prophetess, traditional author of the Song of Hannah, mother of Samuel This article is about Hannah in the Book of Samuel. For the figure in the Gospel of Luke, see Anna the Prophetess. For the Jewish martyr in the Books of the Maccabees, see Woman with seven sons. HannahSamuel Dedicated by Hannah at the Temple by Frank W.W. TophamProphetessVenerated inJudaismChristianityMajor shrineTomb of Samuel, IsraelFeastDecember 9 (Eastern Orthodox Church)AttributesOften depicted as an inf...

 

San Marco dei CavotiKomuneComune di San Marco dei CavotiLokasi San Marco dei Cavoti di Provinsi BeneventoNegaraItaliaWilayah CampaniaProvinsiBenevento (BN)Luas[1] • Total49,19 km2 (18,99 sq mi)Ketinggian[2]695 m (2,280 ft)Populasi (2016)[3] • Total3.544 • Kepadatan72/km2 (190/sq mi)Zona waktuUTC+1 (CET) • Musim panas (DST)UTC+2 (CEST)Kode pos82029Kode area telepon0824Situs webhttp://www....