Skip to content

Commit 4ed9c3f

Browse files
authored
Merge pull request #44 from PySATL/api/renaming-of-statistical-procedures
Api/renaming of statistical procedures
2 parents 1cebc58 + cb90a63 commit 4ed9c3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+177
-164
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Computes given integral with the limits of integration being 0 and 1 using Rando
120120

121121
### Usage:
122122
```Python
123-
from src.algorithms.support_algorithms.rqmc import RQMC
123+
from src.procedures.support.rqmc import RQMC
124124
rqmc = RQMC(lambda x: x**3 - x**2 + 1, error_tolerance=1e-5)
125125
```
126126
So `rqmc()[0]` is estimated integral value and `rqmc()[1]` is current error tolerance.

src/algorithms/__init__.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/estimators/abstract_estimator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from numpy import _typing
44

5-
from src.algorithms import ALGORITHM_REGISTRY
5+
from src.procedures import ALGORITHM_REGISTRY
66
from src.estimators.estimate_result import EstimateResult
77
from src.register.algorithm_purpose import AlgorithmPurpose
88

@@ -14,7 +14,7 @@ class AbstractEstimator:
1414
algorithm_name: A string indicating chosen algorithm.
1515
params: A dictionary of algorithm parameters.
1616
estimate_result: Estimation result.
17-
_registry: Registry that contains classes of all algorithms.
17+
_registry: Registry that contains classes of all procedures.
1818
_purpose: Defines purpose of algorithm, one of the registry key.
1919
"""
2020

@@ -47,7 +47,7 @@ def set_params(self, algorithm_name: str, params: dict | None = None) -> Self:
4747
return self
4848

4949
def get_available_algorithms(self) -> list[str]:
50-
"""Get all algorithms that can be used for current estimator class"""
50+
"""Get all procedures that can be used for current estimator class"""
5151
return [key[0] for key in self._registry.register_of_names.keys() if key[1] == self._purpose]
5252

5353
def estimate(self, sample: _typing.ArrayLike) -> EstimateResult:

src/estimators/semiparametric/abstract_semiparametric_estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from src.estimators.estimate_result import EstimateResult
55

66

7-
class AbstractSemiParametricEstimator(AbstractEstimator):
7+
class AbstractSemiparEstim(AbstractEstimator):
88
def __init__(self, algorithm_name: str, params: dict | None = None) -> None:
99
super().__init__(algorithm_name, params)
1010

src/estimators/semiparametric/nm_semiparametric_estimator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from numpy import _typing
22

33
from src.estimators.estimate_result import EstimateResult
4-
from src.estimators.semiparametric.abstract_semiparametric_estimator import AbstractSemiParametricEstimator
4+
from src.estimators.semiparametric.abstract_semiparametric_estimator import AbstractSemiparEstim
55
from src.register.algorithm_purpose import AlgorithmPurpose
66

77

8-
class NMSemiParametricEstimator(AbstractSemiParametricEstimator):
8+
class NMSemiparEstim(AbstractSemiparEstim):
99
def __init__(self, algorithm_name: str, params: dict | None = None) -> None:
1010
super().__init__(algorithm_name, params)
1111
self._purpose = AlgorithmPurpose.NM_SEMIPARAMETRIC

src/estimators/semiparametric/nmv_semiparametric_estimator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from numpy import _typing
22

33
from src.estimators.estimate_result import EstimateResult
4-
from src.estimators.semiparametric.abstract_semiparametric_estimator import AbstractSemiParametricEstimator
4+
from src.estimators.semiparametric.abstract_semiparametric_estimator import AbstractSemiparEstim
55
from src.register.algorithm_purpose import AlgorithmPurpose
66

77

8-
class NMVSemiParametricEstimator(AbstractSemiParametricEstimator):
8+
class NMVSemiparEstim(AbstractSemiparEstim):
99
def __init__(self, algorithm_name: str, params: dict | None = None) -> None:
1010
super().__init__(algorithm_name, params)
1111
self._purpose = AlgorithmPurpose.NMV_SEMIPARAMETRIC

src/estimators/semiparametric/nv_semiparametric_estimator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from numpy import _typing
22

33
from src.estimators.estimate_result import EstimateResult
4-
from src.estimators.semiparametric.abstract_semiparametric_estimator import AbstractSemiParametricEstimator
4+
from src.estimators.semiparametric.abstract_semiparametric_estimator import AbstractSemiparEstim
55
from src.register.algorithm_purpose import AlgorithmPurpose
66

77

8-
class NVSemiParametricEstimator(AbstractSemiParametricEstimator):
8+
class NVSemiparEstim(AbstractSemiparEstim):
99
def __init__(self, algorithm_name: str, params: dict | None = None) -> None:
1010
super().__init__(algorithm_name, params)
1111
self._purpose = AlgorithmPurpose.NV_SEMIPARAMETRIC

src/mixtures/abstract_mixture.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from scipy.stats import rv_continuous
88
from scipy.stats.distributions import rv_frozen
99

10-
from src.algorithms.support_algorithms.integrator import Integrator
11-
from src.algorithms.support_algorithms.rqmc import RQMCIntegrator # default integrator
10+
from src.procedures.support.integrator import Integrator
11+
from src.procedures.support.rqmc import RQMCIntegrator # default integrator
1212

1313
class AbstractMixtures(metaclass=ABCMeta):
1414
"""Base class for Mixtures"""

src/mixtures/nm_mixture.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
from scipy.stats import norm, rv_continuous
77
from scipy.stats.distributions import rv_frozen
88

9-
from src.algorithms.support_algorithms.integrator import Integrator
10-
from src.algorithms.support_algorithms.rqmc import RQMCIntegrator
9+
from src.procedures.support.integrator import Integrator
10+
from src.procedures.support.rqmc import RQMCIntegrator
11+
from src.procedures.support.log_rqmc import LogRQMC
1112
from src.mixtures.abstract_mixture import AbstractMixtures
1213

1314
@dataclass

src/mixtures/nmv_mixture.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from scipy.stats import norm, rv_continuous
88
from scipy.stats.distributions import rv_frozen
99

10-
from src.algorithms.support_algorithms.integrator import Integrator
11-
from src.algorithms.support_algorithms.rqmc import RQMCIntegrator
12-
from src.algorithms.support_algorithms.log_rqmc import LogRQMC
10+
from src.procedures.support.integrator import Integrator
11+
from src.procedures.support.rqmc import RQMCIntegrator
12+
from src.procedures.support.log_rqmc import LogRQMC
1313
from src.mixtures.abstract_mixture import AbstractMixtures
1414

1515
@dataclass

0 commit comments

Comments
 (0)