Skip to content

feat: Missing data and infinity policies - #2

Merged
N3uralN3twork merged 2 commits into
masterfrom
feature/missing-data-policy
Aug 3, 2026
Merged

feat: Missing data and infinity policies#2
N3uralN3twork merged 2 commits into
masterfrom
feature/missing-data-policy

Conversation

@N3uralN3twork

Copy link
Copy Markdown
Owner

Changes Made:

Implemented the initial missing-data policy surface.

  • Added MissingDataPolicy (Propagate, Omit, Reject) and InfinityPolicy (Propagate, Reject) in policies.rs
  • Added policy-aware global and axis descriptive summaries in summary_statistics/mod.rs
  • Added typed non-finite errors in errors.rs

Usage:

let summary = data
    .descriptive_statistics_with_policy(NumericPolicy::omit_missing())?;

Policy semantics:

  • Finite values: accepted; no clipping or imputation.
  • NaN: propagated, omitted, or rejected explicitly.
  • +∞/-∞: propagated or rejected; never silently omitted.
  • Empty-after-omission inputs return EmptyInput.

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

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/missing-data-policy
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.31 ns
(-19.12%)Baseline: 6.57 ns
8.54 ns
(62.21%)
sq_l2_dist/100📈 view plot
🚷 view threshold
73.78 ns
(-3.35%)Baseline: 76.34 ns
99.24 ns
(74.35%)
sq_l2_dist/1000📈 view plot
🚷 view threshold
915.00 ns
(-10.31%)Baseline: 1,020.18 ns
1,326.23 ns
(68.99%)
🐰 View full continuous benchmarking report in Bencher

