Wolfram Language

Extended Probability & Statistics

Improved Performance of Data Binning

Compare timings for data binning. The following charts show the speed comparisons for different sample sizes and bin specifications. Experiments were performed on a Windows 10 system with an Intel Xeon Processor E3-1245 v2 3.40 GHz. The number at the bottom shows how much faster Version 11 is than Version 10.

One-dimensional nonuniform bins.

show complete Wolfram Language input
In[1]:=
Click for copyable input
SeedRandom[1]; rlist = Sort[RandomReal[1, 100]]; Table[ BlockRandom[SeedRandom["MarketingExample"]; data = RandomReal[1, n]]; Mean[Table[First[AbsoluteTiming[BinCounts[data, {rlist}];]], {5}]] , {n, {100, 10000, 1000000}}]
Out[139]=

Two-dimensional nonuniform bins.

show complete Wolfram Language input
In[2]:=
Click for copyable input
SeedRandom[1]; rlist1 = Sort[RandomReal[1, 100]]; rlist2 = Sort[RandomReal[1, 100]]; Table[ BlockRandom[SeedRandom["MarketingExample"]; data = RandomReal[1, {n, 2}]]; Mean[Table[ First[AbsoluteTiming[BinCounts[data, {rlist1}, {rlist2}];]], {5}]] , {n, {100, 10000, 1000000}}]
Out[141]=

One-dimensional uniform bins.

show complete Wolfram Language input
In[3]:=
Click for copyable input
Table[ BlockRandom[SeedRandom["MarketingExample"]; data = RandomReal[1, n]]; Mean[Table[First[AbsoluteTiming[BinCounts[data, {0, 1, 0.1}];]], {5}]] , {n, {10000, 100000, 1000000}}]
Out[143]=

Two-dimensional uniform bins.

show complete Wolfram Language input
In[4]:=
Click for copyable input
Table[ BlockRandom[SeedRandom["MarketingExample"]; data = RandomReal[1, {n, 2}]]; Mean[Table[ First[AbsoluteTiming[ BinCounts[data, {0, 1, 0.1}, {0, 1, 0.1}];]], {5}]] , {n, {10000, 100000, 1000000}}]
Out[145]=

Related Examples

de es fr ja ko pt-br ru zh