statgpu 0.1.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.
- statgpu/__init__.py +174 -0
- statgpu/_base.py +544 -0
- statgpu/_config.py +127 -0
- statgpu/anova/__init__.py +5 -0
- statgpu/anova/_oneway.py +194 -0
- statgpu/backends/__init__.py +83 -0
- statgpu/backends/_array_ops.py +529 -0
- statgpu/backends/_base.py +184 -0
- statgpu/backends/_cupy.py +453 -0
- statgpu/backends/_factory.py +65 -0
- statgpu/backends/_gpu_inference_cupy.py +214 -0
- statgpu/backends/_gpu_inference_torch.py +422 -0
- statgpu/backends/_numpy.py +324 -0
- statgpu/backends/_torch.py +685 -0
- statgpu/backends/_torch_safe.py +47 -0
- statgpu/backends/_utils.py +423 -0
- statgpu/core/__init__.py +10 -0
- statgpu/core/formula/__init__.py +33 -0
- statgpu/core/formula/_design.py +99 -0
- statgpu/core/formula/_parser.py +191 -0
- statgpu/core/formula/_terms.py +70 -0
- statgpu/core/formula/tests/__init__.py +0 -0
- statgpu/core/formula/tests/test_parser.py +194 -0
- statgpu/covariance/__init__.py +6 -0
- statgpu/covariance/_empirical.py +310 -0
- statgpu/covariance/_shrinkage.py +248 -0
- statgpu/cross_validation/__init__.py +31 -0
- statgpu/cross_validation/_base.py +410 -0
- statgpu/cross_validation/_engine.py +167 -0
- statgpu/diagnostics/__init__.py +7 -0
- statgpu/diagnostics/_regression_diagnostics.py +188 -0
- statgpu/feature_selection/__init__.py +24 -0
- statgpu/feature_selection/_knockoff.py +870 -0
- statgpu/feature_selection/_knockoff_utils.py +1003 -0
- statgpu/feature_selection/_stepwise.py +300 -0
- statgpu/glm_core/__init__.py +81 -0
- statgpu/glm_core/_base.py +202 -0
- statgpu/glm_core/_family.py +362 -0
- statgpu/glm_core/_fused.py +149 -0
- statgpu/glm_core/_gamma.py +111 -0
- statgpu/glm_core/_inverse_gaussian.py +62 -0
- statgpu/glm_core/_irls.py +561 -0
- statgpu/glm_core/_logistic.py +82 -0
- statgpu/glm_core/_negative_binomial.py +68 -0
- statgpu/glm_core/_poisson.py +60 -0
- statgpu/glm_core/_solver_legacy.py +100 -0
- statgpu/glm_core/_squared.py +53 -0
- statgpu/glm_core/_tweedie.py +74 -0
- statgpu/inference/__init__.py +239 -0
- statgpu/inference/_distributions_backend.py +2610 -0
- statgpu/inference/_multiple_testing.py +391 -0
- statgpu/inference/_resampling.py +1400 -0
- statgpu/inference/_results.py +265 -0
- statgpu/linear_model/__init__.py +75 -0
- statgpu/linear_model/_gaussian_inference.py +306 -0
- statgpu/linear_model/_glm_base.py +1261 -0
- statgpu/linear_model/_ordered_logit.py +52 -0
- statgpu/linear_model/_ordered_probit.py +50 -0
- statgpu/linear_model/_stats.py +170 -0
- statgpu/linear_model/cv/__init__.py +13 -0
- statgpu/linear_model/cv/_elasticnet_cv.py +892 -0
- statgpu/linear_model/cv/_lasso_cv.py +253 -0
- statgpu/linear_model/cv/_logistic_cv.py +895 -0
- statgpu/linear_model/cv/_ridge_cv.py +1160 -0
- statgpu/linear_model/legacy/__init__.py +1 -0
- statgpu/linear_model/legacy/_distributions_legacy_gpu.py +340 -0
- statgpu/linear_model/legacy/_elasticnet_legacy.py +936 -0
- statgpu/linear_model/legacy/_lasso_legacy.py +4876 -0
- statgpu/linear_model/legacy/_penalized_legacy.py +1174 -0
- statgpu/linear_model/legacy/_ridge_legacy.py +863 -0
- statgpu/linear_model/legacy/_solver_legacy.py +104 -0
- statgpu/linear_model/penalized/__init__.py +25 -0
- statgpu/linear_model/penalized/_base.py +437 -0
- statgpu/linear_model/penalized/_fit_mixin.py +1877 -0
- statgpu/linear_model/penalized/_inference_mixin.py +1179 -0
- statgpu/linear_model/penalized/_penalized_cv.py +2699 -0
- statgpu/linear_model/penalized/_penalized_gamma.py +86 -0
- statgpu/linear_model/penalized/_penalized_inverse_gaussian.py +62 -0
- statgpu/linear_model/penalized/_penalized_linear.py +236 -0
- statgpu/linear_model/penalized/_penalized_logistic.py +100 -0
- statgpu/linear_model/penalized/_penalized_negative_binomial.py +65 -0
- statgpu/linear_model/penalized/_penalized_poisson.py +62 -0
- statgpu/linear_model/penalized/_penalized_tweedie.py +65 -0
- statgpu/linear_model/penalized/_predict_mixin.py +182 -0
- statgpu/linear_model/wrappers/__init__.py +31 -0
- statgpu/linear_model/wrappers/_adaptive_lasso.py +63 -0
- statgpu/linear_model/wrappers/_elasticnet.py +75 -0
- statgpu/linear_model/wrappers/_gamma.py +67 -0
- statgpu/linear_model/wrappers/_inverse_gaussian.py +47 -0
- statgpu/linear_model/wrappers/_lasso.py +2124 -0
- statgpu/linear_model/wrappers/_linear.py +1127 -0
- statgpu/linear_model/wrappers/_logistic.py +1435 -0
- statgpu/linear_model/wrappers/_mcp.py +58 -0
- statgpu/linear_model/wrappers/_negative_binomial.py +58 -0
- statgpu/linear_model/wrappers/_poisson.py +48 -0
- statgpu/linear_model/wrappers/_ridge.py +166 -0
- statgpu/linear_model/wrappers/_scad.py +58 -0
- statgpu/linear_model/wrappers/_tweedie.py +57 -0
- statgpu/metrics/__init__.py +21 -0
- statgpu/metrics/_classification.py +591 -0
- statgpu/nonparametric/__init__.py +50 -0
- statgpu/nonparametric/kernel_methods/__init__.py +25 -0
- statgpu/nonparametric/kernel_methods/_kernels.py +246 -0
- statgpu/nonparametric/kernel_methods/_krr.py +234 -0
- statgpu/nonparametric/kernel_methods/_krr_cv.py +380 -0
- statgpu/nonparametric/kernel_smoothing/__init__.py +39 -0
- statgpu/nonparametric/kernel_smoothing/_bandwidth_selection.py +1083 -0
- statgpu/nonparametric/kernel_smoothing/_kde.py +761 -0
- statgpu/nonparametric/kernel_smoothing/_kernel_common.py +348 -0
- statgpu/nonparametric/kernel_smoothing/_kernel_regression.py +748 -0
- statgpu/nonparametric/splines/__init__.py +5 -0
- statgpu/nonparametric/splines/_bspline_basis.py +336 -0
- statgpu/nonparametric/splines/_penalized.py +349 -0
- statgpu/panel/__init__.py +19 -0
- statgpu/panel/_covariance.py +140 -0
- statgpu/panel/_fixed_effects.py +420 -0
- statgpu/panel/_random_effects.py +385 -0
- statgpu/panel/_utils.py +482 -0
- statgpu/penalties/__init__.py +139 -0
- statgpu/penalties/_adaptive_l1.py +313 -0
- statgpu/penalties/_base.py +261 -0
- statgpu/penalties/_categories.py +39 -0
- statgpu/penalties/_elasticnet.py +98 -0
- statgpu/penalties/_group_lasso.py +678 -0
- statgpu/penalties/_group_mcp.py +553 -0
- statgpu/penalties/_group_scad.py +605 -0
- statgpu/penalties/_l1.py +107 -0
- statgpu/penalties/_l2.py +77 -0
- statgpu/penalties/_mcp.py +237 -0
- statgpu/penalties/_scad.py +260 -0
- statgpu/semiparametric/__init__.py +5 -0
- statgpu/semiparametric/_gam.py +401 -0
- statgpu/solvers/__init__.py +24 -0
- statgpu/solvers/_admm.py +241 -0
- statgpu/solvers/_constants.py +15 -0
- statgpu/solvers/_convergence.py +6 -0
- statgpu/solvers/_fista.py +436 -0
- statgpu/solvers/_fista_bb.py +513 -0
- statgpu/solvers/_fista_lla.py +541 -0
- statgpu/solvers/_lbfgs.py +206 -0
- statgpu/solvers/_newton.py +149 -0
- statgpu/solvers/_utils.py +277 -0
- statgpu/survival/__init__.py +14 -0
- statgpu/survival/_cox.py +3974 -0
- statgpu/survival/_cox_breslow_triton_kernel.py +106 -0
- statgpu/survival/_cox_cv.py +1159 -0
- statgpu/survival/_cox_efron_cuda.py +1280 -0
- statgpu/survival/_cox_efron_triton.py +359 -0
- statgpu/unsupervised/__init__.py +29 -0
- statgpu/unsupervised/_agglomerative.py +307 -0
- statgpu/unsupervised/_dbscan.py +263 -0
- statgpu/unsupervised/_dbscan_cpu.pyx +125 -0
- statgpu/unsupervised/_gmm.py +332 -0
- statgpu/unsupervised/_incremental_pca.py +176 -0
- statgpu/unsupervised/_kmeans.py +261 -0
- statgpu/unsupervised/_minibatch_kmeans.py +299 -0
- statgpu/unsupervised/_minibatch_nmf.py +252 -0
- statgpu/unsupervised/_nmf.py +190 -0
- statgpu/unsupervised/_pca.py +189 -0
- statgpu/unsupervised/_truncated_svd.py +132 -0
- statgpu/unsupervised/_tsne.py +192 -0
- statgpu/unsupervised/_umap.py +224 -0
- statgpu/unsupervised/_utils.py +134 -0
- statgpu-0.1.0.dist-info/METADATA +245 -0
- statgpu-0.1.0.dist-info/RECORD +168 -0
- statgpu-0.1.0.dist-info/WHEEL +5 -0
- statgpu-0.1.0.dist-info/licenses/LICENSE +199 -0
- statgpu-0.1.0.dist-info/top_level.txt +1 -0
statgpu/__init__.py
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"""
|
|
2
|
+
statgpu: GPU-accelerated statistical methods
|
|
3
|
+
|
|
4
|
+
A sklearn-compatible library for statistical computing with GPU support.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
|
|
9
|
+
from ._config import get_device, set_device, Device
|
|
10
|
+
from ._base import BaseEstimator
|
|
11
|
+
from .linear_model import (
|
|
12
|
+
LinearRegression,
|
|
13
|
+
LogisticRegression,
|
|
14
|
+
LogisticRegressionCV,
|
|
15
|
+
PoissonRegression,
|
|
16
|
+
GammaRegression,
|
|
17
|
+
InverseGaussianRegression,
|
|
18
|
+
NegativeBinomialRegression,
|
|
19
|
+
TweedieRegression,
|
|
20
|
+
GeneralizedLinearModel,
|
|
21
|
+
OrderedGeneralizedLinearModel,
|
|
22
|
+
OrderedLogitRegression,
|
|
23
|
+
OrderedProbitRegression,
|
|
24
|
+
PenalizedGeneralizedLinearModel,
|
|
25
|
+
PenalizedGLM_CV,
|
|
26
|
+
PenalizedLinearRegression,
|
|
27
|
+
PenalizedLogisticRegression,
|
|
28
|
+
PenalizedPoissonRegression,
|
|
29
|
+
ApproximateCVWarning,
|
|
30
|
+
Ridge,
|
|
31
|
+
RidgeCV,
|
|
32
|
+
Lasso,
|
|
33
|
+
LassoCV,
|
|
34
|
+
ElasticNet,
|
|
35
|
+
ElasticNetCV,
|
|
36
|
+
)
|
|
37
|
+
from .survival import CoxPH, CoxPHCV
|
|
38
|
+
from .panel import PanelOLS, RandomEffects
|
|
39
|
+
from .backends import get_backend, NumpyBackend, CuPyBackend, TorchBackend
|
|
40
|
+
from .metrics import evaluate_binary_classification
|
|
41
|
+
from .feature_selection import (
|
|
42
|
+
FixedXKnockoffSelector,
|
|
43
|
+
KnockoffSelector,
|
|
44
|
+
fixed_x_knockoff_filter,
|
|
45
|
+
knockoff_filter,
|
|
46
|
+
model_x_knockoff_filter,
|
|
47
|
+
)
|
|
48
|
+
from .inference import adjust_pvalues, combine_pvalues, multipletests
|
|
49
|
+
from .inference import bootstrap_statistic, permutation_test
|
|
50
|
+
from .anova import f_oneway
|
|
51
|
+
from .nonparametric import (
|
|
52
|
+
BandwidthSelectionResult,
|
|
53
|
+
KernelDensityEstimator,
|
|
54
|
+
KDE,
|
|
55
|
+
KDEBootstrapResult,
|
|
56
|
+
KernelRegression,
|
|
57
|
+
KernelRegressionRegressor,
|
|
58
|
+
KernelRidge,
|
|
59
|
+
KernelRidgeCV,
|
|
60
|
+
fit_kde,
|
|
61
|
+
fit_kernel_regression,
|
|
62
|
+
kde_pdf,
|
|
63
|
+
kde_confidence_interval,
|
|
64
|
+
kernel_regression_predict,
|
|
65
|
+
kde_bootstrap_confidence_interval,
|
|
66
|
+
select_bandwidth,
|
|
67
|
+
select_bandwidth_factor,
|
|
68
|
+
bspline_basis,
|
|
69
|
+
natural_cubic_spline_basis,
|
|
70
|
+
)
|
|
71
|
+
from .semiparametric import GAM
|
|
72
|
+
from .covariance import EmpiricalCovariance, LedoitWolf, OAS
|
|
73
|
+
from .unsupervised import (
|
|
74
|
+
PCA,
|
|
75
|
+
IncrementalPCA,
|
|
76
|
+
TruncatedSVD,
|
|
77
|
+
KMeans,
|
|
78
|
+
MiniBatchKMeans,
|
|
79
|
+
DBSCAN,
|
|
80
|
+
GaussianMixture,
|
|
81
|
+
NMF,
|
|
82
|
+
MiniBatchNMF,
|
|
83
|
+
AgglomerativeClustering,
|
|
84
|
+
UMAP,
|
|
85
|
+
TSNE,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
__all__ = [
|
|
89
|
+
"get_device",
|
|
90
|
+
"set_device",
|
|
91
|
+
"Device",
|
|
92
|
+
"BaseEstimator",
|
|
93
|
+
"LinearRegression",
|
|
94
|
+
"LogisticRegression",
|
|
95
|
+
"LogisticRegressionCV",
|
|
96
|
+
"PoissonRegression",
|
|
97
|
+
"GammaRegression",
|
|
98
|
+
"InverseGaussianRegression",
|
|
99
|
+
"NegativeBinomialRegression",
|
|
100
|
+
"TweedieRegression",
|
|
101
|
+
"GeneralizedLinearModel",
|
|
102
|
+
"OrderedGeneralizedLinearModel",
|
|
103
|
+
"OrderedLogitRegression",
|
|
104
|
+
"OrderedProbitRegression",
|
|
105
|
+
"PenalizedGeneralizedLinearModel",
|
|
106
|
+
"PenalizedGLM_CV",
|
|
107
|
+
"PenalizedLinearRegression",
|
|
108
|
+
"PenalizedLogisticRegression",
|
|
109
|
+
"PenalizedPoissonRegression",
|
|
110
|
+
"ApproximateCVWarning",
|
|
111
|
+
"Ridge",
|
|
112
|
+
"RidgeCV",
|
|
113
|
+
"Lasso",
|
|
114
|
+
"LassoCV",
|
|
115
|
+
"ElasticNet",
|
|
116
|
+
"ElasticNetCV",
|
|
117
|
+
"EmpiricalCovariance",
|
|
118
|
+
"LedoitWolf",
|
|
119
|
+
"OAS",
|
|
120
|
+
"CoxPH",
|
|
121
|
+
"CoxPHCV",
|
|
122
|
+
"PanelOLS",
|
|
123
|
+
"RandomEffects",
|
|
124
|
+
"KernelRidge",
|
|
125
|
+
"KernelRidgeCV",
|
|
126
|
+
"get_backend",
|
|
127
|
+
"NumpyBackend",
|
|
128
|
+
"CuPyBackend",
|
|
129
|
+
"TorchBackend",
|
|
130
|
+
"evaluate_binary_classification",
|
|
131
|
+
"knockoff_filter",
|
|
132
|
+
"fixed_x_knockoff_filter",
|
|
133
|
+
"model_x_knockoff_filter",
|
|
134
|
+
"KnockoffSelector",
|
|
135
|
+
"FixedXKnockoffSelector",
|
|
136
|
+
"adjust_pvalues",
|
|
137
|
+
"combine_pvalues",
|
|
138
|
+
"multipletests",
|
|
139
|
+
"bootstrap_statistic",
|
|
140
|
+
"permutation_test",
|
|
141
|
+
"f_oneway",
|
|
142
|
+
"BandwidthSelectionResult",
|
|
143
|
+
"KernelDensityEstimator",
|
|
144
|
+
"KDE",
|
|
145
|
+
"KDEBootstrapResult",
|
|
146
|
+
"KernelRegression",
|
|
147
|
+
"KernelRegressionRegressor",
|
|
148
|
+
"fit_kde",
|
|
149
|
+
"fit_kernel_regression",
|
|
150
|
+
"kde_pdf",
|
|
151
|
+
"kde_confidence_interval",
|
|
152
|
+
"kernel_regression_predict",
|
|
153
|
+
"kde_bootstrap_confidence_interval",
|
|
154
|
+
"select_bandwidth",
|
|
155
|
+
"select_bandwidth_factor",
|
|
156
|
+
"GAM",
|
|
157
|
+
"bspline_basis",
|
|
158
|
+
"natural_cubic_spline_basis",
|
|
159
|
+
"PCA",
|
|
160
|
+
"IncrementalPCA",
|
|
161
|
+
"TruncatedSVD",
|
|
162
|
+
"KMeans",
|
|
163
|
+
"MiniBatchKMeans",
|
|
164
|
+
"DBSCAN",
|
|
165
|
+
"GaussianMixture",
|
|
166
|
+
"NMF",
|
|
167
|
+
"MiniBatchNMF",
|
|
168
|
+
"AgglomerativeClustering",
|
|
169
|
+
"UMAP",
|
|
170
|
+
"TSNE",
|
|
171
|
+
"EmpiricalCovariance",
|
|
172
|
+
"LedoitWolf",
|
|
173
|
+
"OAS",
|
|
174
|
+
]
|