@N3uralN3twork N3uralN3twork added the enhancement New feature or request label Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/missing-data-policy
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,488.70 ns
(-3.71%)Baseline: 1,546.10 ns
2,009.93 ns
(74.07%)
get_from_sorted_mut/100📈 view plot
🚷 view threshold
6,483.70 ns
(-2.11%)Baseline: 6,623.22 ns
8,610.19 ns
(75.30%)
get_from_sorted_mut/1000📈 view plot
🚷 view threshold
42,314.00 ns
(+1.26%)Baseline: 41,786.40 ns
54,322.32 ns
(77.89%)
get_many_from_sorted_mut/10📈 view plot
🚷 view threshold
747.82 ns
(-2.50%)Baseline: 766.96 ns
997.05 ns
(75.00%)
get_many_from_sorted_mut/100📈 view plot
🚷 view threshold
4,114.90 ns
(-3.25%)Baseline: 4,253.18 ns
5,529.13 ns
(74.42%)
get_many_from_sorted_mut/1000📈 view plot
🚷 view threshold
25,050.00 ns
(-3.38%)Baseline: 25,926.80 ns
33,704.84 ns
(74.32%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/missing-data-policy
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
86.68 ns
(+16.85%)Baseline: 74.19 ns
96.44 ns
(89.88%)
descriptive_statistics/fused/100📈 view plot
🚷 view threshold
650.01 ns
(+2.37%)Baseline: 634.94 ns
825.42 ns
(78.75%)
descriptive_statistics/fused/1000📈 view plot
🚷 view threshold
6,269.60 ns
(+0.29%)Baseline: 6,251.60 ns
8,127.08 ns
(77.14%)
descriptive_statistics/policy/10📈 view plot
🚷 view threshold
59.31 ns
descriptive_statistics/policy/100📈 view plot
🚷 view threshold
623.21 ns
descriptive_statistics/policy/1000📈 view plot
🚷 view threshold
6,235.10 ns
descriptive_statistics/repeated/10📈 view plot
🚷 view threshold
180.26 ns
(+0.10%)Baseline: 180.09 ns
234.11 ns
(77.00%)
descriptive_statistics/repeated/100📈 view plot
🚷 view threshold
1,533.40 ns
(-0.24%)Baseline: 1,537.10 ns
1,998.23 ns
(76.74%)
descriptive_statistics/repeated/1000📈 view plot
🚷 view threshold
15,121.00 ns
(-1.08%)Baseline: 15,286.00 ns
19,871.80 ns
(76.09%)
descriptive_statistics_axis/fused_axis0/10📈 view plot
🚷 view threshold
714.88 ns
(+11.56%)Baseline: 640.81 ns
833.05 ns
(85.82%)
descriptive_statistics_axis/fused_axis0/100📈 view plot
🚷 view threshold
5,249.70 ns
(+1.47%)Baseline: 5,173.85 ns
6,726.01 ns
(78.05%)
descriptive_statistics_axis/fused_axis0/1000📈 view plot
🚷 view threshold
50,205.00 ns
(-0.33%)Baseline: 50,369.00 ns
65,479.70 ns
(76.67%)
descriptive_statistics_axis/fused_axis1/10📈 view plot
🚷 view threshold
778.55 ns
(+12.90%)Baseline: 689.60 ns
896.47 ns
(86.85%)
descriptive_statistics_axis/fused_axis1/100📈 view plot
🚷 view threshold
6,482.50 ns
(+21.91%)Baseline: 5,317.60 ns
6,912.88 ns
(93.77%)
descriptive_statistics_axis/fused_axis1/1000📈 view plot
🚷 view threshold
71,256.00 ns
(+29.01%)Baseline: 55,235.00 ns
71,805.50 ns
(99.23%)
descriptive_statistics_axis/policy_axis0/10📈 view plot
🚷 view threshold
782.63 ns
descriptive_statistics_axis/policy_axis0/100📈 view plot
🚷 view threshold
5,305.20 ns
descriptive_statistics_axis/policy_axis0/1000📈 view plot
🚷 view threshold
50,657.00 ns
descriptive_statistics_axis/policy_axis1/10📈 view plot
🚷 view threshold
865.23 ns
descriptive_statistics_axis/policy_axis1/100📈 view plot
🚷 view threshold
7,296.20 ns
descriptive_statistics_axis/policy_axis1/1000📈 view plot
🚷 view threshold
79,518.00 ns
descriptive_statistics_axis/repeated_axis0/10📈 view plot
🚷 view threshold
1,569.40 ns
(-1.91%)Baseline: 1,599.95 ns
2,079.93 ns
(75.45%)
descriptive_statistics_axis/repeated_axis0/100📈 view plot
🚷 view threshold
12,565.00 ns
(-1.79%)Baseline: 12,794.00 ns
16,632.20 ns
(75.55%)
descriptive_statistics_axis/repeated_axis0/1000📈 view plot
🚷 view threshold
122,840.00 ns
(-2.10%)Baseline: 125,470.00 ns
163,111.00 ns
(75.31%)
descriptive_statistics_axis/repeated_axis1/10📈 view plot
🚷 view threshold
1,484.60 ns
(-0.40%)Baseline: 1,490.50 ns
1,937.65 ns
(76.62%)
descriptive_statistics_axis/repeated_axis1/100📈 view plot
🚷 view threshold
14,813.00 ns
(-0.42%)Baseline: 14,875.00 ns
19,337.50 ns
(76.60%)
descriptive_statistics_axis/repeated_axis1/1000📈 view plot
🚷 view threshold
160,950.00 ns
(-0.90%)Baseline: 162,410.00 ns
211,133.00 ns
(76.23%)
descriptive_statistics_f32/fused/10📈 view plot
🚷 view threshold
73.82 ns
(+21.54%)Baseline: 60.74 ns
78.96 ns
(93.49%)
descriptive_statistics_f32/fused/100📈 view plot
🚷 view threshold
578.57 ns
(+2.92%)Baseline: 562.15 ns
730.79 ns
(79.17%)
descriptive_statistics_f32/fused/1000📈 view plot
🚷 view threshold
5,632.40 ns
(+0.90%)Baseline: 5,582.20 ns
7,256.86 ns
(77.61%)
descriptive_statistics_f32/policy/10📈 view plot
🚷 view threshold
47.66 ns
descriptive_statistics_f32/policy/100📈 view plot
🚷 view threshold
552.53 ns
descriptive_statistics_f32/policy/1000📈 view plot
🚷 view threshold
5,602.90 ns
weighted_std/10📈 view plot
🚷 view threshold
56.58 ns
(-0.60%)Baseline: 56.92 ns
74.00 ns
(76.46%)
weighted_std/100📈 view plot
🚷 view threshold
350.10 ns
(-5.47%)Baseline: 370.35 ns
481.45 ns
(72.72%)
weighted_std/1000📈 view plot
🚷 view threshold
3,170.30 ns
(-6.21%)Baseline: 3,380.06 ns
4,394.08 ns
(72.15%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Projectndarray-analytics
Branchfeature/missing-data-policy
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
entropy/10📈 view plot
🚷 view threshold
44.66 ns
(-34.44%)Baseline: 68.12 ns
88.55 ns
(50.43%)
entropy/100📈 view plot
🚷 view threshold
331.76 ns
(-36.84%)Baseline: 525.26 ns
682.84 ns
(48.59%)
entropy/1000📈 view plot
🚷 view threshold
3,329.40 ns
(-35.22%)Baseline: 5,139.68 ns
6,681.58 ns
(49.83%)
histogram/10📈 view plot
🚷 view threshold
379.34 ns
(-28.85%)Baseline: 533.18 ns
693.14 ns
(54.73%)
histogram/100📈 view plot
🚷 view threshold
2,656.50 ns
(-41.37%)Baseline: 4,531.18 ns
5,890.53 ns
(45.10%)
histogram/1000📈 view plot
🚷 view threshold
24,407.00 ns
(-42.67%)Baseline: 42,569.40 ns
55,340.22 ns
(44.10%)
kendall_tau/10📈 view plot
🚷 view threshold
1,416.40 ns
(-35.76%)Baseline: 2,204.90 ns
2,866.37 ns
(49.41%)
kendall_tau/100📈 view plot
🚷 view threshold
19,632.00 ns
(-23.13%)Baseline: 25,540.25 ns
33,202.32 ns
(59.13%)
kendall_tau/1000📈 view plot
🚷 view threshold
203,880.00 ns
(-21.55%)Baseline: 259,882.50 ns
337,847.25 ns
(60.35%)
l1_dist/10📈 view plot
🚷 view threshold
4.90 ns
(-36.50%)Baseline: 7.72 ns
10.03 ns
(48.84%)
l1_dist/100📈 view plot
🚷 view threshold
41.06 ns
(-47.22%)Baseline: 77.80 ns
101.14 ns
(40.60%)
l1_dist/1000📈 view plot
🚷 view threshold
466.06 ns
(-54.37%)Baseline: 1,021.30 ns
1,327.70 ns
(35.10%)
mean/10📈 view plot
🚷 view threshold
2.57 ns
(-47.39%)Baseline: 4.88 ns
6.34 ns
(40.47%)
mean/100📈 view plot
🚷 view threshold
9.49 ns
(-44.10%)Baseline: 16.98 ns
22.08 ns
(43.00%)
mean/1000📈 view plot
🚷 view threshold
84.47 ns
(-36.51%)Baseline: 133.04 ns
172.96 ns
(48.84%)
pearson_correlation/10📈 view plot
🚷 view threshold
392.96 ns
(-40.78%)Baseline: 663.56 ns
862.62 ns
(45.55%)
pearson_correlation/100📈 view plot
🚷 view threshold
1,747.00 ns
(-29.12%)Baseline: 2,464.86 ns
3,204.32 ns
(54.52%)
pearson_correlation/1000📈 view plot
🚷 view threshold
12,930.00 ns
(-33.53%)Baseline: 19,453.40 ns
25,289.42 ns
(51.13%)
quantiles_mut/10📈 view plot
🚷 view threshold
602.84 ns
(-31.96%)Baseline: 886.06 ns
1,151.88 ns
(52.34%)
quantiles_mut/100📈 view plot
🚷 view threshold
1,607.30 ns
(-24.58%)Baseline: 2,131.14 ns
2,770.48 ns
(58.02%)
quantiles_mut/1000📈 view plot
🚷 view threshold
4,355.80 ns
(-26.42%)Baseline: 5,919.84 ns
7,695.79 ns
(56.60%)
spearman_correlation/10📈 view plot
🚷 view threshold
617.54 ns
(-36.06%)Baseline: 965.87 ns
1,255.63 ns
(49.18%)
spearman_correlation/100📈 view plot
🚷 view threshold
5,240.80 ns
(-15.75%)Baseline: 6,220.53 ns
8,086.68 ns
(64.81%)
spearman_correlation/1000📈 view plot
🚷 view threshold
43,478.00 ns
(-19.34%)Baseline: 53,905.75 ns
70,077.48 ns
(62.04%)
🐰 View full continuous benchmarking report in Bencher

@N3uralN3twork
N3uralN3twork force-pushed the feature/missing-data-policy branch from 3c76d1e to 26059ec Compare August 2, 2026 18:51
@N3uralN3twork
N3uralN3twork merged commit f03e812 into master Aug 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant