inferust 0.1.0__tar.gz
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.
- inferust-0.1.0/.github/workflows/ci.yml +79 -0
- inferust-0.1.0/.github/workflows/publish.yml +45 -0
- inferust-0.1.0/.gitignore +15 -0
- inferust-0.1.0/CHANGELOG.md +694 -0
- inferust-0.1.0/Cargo.lock +3795 -0
- inferust-0.1.0/Cargo.toml +124 -0
- inferust-0.1.0/EXAMPLES.md +311 -0
- inferust-0.1.0/LICENSE +21 -0
- inferust-0.1.0/PKG-INFO +46 -0
- inferust-0.1.0/README.md +240 -0
- inferust-0.1.0/bench/Dockerfile.python +4 -0
- inferust-0.1.0/bench/Dockerfile.rust +9 -0
- inferust-0.1.0/bench/README.md +35 -0
- inferust-0.1.0/docs/parity.md +300 -0
- inferust-0.1.0/examples/basic_ols.rs +98 -0
- inferust-0.1.0/examples/bench_all.rs +455 -0
- inferust-0.1.0/examples/bench_ols.rs +127 -0
- inferust-0.1.0/examples/bench_smoke.rs +87 -0
- inferust-0.1.0/examples/case_studies.rs +475 -0
- inferust-0.1.0/examples/diagnostics.rs +29 -0
- inferust-0.1.0/examples/discrete_models.rs +35 -0
- inferust-0.1.0/pyproject.toml +20 -0
- inferust-0.1.0/python/Cargo.lock +467 -0
- inferust-0.1.0/python/Cargo.toml +14 -0
- inferust-0.1.0/python/README.md +34 -0
- inferust-0.1.0/python/src/lib.rs +252 -0
- inferust-0.1.0/scripts/bench_all_statsmodels.py +165 -0
- inferust-0.1.0/scripts/bench_statsmodels.py +59 -0
- inferust-0.1.0/scripts/parity_statsmodels.py +3007 -0
- inferust-0.1.0/scripts/stl_reference.py +233 -0
- inferust-0.1.0/src/contingency.rs +181 -0
- inferust-0.1.0/src/correlation.rs +110 -0
- inferust-0.1.0/src/covariance.rs +276 -0
- inferust-0.1.0/src/data.rs +1360 -0
- inferust-0.1.0/src/descriptive.rs +110 -0
- inferust-0.1.0/src/diagnostics.rs +161 -0
- inferust-0.1.0/src/discrete.rs +1733 -0
- inferust-0.1.0/src/error.rs +18 -0
- inferust-0.1.0/src/evaluation.rs +193 -0
- inferust-0.1.0/src/gam.rs +667 -0
- inferust-0.1.0/src/gee.rs +416 -0
- inferust-0.1.0/src/glm.rs +2974 -0
- inferust-0.1.0/src/glm_family.rs +213 -0
- inferust-0.1.0/src/gmm.rs +357 -0
- inferust-0.1.0/src/graphics.rs +372 -0
- inferust-0.1.0/src/hypothesis/anova.rs +353 -0
- inferust-0.1.0/src/hypothesis/chisq.rs +116 -0
- inferust-0.1.0/src/hypothesis/mod.rs +12 -0
- inferust-0.1.0/src/hypothesis/multicomp.rs +313 -0
- inferust-0.1.0/src/hypothesis/nonparametric.rs +1076 -0
- inferust-0.1.0/src/hypothesis/ttest.rs +158 -0
- inferust-0.1.0/src/hypothesis/tukey.rs +460 -0
- inferust-0.1.0/src/hypothesis/wald.rs +179 -0
- inferust-0.1.0/src/imputation.rs +214 -0
- inferust-0.1.0/src/irls.rs +72 -0
- inferust-0.1.0/src/lib.rs +133 -0
- inferust-0.1.0/src/mixed.rs +887 -0
- inferust-0.1.0/src/multivariate.rs +297 -0
- inferust-0.1.0/src/panel.rs +802 -0
- inferust-0.1.0/src/plot.rs +777 -0
- inferust-0.1.0/src/polars_bridge.rs +54 -0
- inferust-0.1.0/src/post_estimation.rs +638 -0
- inferust-0.1.0/src/power.rs +570 -0
- inferust-0.1.0/src/proportion.rs +300 -0
- inferust-0.1.0/src/regression/gls.rs +638 -0
- inferust-0.1.0/src/regression/mod.rs +11 -0
- inferust-0.1.0/src/regression/ols.rs +1575 -0
- inferust-0.1.0/src/regression/quantile.rs +520 -0
- inferust-0.1.0/src/regression/regularized.rs +657 -0
- inferust-0.1.0/src/regression/rolling.rs +496 -0
- inferust-0.1.0/src/robust.rs +328 -0
- inferust-0.1.0/src/seasonal.rs +535 -0
- inferust-0.1.0/src/smoothing.rs +754 -0
- inferust-0.1.0/src/statespace/kalman.rs +396 -0
- inferust-0.1.0/src/statespace/mod.rs +11 -0
- inferust-0.1.0/src/statespace/scalar.rs +274 -0
- inferust-0.1.0/src/survival.rs +857 -0
- inferust-0.1.0/src/time_series.rs +4571 -0
- inferust-0.1.0/src/treatment.rs +230 -0
- inferust-0.1.0/tests/common/mod.rs +105 -0
- inferust-0.1.0/tests/fixtures/statsmodels/README.md +19 -0
- inferust-0.1.0/tests/fixtures/statsmodels/acf_pacf.json +361 -0
- inferust-0.1.0/tests/fixtures/statsmodels/adf.json +317 -0
- inferust-0.1.0/tests/fixtures/statsmodels/anderson_darling.json +74 -0
- inferust-0.1.0/tests/fixtures/statsmodels/anova_oneway.json +106 -0
- inferust-0.1.0/tests/fixtures/statsmodels/anova_twoway.json +198 -0
- inferust-0.1.0/tests/fixtures/statsmodels/arima_ar1.json +321 -0
- inferust-0.1.0/tests/fixtures/statsmodels/arima_arma11.json +323 -0
- inferust-0.1.0/tests/fixtures/statsmodels/breusch_pagan.json +314 -0
- inferust-0.1.0/tests/fixtures/statsmodels/chi2_goodness_of_fit.json +24 -0
- inferust-0.1.0/tests/fixtures/statsmodels/chi2_independence.json +26 -0
- inferust-0.1.0/tests/fixtures/statsmodels/cox_ph.json +1026 -0
- inferust-0.1.0/tests/fixtures/statsmodels/descriptive.json +219 -0
- inferust-0.1.0/tests/fixtures/statsmodels/elastic_net_small.json +500 -0
- inferust-0.1.0/tests/fixtures/statsmodels/engle_granger.json +417 -0
- inferust-0.1.0/tests/fixtures/statsmodels/fgls_cochrane_orcutt.json +318 -0
- inferust-0.1.0/tests/fixtures/statsmodels/forecast_ci.json +692 -0
- inferust-0.1.0/tests/fixtures/statsmodels/gam_penalized_gcv.json +276 -0
- inferust-0.1.0/tests/fixtures/statsmodels/gam_small.json +271 -0
- inferust-0.1.0/tests/fixtures/statsmodels/gamma_glm.json +1712 -0
- inferust-0.1.0/tests/fixtures/statsmodels/gee_poisson.json +1236 -0
- inferust-0.1.0/tests/fixtures/statsmodels/gee_small.json +754 -0
- inferust-0.1.0/tests/fixtures/statsmodels/gls_ar1.json +1915 -0
- inferust-0.1.0/tests/fixtures/statsmodels/granger_causality.json +313 -0
- inferust-0.1.0/tests/fixtures/statsmodels/holt_winters.json +274 -0
- inferust-0.1.0/tests/fixtures/statsmodels/imputation_mice_small.json +140 -0
- inferust-0.1.0/tests/fixtures/statsmodels/inverse_gaussian_glm.json +779 -0
- inferust-0.1.0/tests/fixtures/statsmodels/iv2sls_small.json +583 -0
- inferust-0.1.0/tests/fixtures/statsmodels/kaplan_meier.json +187 -0
- inferust-0.1.0/tests/fixtures/statsmodels/kruskal_wallis_parity.json +92 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ks_one_sample.json +73 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ks_two_sample.json +99 -0
- inferust-0.1.0/tests/fixtures/statsmodels/lasso_small.json +500 -0
- inferust-0.1.0/tests/fixtures/statsmodels/lilliefors.json +51 -0
- inferust-0.1.0/tests/fixtures/statsmodels/log_rank.json +258 -0
- inferust-0.1.0/tests/fixtures/statsmodels/logit_small.json +1259 -0
- inferust-0.1.0/tests/fixtures/statsmodels/mann_whitney.json +97 -0
- inferust-0.1.0/tests/fixtures/statsmodels/manova.json +261 -0
- inferust-0.1.0/tests/fixtures/statsmodels/mcnemar.json +18 -0
- inferust-0.1.0/tests/fixtures/statsmodels/mixed_small.json +759 -0
- inferust-0.1.0/tests/fixtures/statsmodels/multicomp.json +178 -0
- inferust-0.1.0/tests/fixtures/statsmodels/multinomial_small.json +1243 -0
- inferust-0.1.0/tests/fixtures/statsmodels/negbin_small.json +1240 -0
- inferust-0.1.0/tests/fixtures/statsmodels/odds_ratio.json +19 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ols_hc0.json +1237 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ols_hc1.json +1237 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ols_hc2.json +1237 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ols_hc3.json +1237 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ols_medium.json +5293 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ols_small.json +737 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ordered_logit_small.json +1031 -0
- inferust-0.1.0/tests/fixtures/statsmodels/panel_fe.json +616 -0
- inferust-0.1.0/tests/fixtures/statsmodels/panel_re.json +631 -0
- inferust-0.1.0/tests/fixtures/statsmodels/panel_time_fe.json +706 -0
- inferust-0.1.0/tests/fixtures/statsmodels/panel_two_way_fe.json +678 -0
- inferust-0.1.0/tests/fixtures/statsmodels/pca.json +644 -0
- inferust-0.1.0/tests/fixtures/statsmodels/pearson_spearman.json +174 -0
- inferust-0.1.0/tests/fixtures/statsmodels/poisson_small.json +1442 -0
- inferust-0.1.0/tests/fixtures/statsmodels/power.json +78 -0
- inferust-0.1.0/tests/fixtures/statsmodels/probit_small.json +1239 -0
- inferust-0.1.0/tests/fixtures/statsmodels/proportion.json +49 -0
- inferust-0.1.0/tests/fixtures/statsmodels/quantreg_median.json +419 -0
- inferust-0.1.0/tests/fixtures/statsmodels/quantreg_q25.json +419 -0
- inferust-0.1.0/tests/fixtures/statsmodels/recursive_ols.json +276 -0
- inferust-0.1.0/tests/fixtures/statsmodels/reset_test.json +414 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ridge_small.json +500 -0
- inferust-0.1.0/tests/fixtures/statsmodels/robust_small.json +532 -0
- inferust-0.1.0/tests/fixtures/statsmodels/rolling_ols.json +563 -0
- inferust-0.1.0/tests/fixtures/statsmodels/sarimax_exact_mle.json +776 -0
- inferust-0.1.0/tests/fixtures/statsmodels/sarimax_small.json +327 -0
- inferust-0.1.0/tests/fixtures/statsmodels/seasonal_decompose.json +986 -0
- inferust-0.1.0/tests/fixtures/statsmodels/shapiro_wilk.json +51 -0
- inferust-0.1.0/tests/fixtures/statsmodels/sign_test.json +74 -0
- inferust-0.1.0/tests/fixtures/statsmodels/stl.json +882 -0
- inferust-0.1.0/tests/fixtures/statsmodels/treatment_ipw_small.json +589 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ttest_1samp.json +97 -0
- inferust-0.1.0/tests/fixtures/statsmodels/ttest_ind.json +123 -0
- inferust-0.1.0/tests/fixtures/statsmodels/tukey_hsd.json +88 -0
- inferust-0.1.0/tests/fixtures/statsmodels/varmax_exact_mle.json +1065 -0
- inferust-0.1.0/tests/fixtures/statsmodels/varmax_small.json +280 -0
- inferust-0.1.0/tests/fixtures/statsmodels/vecm_small.json +209 -0
- inferust-0.1.0/tests/fixtures/statsmodels/vif.json +315 -0
- inferust-0.1.0/tests/fixtures/statsmodels/wald_ols.json +878 -0
- inferust-0.1.0/tests/fixtures/statsmodels/white_test.json +314 -0
- inferust-0.1.0/tests/fixtures/statsmodels/wilcoxon.json +92 -0
- inferust-0.1.0/tests/fixtures/statsmodels/wls_small.json +759 -0
- inferust-0.1.0/tests/fixtures/statsmodels/zip_small.json +1035 -0
- inferust-0.1.0/tests/parity_contingency.rs +88 -0
- inferust-0.1.0/tests/parity_correlation.rs +32 -0
- inferust-0.1.0/tests/parity_descriptive.rs +33 -0
- inferust-0.1.0/tests/parity_diagnostics.rs +119 -0
- inferust-0.1.0/tests/parity_discrete.rs +174 -0
- inferust-0.1.0/tests/parity_gam.rs +76 -0
- inferust-0.1.0/tests/parity_gee.rs +103 -0
- inferust-0.1.0/tests/parity_glm.rs +219 -0
- inferust-0.1.0/tests/parity_glm_family.rs +154 -0
- inferust-0.1.0/tests/parity_gmm.rs +40 -0
- inferust-0.1.0/tests/parity_hypothesis.rs +620 -0
- inferust-0.1.0/tests/parity_imputation.rs +72 -0
- inferust-0.1.0/tests/parity_mixed.rs +57 -0
- inferust-0.1.0/tests/parity_multivariate.rs +111 -0
- inferust-0.1.0/tests/parity_ols.rs +241 -0
- inferust-0.1.0/tests/parity_panel.rs +227 -0
- inferust-0.1.0/tests/parity_power.rs +141 -0
- inferust-0.1.0/tests/parity_proportion.rs +121 -0
- inferust-0.1.0/tests/parity_regression_gls.rs +90 -0
- inferust-0.1.0/tests/parity_regression_quantile.rs +49 -0
- inferust-0.1.0/tests/parity_regression_rolling.rs +103 -0
- inferust-0.1.0/tests/parity_regularized.rs +91 -0
- inferust-0.1.0/tests/parity_robust.rs +49 -0
- inferust-0.1.0/tests/parity_seasonal.rs +161 -0
- inferust-0.1.0/tests/parity_smoothing.rs +143 -0
- inferust-0.1.0/tests/parity_survival.rs +141 -0
- inferust-0.1.0/tests/parity_timeseries.rs +589 -0
- inferust-0.1.0/tests/parity_treatment.rs +58 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-and-test:
|
|
14
|
+
name: Build & Test
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
|
|
20
|
+
- name: Install stable Rust
|
|
21
|
+
uses: dtolnay/rust-toolchain@stable
|
|
22
|
+
with:
|
|
23
|
+
components: rustfmt, clippy
|
|
24
|
+
|
|
25
|
+
- name: Cache cargo registry
|
|
26
|
+
uses: actions/cache@v5
|
|
27
|
+
with:
|
|
28
|
+
path: |
|
|
29
|
+
~/.cargo/registry
|
|
30
|
+
~/.cargo/git
|
|
31
|
+
target
|
|
32
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
|
33
|
+
|
|
34
|
+
- name: Check formatting
|
|
35
|
+
run: cargo fmt --all --check
|
|
36
|
+
|
|
37
|
+
# --all-targets covers tests, examples and benches; --all-features covers
|
|
38
|
+
# the optional polars bridge, which a default-feature lint would skip.
|
|
39
|
+
- name: Clippy
|
|
40
|
+
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
41
|
+
|
|
42
|
+
- name: Build
|
|
43
|
+
run: cargo build --verbose
|
|
44
|
+
|
|
45
|
+
- name: Run tests
|
|
46
|
+
run: cargo test --all-features --verbose
|
|
47
|
+
|
|
48
|
+
- name: Check docs
|
|
49
|
+
env:
|
|
50
|
+
RUSTDOCFLAGS: -D warnings
|
|
51
|
+
run: cargo doc --no-deps --all-features
|
|
52
|
+
|
|
53
|
+
- name: Check package builds for crates.io
|
|
54
|
+
run: cargo package
|
|
55
|
+
|
|
56
|
+
- name: Run example
|
|
57
|
+
run: cargo run --example basic_ols
|
|
58
|
+
|
|
59
|
+
- name: Build benchmark example
|
|
60
|
+
run: cargo build --release --example bench_all
|
|
61
|
+
|
|
62
|
+
- name: Smoke benchmark
|
|
63
|
+
run: cargo run --release --example bench_smoke
|
|
64
|
+
|
|
65
|
+
msrv:
|
|
66
|
+
name: MSRV (1.89)
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v5
|
|
70
|
+
|
|
71
|
+
# Default features only: the polars bridge pulls dependencies that
|
|
72
|
+
# require a newer toolchain than the crate's declared floor.
|
|
73
|
+
- name: Install Rust 1.89
|
|
74
|
+
uses: dtolnay/rust-toolchain@master
|
|
75
|
+
with:
|
|
76
|
+
toolchain: "1.89"
|
|
77
|
+
|
|
78
|
+
- name: Check against the declared rust-version
|
|
79
|
+
run: cargo check --all-targets
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish to crates.io
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
name: cargo publish
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v5
|
|
18
|
+
|
|
19
|
+
- name: Install stable Rust
|
|
20
|
+
uses: dtolnay/rust-toolchain@stable
|
|
21
|
+
|
|
22
|
+
- name: Publish crate
|
|
23
|
+
env:
|
|
24
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
25
|
+
run: |
|
|
26
|
+
if [ -z "$CARGO_REGISTRY_TOKEN" ]; then
|
|
27
|
+
echo "::warning::CARGO_REGISTRY_TOKEN is not set; skipping automated publish."
|
|
28
|
+
echo "Add a crates.io API token as the GitHub secret CARGO_REGISTRY_TOKEN to enable this workflow."
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
# Prefer env-var auth; tolerate a prior local publish of the same version
|
|
32
|
+
# so tagging after `cargo publish` does not fail the workflow.
|
|
33
|
+
set +e
|
|
34
|
+
out=$(cargo publish 2>&1)
|
|
35
|
+
status=$?
|
|
36
|
+
set -e
|
|
37
|
+
echo "$out"
|
|
38
|
+
if [ "$status" -eq 0 ]; then
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
if echo "$out" | grep -q 'already exists on crates.io'; then
|
|
42
|
+
echo "::notice::Version already on crates.io; treating publish as success."
|
|
43
|
+
exit 0
|
|
44
|
+
fi
|
|
45
|
+
exit "$status"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/target
|
|
2
|
+
python/target
|
|
3
|
+
python/.cargo-home
|
|
4
|
+
python/Cargo.lock
|
|
5
|
+
Cargo.lock
|
|
6
|
+
**/*.rs.bk
|
|
7
|
+
.DS_Store
|
|
8
|
+
__pycache__/
|
|
9
|
+
*.pyc
|
|
10
|
+
.venv/
|
|
11
|
+
bench/bench_*
|
|
12
|
+
!bench/README.md
|
|
13
|
+
# Benchmark run logs are machine-specific; keep them out of the repo.
|
|
14
|
+
bench/results/
|
|
15
|
+
.vscode/
|