scientific-computing-system-2.0 4.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cds2/__init__.py ADDED
@@ -0,0 +1,805 @@
1
+ """CDS v2 — scientific computing on the NumPy/SciPy/pandas/matplotlib stack.
2
+
3
+ The successor to the zero-dependency cognitive-discovery-system (v1.x),
4
+ rebuilding its proven algorithms for speed and adding new domain modules.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from . import (
10
+ bayes,
11
+ calculus,
12
+ chaos,
13
+ cli,
14
+ distributions,
15
+ geometry,
16
+ graph,
17
+ hypothesis,
18
+ infotheory,
19
+ integrate,
20
+ interpolate,
21
+ io,
22
+ knowledge,
23
+ linalg,
24
+ metaheuristics,
25
+ ml,
26
+ modeling,
27
+ montecarlo,
28
+ nlp,
29
+ optimize,
30
+ quantum,
31
+ rl,
32
+ scientific,
33
+ signals,
34
+ sparse,
35
+ special,
36
+ spectral,
37
+ stats,
38
+ timeseries,
39
+ viz,
40
+ )
41
+ from ._version import __version__
42
+ from .bayes import (
43
+ BetaPosterior,
44
+ GammaPoissonPosterior,
45
+ NaiveBayes,
46
+ NormalNormalPosterior,
47
+ bayes_factor,
48
+ beta_binomial_update,
49
+ gamma_poisson_update,
50
+ normal_normal_update,
51
+ posterior_interval,
52
+ )
53
+ from .calculus import (
54
+ ErrorPropagationResult,
55
+ complex_step_gradient,
56
+ derivative,
57
+ hessian,
58
+ jacobian,
59
+ propagate_error,
60
+ )
61
+ from .chaos import (
62
+ CorrDimResult,
63
+ EmbeddingResult,
64
+ LyapunovResult,
65
+ bifurcation_scan,
66
+ correlation_dimension,
67
+ delay_embed,
68
+ false_nearest_fraction,
69
+ hurst_exponent,
70
+ largest_lyapunov_exponent,
71
+ logistic_map,
72
+ sample_entropy,
73
+ )
74
+ from .distributions import (
75
+ beta_cdf,
76
+ beta_pdf,
77
+ beta_ppf,
78
+ binomial_cdf,
79
+ binomial_pmf,
80
+ binomial_ppf,
81
+ cauchy_cdf,
82
+ cauchy_pdf,
83
+ cauchy_ppf,
84
+ chi2_cdf,
85
+ chi2_pdf,
86
+ chi2_ppf,
87
+ exponential_cdf,
88
+ exponential_pdf,
89
+ exponential_ppf,
90
+ f_cdf,
91
+ f_pdf,
92
+ f_ppf,
93
+ gamma_cdf,
94
+ gamma_pdf,
95
+ gamma_ppf,
96
+ geometric_cdf,
97
+ geometric_pmf,
98
+ geometric_ppf,
99
+ gumbel_cdf,
100
+ gumbel_pdf,
101
+ gumbel_ppf,
102
+ hypergeometric_cdf,
103
+ hypergeometric_pmf,
104
+ laplace_cdf,
105
+ laplace_pdf,
106
+ laplace_ppf,
107
+ lognormal_cdf,
108
+ lognormal_pdf,
109
+ lognormal_ppf,
110
+ negative_binomial_cdf,
111
+ negative_binomial_pmf,
112
+ negative_binomial_ppf,
113
+ pareto_cdf,
114
+ pareto_pdf,
115
+ pareto_ppf,
116
+ poisson_cdf,
117
+ poisson_pmf,
118
+ poisson_ppf,
119
+ rayleigh_cdf,
120
+ rayleigh_pdf,
121
+ rayleigh_ppf,
122
+ student_t_cdf,
123
+ student_t_pdf,
124
+ student_t_ppf,
125
+ uniform_cdf,
126
+ uniform_pdf,
127
+ uniform_ppf,
128
+ weibull_cdf,
129
+ weibull_pdf,
130
+ weibull_ppf,
131
+ )
132
+ from .geometry import (
133
+ HullResult,
134
+ closest_pair,
135
+ convex_hull,
136
+ hull_area,
137
+ line_intersection,
138
+ point_cloud_distances,
139
+ point_in_polygon,
140
+ polygon_area,
141
+ polygon_perimeter,
142
+ rotate_points,
143
+ )
144
+ from .graph import (
145
+ CentralityResult,
146
+ ComponentResult,
147
+ DegreeResult,
148
+ ShortestPaths,
149
+ bellman_ford_paths,
150
+ betweenness_centrality,
151
+ closeness_centrality,
152
+ connected_components,
153
+ degree,
154
+ eigenvector_centrality,
155
+ floyd_warshall_paths,
156
+ from_edges,
157
+ minimum_spanning_forest,
158
+ pagerank,
159
+ shortest_paths,
160
+ single_source_shortest_paths,
161
+ topological_order,
162
+ )
163
+ from .infotheory import (
164
+ conditional_entropy,
165
+ cross_entropy,
166
+ entropy,
167
+ joint_entropy,
168
+ js_divergence,
169
+ kl_divergence,
170
+ mutual_information,
171
+ normalized_mutual_information,
172
+ permutation_entropy,
173
+ )
174
+ from .integrate import (
175
+ BVPResult,
176
+ OdeResult,
177
+ QuadResult,
178
+ cumulative_trapezoid,
179
+ integrate_2d,
180
+ integrate_3d,
181
+ quad,
182
+ simpson,
183
+ solve_bvp,
184
+ solve_ivp,
185
+ trapezoid,
186
+ )
187
+ from .interpolate import (
188
+ cubic_spline,
189
+ grid_interp,
190
+ lagrange_poly,
191
+ linear_interp,
192
+ pchip_interpolator,
193
+ rbf_interp,
194
+ regular_grid_interp,
195
+ )
196
+ from .linalg import (
197
+ EigenResult,
198
+ LeastSquaresResult,
199
+ SVDResult,
200
+ cholesky,
201
+ cond,
202
+ det,
203
+ eig,
204
+ eigh,
205
+ expm,
206
+ inv,
207
+ logm,
208
+ lstsq,
209
+ matrix_power,
210
+ norm,
211
+ pinv,
212
+ rank,
213
+ solve,
214
+ sqrtm,
215
+ svd,
216
+ trace,
217
+ )
218
+ from .metaheuristics import (
219
+ GeneticOptions,
220
+ HeuristicResult,
221
+ genetic_minimize,
222
+ pso_minimize,
223
+ simulated_annealing,
224
+ )
225
+ from .montecarlo import (
226
+ MCMCResult,
227
+ hit_or_miss,
228
+ mc_expectation,
229
+ mc_integrate,
230
+ metropolis_hastings,
231
+ parallel_mc_integrate,
232
+ pi_estimate,
233
+ )
234
+ from .optimize import (
235
+ FitResult,
236
+ GlobalResult,
237
+ LinprogResult,
238
+ OptimizationResult,
239
+ curve_fit,
240
+ differential_evolution,
241
+ find_root_scalar,
242
+ least_squares,
243
+ linprog,
244
+ minimize,
245
+ minimize_constrained,
246
+ minimize_scalar,
247
+ newton_root,
248
+ root,
249
+ )
250
+ from .rl import (
251
+ Bandit,
252
+ BanditResult,
253
+ GridWorld,
254
+ QTable,
255
+ epsilon_greedy,
256
+ q_learn,
257
+ ucb1,
258
+ )
259
+ from .scientific import (
260
+ CONSTANTS,
261
+ UNIT_FACTORS,
262
+ avogadro_number,
263
+ boltzmann_constant,
264
+ convert_units,
265
+ coulomb_force,
266
+ de_broglie_wavelength,
267
+ elementary_charge,
268
+ escape_velocity,
269
+ gravitational_constant,
270
+ gravitational_force,
271
+ ideal_gas_pressure,
272
+ kinetic_energy,
273
+ list_units,
274
+ lorentz_factor,
275
+ photon_energy,
276
+ planck_constant,
277
+ speed_of_light,
278
+ standard_gravity,
279
+ vacuum_permeability,
280
+ vacuum_permittivity,
281
+ )
282
+ from .signals import (
283
+ PeakResult,
284
+ SpectrogramResult,
285
+ Spectrum,
286
+ butter_bandpass,
287
+ butter_highpass,
288
+ butter_lowpass,
289
+ coherence,
290
+ convolve_signals,
291
+ correlate_signals,
292
+ envelope,
293
+ fft,
294
+ fftfreq,
295
+ filter_signal,
296
+ find_peaks,
297
+ ifft,
298
+ irfft,
299
+ power_spectrum,
300
+ resample_signal,
301
+ rfft,
302
+ spectrogram,
303
+ stft,
304
+ welch_spectrum,
305
+ )
306
+ from .signals import (
307
+ moving_average as moving_average_signal,
308
+ )
309
+ from .sparse import (
310
+ EigenpairsResult,
311
+ IterativeSolveResult,
312
+ TruncatedSVDResult,
313
+ ilu_preconditioner,
314
+ jacobi_preconditioner,
315
+ largest_eigenpairs,
316
+ one_norm_est,
317
+ smallest_eigenpairs,
318
+ solve_bicgstab,
319
+ solve_cg,
320
+ solve_gmres,
321
+ sparse_diag,
322
+ sparse_eye,
323
+ sparse_kron,
324
+ truncated_svd,
325
+ )
326
+ from .special import (
327
+ airy_ai,
328
+ airy_bi,
329
+ bessel_iv,
330
+ bessel_j0,
331
+ bessel_j1,
332
+ bessel_jv,
333
+ bessel_kv,
334
+ bessel_y0,
335
+ bessel_yv,
336
+ beta_fn,
337
+ betaln,
338
+ binomial_coefficient,
339
+ chebyshev_tn,
340
+ chebyshev_un,
341
+ digamma,
342
+ elliptic_e,
343
+ elliptic_k,
344
+ erf,
345
+ erfc,
346
+ erfinv,
347
+ exp1,
348
+ exponential_integral_en,
349
+ faddeeva_w,
350
+ fresnel_c,
351
+ fresnel_s,
352
+ gamma_fn,
353
+ gammaln,
354
+ hankel1_fn,
355
+ hermite_hn,
356
+ hypergeometric_2f1,
357
+ jacobi_pnab,
358
+ laguerre_ln,
359
+ lambert_w,
360
+ legendre_pn,
361
+ sine_cosine_integrals,
362
+ spherical_bessel_j0,
363
+ spherical_bessel_j1,
364
+ spherical_harmonic,
365
+ struve_h0,
366
+ struve_h1,
367
+ zeta,
368
+ )
369
+ from .spectral import (
370
+ algebraic_connectivity,
371
+ fiedler_vector,
372
+ laplacian,
373
+ spectral_cluster,
374
+ )
375
+ from .stats import (
376
+ BootstrapResult,
377
+ CorrelationResult,
378
+ DescribeResult,
379
+ StreamingStats,
380
+ TestResult,
381
+ anova,
382
+ bootstrap_ci,
383
+ chi_square_independence,
384
+ cohens_d,
385
+ correlation_matrix,
386
+ covariance_matrix,
387
+ cramers_v,
388
+ describe,
389
+ eta_squared_from_f,
390
+ independent_t_test,
391
+ kendall_tau,
392
+ kruskal_wallis,
393
+ levene_test,
394
+ mann_whitney_u,
395
+ multivariate_normal_logpdf,
396
+ norm_cdf,
397
+ norm_pdf,
398
+ norm_ppf,
399
+ normality_test,
400
+ paired_t_test,
401
+ pearson_correlation,
402
+ percentile,
403
+ permutation_test,
404
+ spearman_correlation,
405
+ t_test,
406
+ wilcoxon_signed_rank,
407
+ z_scores,
408
+ )
409
+ from .timeseries import (
410
+ DecompositionResult,
411
+ acf,
412
+ difference,
413
+ exponential_smoothing,
414
+ ljung_box,
415
+ moving_average,
416
+ pacf,
417
+ seasonal_decompose,
418
+ )
419
+
420
+ __all__ = [
421
+ "__version__",
422
+ "bayes",
423
+ "calculus",
424
+ "chaos",
425
+ "distributions",
426
+ "cli",
427
+ "geometry",
428
+ "graph",
429
+ "hypothesis",
430
+ "infotheory",
431
+ "integrate",
432
+ "interpolate",
433
+ "io",
434
+ "knowledge",
435
+ "linalg",
436
+ "metaheuristics",
437
+ "ml",
438
+ "modeling",
439
+ "montecarlo",
440
+ "nlp",
441
+ "optimize",
442
+ "quantum",
443
+ "rl",
444
+ "scientific",
445
+ "signals",
446
+ "special",
447
+ "sparse",
448
+ "spectral",
449
+ "stats",
450
+ "timeseries",
451
+ "viz",
452
+ # bayes
453
+ "BetaPosterior",
454
+ "GammaPoissonPosterior",
455
+ "NormalNormalPosterior",
456
+ "NaiveBayes",
457
+ "bayes_factor",
458
+ "beta_binomial_update",
459
+ "gamma_poisson_update",
460
+ "normal_normal_update",
461
+ "posterior_interval",
462
+ # chaos
463
+ "CorrDimResult",
464
+ "EmbeddingResult",
465
+ "LyapunovResult",
466
+ "bifurcation_scan",
467
+ "correlation_dimension",
468
+ "delay_embed",
469
+ "false_nearest_fraction",
470
+ "hurst_exponent",
471
+ "largest_lyapunov_exponent",
472
+ "logistic_map",
473
+ "sample_entropy",
474
+ # infotheory
475
+ "conditional_entropy",
476
+ "cross_entropy",
477
+ "entropy",
478
+ "joint_entropy",
479
+ "js_divergence",
480
+ "kl_divergence",
481
+ "mutual_information",
482
+ "normalized_mutual_information",
483
+ "permutation_entropy",
484
+ # geometry
485
+ "HullResult",
486
+ "closest_pair",
487
+ "convex_hull",
488
+ "hull_area",
489
+ "line_intersection",
490
+ "point_cloud_distances",
491
+ "point_in_polygon",
492
+ "polygon_area",
493
+ "polygon_perimeter",
494
+ "rotate_points",
495
+ # metaheuristics
496
+ "GeneticOptions",
497
+ "HeuristicResult",
498
+ "genetic_minimize",
499
+ "pso_minimize",
500
+ "simulated_annealing",
501
+ # rl
502
+ "Bandit",
503
+ "BanditResult",
504
+ "QTable",
505
+ "GridWorld",
506
+ "epsilon_greedy",
507
+ "q_learn",
508
+ "ucb1",
509
+ # graph
510
+ "CentralityResult",
511
+ "ComponentResult",
512
+ "DegreeResult",
513
+ "ShortestPaths",
514
+ "bellman_ford_paths",
515
+ "betweenness_centrality",
516
+ "closeness_centrality",
517
+ "connected_components",
518
+ "degree",
519
+ "eigenvector_centrality",
520
+ "floyd_warshall_paths",
521
+ "from_edges",
522
+ "minimum_spanning_forest",
523
+ "pagerank",
524
+ "shortest_paths",
525
+ "single_source_shortest_paths",
526
+ "topological_order",
527
+ # integrate
528
+ "BVPResult",
529
+ "OdeResult",
530
+ "QuadResult",
531
+ "cumulative_trapezoid",
532
+ "integrate_2d",
533
+ "integrate_3d",
534
+ "quad",
535
+ "simpson",
536
+ "solve_bvp",
537
+ "solve_ivp",
538
+ "trapezoid",
539
+ # interpolate
540
+ "cubic_spline",
541
+ "grid_interp",
542
+ "lagrange_poly",
543
+ "linear_interp",
544
+ "pchip_interpolator",
545
+ "rbf_interp",
546
+ "regular_grid_interp",
547
+ # linalg
548
+ "EigenResult",
549
+ "LeastSquaresResult",
550
+ "SVDResult",
551
+ "cholesky",
552
+ "cond",
553
+ "det",
554
+ "eig",
555
+ "eigh",
556
+ "expm",
557
+ "inv",
558
+ "logm",
559
+ "lstsq",
560
+ "matrix_power",
561
+ "norm",
562
+ "pinv",
563
+ "rank",
564
+ "solve",
565
+ "sqrtm",
566
+ "svd",
567
+ "trace",
568
+ # montecarlo
569
+ "MCMCResult",
570
+ "hit_or_miss",
571
+ "mc_expectation",
572
+ "mc_integrate",
573
+ "metropolis_hastings",
574
+ "parallel_mc_integrate",
575
+ "pi_estimate",
576
+ # sparse / spectral
577
+ "EigenpairsResult",
578
+ "IterativeSolveResult",
579
+ "TruncatedSVDResult",
580
+ "largest_eigenpairs",
581
+ "smallest_eigenpairs",
582
+ "solve_cg",
583
+ "solve_gmres",
584
+ "solve_bicgstab",
585
+ "truncated_svd",
586
+ "sparse_eye",
587
+ "sparse_diag",
588
+ "sparse_kron",
589
+ "one_norm_est",
590
+ "ilu_preconditioner",
591
+ "jacobi_preconditioner",
592
+ "laplacian",
593
+ "fiedler_vector",
594
+ "algebraic_connectivity",
595
+ "spectral_cluster",
596
+ # optimize
597
+ "FitResult",
598
+ "GlobalResult",
599
+ "LinprogResult",
600
+ "OptimizationResult",
601
+ "curve_fit",
602
+ "differential_evolution",
603
+ "find_root_scalar",
604
+ "least_squares",
605
+ "linprog",
606
+ "minimize",
607
+ "minimize_constrained",
608
+ "minimize_scalar",
609
+ "newton_root",
610
+ "root",
611
+ # signals
612
+ "PeakResult",
613
+ "SpectrogramResult",
614
+ "Spectrum",
615
+ "butter_bandpass",
616
+ "butter_highpass",
617
+ "butter_lowpass",
618
+ "convolve_signals",
619
+ "correlate_signals",
620
+ "envelope",
621
+ "fft",
622
+ "fftfreq",
623
+ "filter_signal",
624
+ "find_peaks",
625
+ "ifft",
626
+ "irfft",
627
+ "moving_average_signal",
628
+ "power_spectrum",
629
+ "resample_signal",
630
+ "rfft",
631
+ "spectrogram",
632
+ "welch_spectrum",
633
+ "stft",
634
+ "coherence",
635
+ # stats
636
+ "BootstrapResult",
637
+ "StreamingStats",
638
+ "CorrelationResult",
639
+ "DescribeResult",
640
+ "TestResult",
641
+ "anova",
642
+ "chi_square_independence",
643
+ "cohens_d",
644
+ "cramers_v",
645
+ "describe",
646
+ "eta_squared_from_f",
647
+ "independent_t_test",
648
+ "kendall_tau",
649
+ "kruskal_wallis",
650
+ "levene_test",
651
+ "mann_whitney_u",
652
+ "norm_cdf",
653
+ "norm_pdf",
654
+ "norm_ppf",
655
+ "normality_test",
656
+ "paired_t_test",
657
+ "pearson_correlation",
658
+ "percentile",
659
+ "permutation_test",
660
+ "spearman_correlation",
661
+ "t_test",
662
+ "wilcoxon_signed_rank",
663
+ "covariance_matrix",
664
+ "correlation_matrix",
665
+ "multivariate_normal_logpdf",
666
+ "z_scores",
667
+ # calculus
668
+ "ErrorPropagationResult",
669
+ "propagate_error",
670
+ "complex_step_gradient",
671
+ "derivative",
672
+ "hessian",
673
+ "jacobian",
674
+ # special
675
+ "airy_ai",
676
+ "airy_bi",
677
+ "beta_fn",
678
+ "betaln",
679
+ "bessel_j0",
680
+ "bessel_j1",
681
+ "bessel_y0",
682
+ "digamma",
683
+ "elliptic_e",
684
+ "elliptic_k",
685
+ "erf",
686
+ "erfc",
687
+ "erfinv",
688
+ "exp1",
689
+ "fresnel_c",
690
+ "fresnel_s",
691
+ "gamma_fn",
692
+ "gammaln",
693
+ "hypergeometric_2f1",
694
+ "legendre_pn",
695
+ "spherical_bessel_j0",
696
+ "spherical_bessel_j1",
697
+ "zeta",
698
+ "bessel_jv",
699
+ "bessel_yv",
700
+ "bessel_iv",
701
+ "bessel_kv",
702
+ "hankel1_fn",
703
+ "struve_h0",
704
+ "struve_h1",
705
+ "chebyshev_tn",
706
+ "chebyshev_un",
707
+ "laguerre_ln",
708
+ "hermite_hn",
709
+ "jacobi_pnab",
710
+ "spherical_harmonic",
711
+ "lambert_w",
712
+ "faddeeva_w",
713
+ "exponential_integral_en",
714
+ "sine_cosine_integrals",
715
+ "binomial_coefficient",
716
+ # distributions
717
+ "student_t_pdf",
718
+ "student_t_cdf",
719
+ "student_t_ppf",
720
+ "chi2_pdf",
721
+ "chi2_cdf",
722
+ "chi2_ppf",
723
+ "f_pdf",
724
+ "f_cdf",
725
+ "f_ppf",
726
+ "exponential_pdf",
727
+ "exponential_cdf",
728
+ "exponential_ppf",
729
+ "uniform_pdf",
730
+ "uniform_cdf",
731
+ "uniform_ppf",
732
+ "lognormal_pdf",
733
+ "lognormal_cdf",
734
+ "lognormal_ppf",
735
+ "poisson_pmf",
736
+ "poisson_cdf",
737
+ "poisson_ppf",
738
+ "binomial_pmf",
739
+ "binomial_cdf",
740
+ "binomial_ppf",
741
+ "gamma_pdf",
742
+ "gamma_cdf",
743
+ "gamma_ppf",
744
+ "beta_pdf",
745
+ "beta_cdf",
746
+ "beta_ppf",
747
+ "weibull_pdf",
748
+ "weibull_cdf",
749
+ "weibull_ppf",
750
+ "cauchy_pdf",
751
+ "cauchy_cdf",
752
+ "cauchy_ppf",
753
+ "laplace_pdf",
754
+ "laplace_cdf",
755
+ "laplace_ppf",
756
+ "gumbel_pdf",
757
+ "gumbel_cdf",
758
+ "gumbel_ppf",
759
+ "pareto_pdf",
760
+ "pareto_cdf",
761
+ "pareto_ppf",
762
+ "rayleigh_pdf",
763
+ "rayleigh_cdf",
764
+ "rayleigh_ppf",
765
+ "geometric_pmf",
766
+ "geometric_cdf",
767
+ "geometric_ppf",
768
+ "negative_binomial_pmf",
769
+ "negative_binomial_cdf",
770
+ "negative_binomial_ppf",
771
+ "hypergeometric_pmf",
772
+ "hypergeometric_cdf",
773
+ "bootstrap_ci",
774
+ # scientific
775
+ "CONSTANTS",
776
+ "UNIT_FACTORS",
777
+ "avogadro_number",
778
+ "boltzmann_constant",
779
+ "coulomb_force",
780
+ "convert_units",
781
+ "de_broglie_wavelength",
782
+ "elementary_charge",
783
+ "escape_velocity",
784
+ "gravitational_constant",
785
+ "gravitational_force",
786
+ "ideal_gas_pressure",
787
+ "kinetic_energy",
788
+ "list_units",
789
+ "lorentz_factor",
790
+ "photon_energy",
791
+ "planck_constant",
792
+ "speed_of_light",
793
+ "standard_gravity",
794
+ "vacuum_permittivity",
795
+ "vacuum_permeability",
796
+ # timeseries
797
+ "DecompositionResult",
798
+ "acf",
799
+ "difference",
800
+ "exponential_smoothing",
801
+ "ljung_box",
802
+ "moving_average",
803
+ "pacf",
804
+ "seasonal_decompose",
805
+ ]