Skip to content

Create Descriptive Statistics feature - #1

Merged
N3uralN3twork merged 6 commits into
masterfrom
feature/summary-stats
Aug 2, 2026
Merged

Create Descriptive Statistics feature#1
N3uralN3twork merged 6 commits into
masterfrom
feature/summary-stats

Conversation

@N3uralN3twork

@N3uralN3twork N3uralN3twork commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Changes Made:

  1. Added generic DescriptiveStatistics with fused Welford accumulation and accessors.
  2. Added whole-array and axis-wise trait methods.
  3. Added SummaryStatisticsError.
  4. Added extensive integration tests, including NaN, empty, axis, f32, and property-based cases.
  5. Added fused-vs-repeated Criterion benchmarks for f32, f64, and axis-wise summaries.

Descriptive statistics:

Original Data Array:

let data = array![1.0, 2.0, 2.0, 3.0];
Status Check Actual Abs diff Acceptance
PASS observation count 4 - exact match
PASS mean 2.000000000000 0.000e0 <= 1.0e-12
PASS minimum 1.0 - exact match
PASS maximum 3.0 - exact match
PASS population variance 0.500000000000 0.000e0 <= 1.0e-12
PASS sample standard deviation 0.816496580928 0.000e0 <= 1.0e-12
PASS column summary shape [3] - exact match
PASS first column mean 2.500000000000 0.000e0 <= 1.0e-12
PASS first column sample variance 4.500000000000 0.000e0 <= 1.0e-12
PASS row summary shape [2] - exact match
PASS second row population standard deviation 0.816496580928 0.000e0 <= 1.0e-12

@N3uralN3twork N3uralN3twork self-assigned this Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/summary-stats
Testbedubuntu-latest

⚠️ WARNING: Truncated view!

The full continuous benchmarking report exceeds the maximum length allowed on this platform.

🚨 3 Alerts

🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/summary-stats
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
sq_l2_dist/10📈 view plot
🚷 view threshold
5.32 ns
(-30.31%)Baseline: 7.63 ns
9.92 ns
(53.61%)
sq_l2_dist/100📈 view plot
🚷 view threshold
73.63 ns
(-5.39%)Baseline: 77.83 ns
101.18 ns
(72.77%)
sq_l2_dist/1000📈 view plot
🚷 view threshold
914.87 ns
(-10.63%)Baseline: 1,023.65 ns
1,330.75 ns
(68.75%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/summary-stats
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
get_from_sorted_mut/10📈 view plot
🚷 view threshold
1,723.70 ns
(+10.10%)Baseline: 1,565.57 ns
2,035.24 ns
(84.69%)
get_from_sorted_mut/100📈 view plot
🚷 view threshold
7,791.10 ns
(+16.36%)Baseline: 6,695.50 ns
8,704.15 ns
(89.51%)
get_from_sorted_mut/1000📈 view plot
🚷 view threshold
53,025.00 ns
(+28.04%)Baseline: 41,414.33 ns
53,838.63 ns
(98.49%)
get_many_from_sorted_mut/10📈 view plot
🚷 view threshold
827.75 ns
(+6.53%)Baseline: 777.01 ns
1,010.12 ns
(81.95%)
get_many_from_sorted_mut/100📈 view plot
🚷 view threshold
4,673.20 ns
(+7.74%)Baseline: 4,337.60 ns
5,638.88 ns
(82.87%)
get_many_from_sorted_mut/1000📈 view plot
🚷 view threshold
29,454.00 ns
(+11.09%)Baseline: 26,514.00 ns
34,468.20 ns
(85.45%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/summary-stats
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
descriptive_statistics/fused/10📈 view plot
🚷 view threshold
68.86 ns
descriptive_statistics/fused/100📈 view plot
🚷 view threshold
629.68 ns
descriptive_statistics/fused/1000📈 view plot
🚷 view threshold
6,244.30 ns
descriptive_statistics/repeated/10📈 view plot
🚷 view threshold
179.99 ns
descriptive_statistics/repeated/100📈 view plot
🚷 view threshold
1,536.60 ns
descriptive_statistics/repeated/1000📈 view plot
🚷 view threshold
15,022.00 ns
descriptive_statistics_axis/fused_axis0/10📈 view plot
🚷 view threshold
614.85 ns
descriptive_statistics_axis/fused_axis0/100📈 view plot
🚷 view threshold
5,193.10 ns
descriptive_statistics_axis/fused_axis0/1000📈 view plot
🚷 view threshold
50,545.00 ns
descriptive_statistics_axis/fused_axis1/10📈 view plot
🚷 view threshold
668.40 ns
descriptive_statistics_axis/fused_axis1/100📈 view plot
🚷 view threshold
4,998.30 ns
descriptive_statistics_axis/fused_axis1/1000📈 view plot
🚷 view threshold
46,957.00 ns
descriptive_statistics_axis/repeated_axis0/10📈 view plot
🚷 view threshold
1,611.80 ns
descriptive_statistics_axis/repeated_axis0/100📈 view plot
🚷 view threshold
13,263.00 ns
descriptive_statistics_axis/repeated_axis0/1000📈 view plot
🚷 view threshold
127,110.00 ns
descriptive_statistics_axis/repeated_axis1/10📈 view plot
🚷 view threshold
1,491.30 ns
descriptive_statistics_axis/repeated_axis1/100📈 view plot
🚷 view threshold
15,216.00 ns
descriptive_statistics_axis/repeated_axis1/1000📈 view plot
🚷 view threshold
160,170.00 ns
descriptive_statistics_f32/fused/10📈 view plot
🚷 view threshold
55.71 ns
descriptive_statistics_f32/fused/100📈 view plot
🚷 view threshold
555.31 ns
descriptive_statistics_f32/fused/1000📈 view plot
🚷 view threshold
5,520.10 ns
weighted_std/10📈 view plot
🚷 view threshold
56.74 ns
(+1.13%)Baseline: 56.11 ns
72.94 ns
(77.79%)
weighted_std/100📈 view plot
🚷 view threshold
350.52 ns
(-8.32%)Baseline: 382.32 ns
497.02 ns
(70.52%)
weighted_std/1000📈 view plot
🚷 view threshold
3,179.20 ns
(-9.44%)Baseline: 3,510.47 ns
4,563.61 ns
(69.66%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/summary-stats
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
entropy/10📈 view plot
🚷 view threshold
63.98 ns
(-7.06%)Baseline: 68.84 ns
89.49 ns
(71.49%)
entropy/100📈 view plot
🚷 view threshold
496.64 ns
(-6.77%)Baseline: 532.71 ns
692.52 ns
(71.72%)
entropy/1000📈 view plot
🚷 view threshold
4,823.70 ns
(-7.85%)Baseline: 5,234.60 ns
6,804.98 ns
(70.88%)
histogram/10📈 view plot
🚷 view threshold
474.84 ns
(-12.09%)Baseline: 540.17 ns
702.22 ns
(67.62%)
histogram/100📈 view plot
🚷 view threshold
3,717.90 ns
(-19.73%)Baseline: 4,631.47 ns
6,020.91 ns
(61.75%)
histogram/1000📈 view plot
🚷 view threshold
33,943.00 ns
(-22.15%)Baseline: 43,602.67 ns
56,683.47 ns
(59.88%)
kendall_tau/10📈 view plot
🚷 view threshold
2,102.50 ns
(-5.59%)Baseline: 2,227.05 ns
2,895.16 ns
(72.62%)
kendall_tau/100📈 view plot
🚷 view threshold
26,085.00 ns
(+2.32%)Baseline: 25,493.50 ns
33,141.55 ns
(78.71%)
kendall_tau/1000📈 view plot
🚷 view threshold
267,590.00 ns
(+2.96%)Baseline: 259,895.00 ns
337,863.50 ns
(79.20%)
l1_dist/10📈 view plot
🚷 view threshold
6.87 ns
(-10.84%)Baseline: 7.70 ns
10.01 ns
(68.58%)
l1_dist/100📈 view plot
🚷 view threshold
76.13 ns
(-2.22%)Baseline: 77.86 ns
101.21 ns
(75.22%)
l1_dist/1000📈 view plot
🚷 view threshold
1,119.00 ns
(+9.40%)Baseline: 1,022.89 ns
1,329.76 ns
(84.15%)
mean/10📈 view plot
🚷 view threshold
4.52 ns
(-6.74%)Baseline: 4.85 ns
6.30 ns
(71.74%)
mean/100📈 view plot
🚷 view threshold
16.01 ns
(-6.30%)Baseline: 17.08 ns
22.21 ns
(72.07%)
mean/1000📈 view plot
🚷 view threshold
138.27 ns
(+3.48%)Baseline: 133.62 ns
173.70 ns
(79.60%)
pearson_correlation/10📈 view plot
🚷 view threshold
651.89 ns
(-3.29%)Baseline: 674.09 ns
876.32 ns
(74.39%)
pearson_correlation/100📈 view plot
🚷 view threshold
2,374.80 ns
(-4.96%)Baseline: 2,498.77 ns
3,248.40 ns
(73.11%)
pearson_correlation/1000📈 view plot
🚷 view threshold
19,358.00 ns
(-1.66%)Baseline: 19,685.33 ns
25,590.93 ns
(75.64%)
quantiles_mut/10📈 view plot
🚷 view threshold
874.57 ns
(-2.05%)Baseline: 892.89 ns
1,160.76 ns
(75.34%)
quantiles_mut/100📈 view plot
🚷 view threshold
2,144.30 ns
(+0.10%)Baseline: 2,142.13 ns
2,784.77 ns
(77.00%)
quantiles_mut/1000📈 view plot
🚷 view threshold
6,060.50 ns
(+1.42%)Baseline: 5,975.80 ns
7,768.54 ns
(78.01%)
spearman_correlation/10📈 view plot
🚷 view threshold
958.67 ns
(-0.89%)Baseline: 967.30 ns
1,257.50 ns
(76.24%)
spearman_correlation/100📈 view plot
🚷 view threshold
6,125.70 ns
(-3.10%)Baseline: 6,321.60 ns
8,218.08 ns
(74.54%)
spearman_correlation/1000📈 view plot
🚷 view threshold
51,891.00 ns
(-6.40%)Baseline: 55,442.00 ns
72,074.60 ns
(72.00%)
🐰 View full continuous benchmarking report in Bencher

@N3uralN3twork
N3uralN3twork merged commit 3cff491 into master Aug 2, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant