Skip to content

Commit e54a01a

Browse files
committed
fix: remove unwanted dependenices
1 parent ad50cfb commit e54a01a

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

causal_testing/specification/variable.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from collections.abc import Callable
66
from typing import TypeVar
77

8-
import lhsmdu
98
from pandas import DataFrame
109
from scipy.stats._distn_infrastructure import rv_generic
1110

@@ -38,19 +37,6 @@ def __init__(self, name: str, datatype: T, distribution: rv_generic = None, hidd
3837
def __repr__(self):
3938
return f"{self.typestring()}: {self.name}::{self.datatype.__name__}"
4039

41-
def sample(self, n_samples: int) -> [T]:
42-
"""Generate a Latin Hypercube Sample of size n_samples according to the
43-
Variable's distribution.
44-
45-
:param int n_samples: The number of samples to generate.
46-
:return: A list of samples
47-
:rtype: List[T]
48-
49-
"""
50-
assert self.distribution is not None, "Sampling requires a distribution to be specified."
51-
lhs = lhsmdu.sample(1, n_samples).tolist()[0]
52-
return lhsmdu.inverseTransformSample(self.distribution, lhs).tolist()
53-
5440
def typestring(self) -> str:
5541
"""Return the type of the Variable, e.g. INPUT, or OUTPUT. Note that
5642
this is NOT the datatype (int, str, etc.).

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ requires-python = ">=3.10"
1515
license = { text = "MIT" }
1616
keywords = ["causal inference", "verification"]
1717
dependencies = [
18-
"fitter~=1.7",
1918
"lifelines~=0.29.0",
20-
"lhsmdu~=1.1",
2119
"networkx>=3.4,<3.5",
2220
"numpy~=1.26",
2321
"pandas>=2.1",

tests/specification_tests/test_variable.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ class TestVariable(unittest.TestCase):
1313
def setUp(self) -> None:
1414
pass
1515

16-
def test_sample_flakey(self):
17-
ip = Input("ip", float, norm)
18-
self.assertGreater(kstest(ip.sample(10), norm.cdf).pvalue, 0.95)
19-
2016
def test_typestring(self):
2117
class Var(Variable):
2218
pass

0 commit comments

Comments
 (0)