likelihood 1.5.4__py3-none-any.whl → 1.5.6__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.
- likelihood/graph/nn.py +74 -48
- likelihood/models/deep/__init__.py +1 -0
- likelihood/models/deep/autoencoders.py +0 -455
- likelihood/models/deep/predictor.py +804 -0
- likelihood/models/simulation.py +0 -3
- likelihood/tools/impute.py +0 -1
- likelihood/tools/numeric_tools.py +11 -3
- likelihood/tools/tools.py +0 -1
- {likelihood-1.5.4.dist-info → likelihood-1.5.6.dist-info}/METADATA +2 -2
- {likelihood-1.5.4.dist-info → likelihood-1.5.6.dist-info}/RECORD +13 -12
- {likelihood-1.5.4.dist-info → likelihood-1.5.6.dist-info}/WHEEL +1 -1
- {likelihood-1.5.4.dist-info → likelihood-1.5.6.dist-info}/licenses/LICENSE +0 -0
- {likelihood-1.5.4.dist-info → likelihood-1.5.6.dist-info}/top_level.txt +0 -0
likelihood/models/simulation.py
CHANGED
|
@@ -51,7 +51,6 @@ class SimulationEngine(FeatureSelection):
|
|
|
51
51
|
"""
|
|
52
52
|
|
|
53
53
|
def __init__(self, use_scaler: bool = False, **kwargs):
|
|
54
|
-
|
|
55
54
|
self.df = pd.DataFrame()
|
|
56
55
|
self.n_importances = None
|
|
57
56
|
self.use_scaler = use_scaler
|
|
@@ -91,7 +90,6 @@ class SimulationEngine(FeatureSelection):
|
|
|
91
90
|
|
|
92
91
|
# Categorical column
|
|
93
92
|
if quick_encoder != None:
|
|
94
|
-
|
|
95
93
|
one_hot = OneHotEncoder()
|
|
96
94
|
y = one_hot.decode(y)
|
|
97
95
|
encoding_dic = quick_encoder.decoding_list[0]
|
|
@@ -180,7 +178,6 @@ class SimulationEngine(FeatureSelection):
|
|
|
180
178
|
]
|
|
181
179
|
|
|
182
180
|
def _clean_data(self, df: DataFrame) -> DataFrame:
|
|
183
|
-
|
|
184
181
|
df.replace([np.inf, -np.inf], np.nan, inplace=True)
|
|
185
182
|
df.replace(" ", np.nan, inplace=True)
|
|
186
183
|
df = check_nan_inf(df)
|
likelihood/tools/impute.py
CHANGED
|
@@ -71,7 +71,6 @@ class SimpleImputer:
|
|
|
71
71
|
self.cols_transf = X_impute.columns
|
|
72
72
|
for column in X_impute.columns:
|
|
73
73
|
if X_impute[column].isnull().sum() > 0:
|
|
74
|
-
|
|
75
74
|
if not X_impute[column].dtype == "object":
|
|
76
75
|
min_value = self.params[column]["min"]
|
|
77
76
|
max_value = self.params[column]["max"]
|
|
@@ -356,13 +356,16 @@ def find_multiples(target: int) -> tuple[int, int] | None:
|
|
|
356
356
|
Returns
|
|
357
357
|
-------
|
|
358
358
|
tuple[int, int] | None
|
|
359
|
-
|
|
359
|
+
If i and i+1 both divide target, returns (i, i+1).
|
|
360
|
+
Otherwise, returns (i, target // i).
|
|
360
361
|
Returns None if no factors are found.
|
|
361
362
|
"""
|
|
362
363
|
for i in range(2, target + 1):
|
|
363
364
|
if target % i == 0:
|
|
364
|
-
|
|
365
|
-
|
|
365
|
+
if (i + 1) <= target and target % (i + 1) == 0:
|
|
366
|
+
return i + 1, target // (i + 1)
|
|
367
|
+
else:
|
|
368
|
+
return i, target // i
|
|
366
369
|
return None
|
|
367
370
|
|
|
368
371
|
|
|
@@ -396,4 +399,9 @@ if __name__ == "__main__":
|
|
|
396
399
|
df["index"] = ["A", "B", "C", "D"]
|
|
397
400
|
print("New correlation coefficient test for pandas DataFrame")
|
|
398
401
|
values_df = xi_corr(df)
|
|
402
|
+
print(find_multiples(30))
|
|
403
|
+
print(find_multiples(25))
|
|
404
|
+
print(find_multiples(49))
|
|
405
|
+
print(find_multiples(17))
|
|
406
|
+
print(find_multiples(24))
|
|
399
407
|
breakpoint()
|
likelihood/tools/tools.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: likelihood
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.6
|
|
4
4
|
Summary: A package that performs the maximum likelihood algorithm.
|
|
5
5
|
Home-page: https://github.com/jzsmoreno/likelihood/
|
|
6
6
|
Author: J. A. Moreno-Guerra
|
|
@@ -49,7 +49,7 @@ Dynamic: requires-dist
|
|
|
49
49
|
Dynamic: requires-python
|
|
50
50
|
Dynamic: summary
|
|
51
51
|
|
|
52
|
-

|
|
53
53
|
|
|
54
54
|

|
|
55
55
|

|
|
@@ -2,23 +2,24 @@ likelihood/__init__.py,sha256=5C0hapdsk85XZhN_rssRAEFpkRRuKNtj6cyRbqD2_gM,994
|
|
|
2
2
|
likelihood/main.py,sha256=fcCkGOOWKjfvw2tLVqjuKPV8t0rVCIT9FlbYcOv4EYo,7974
|
|
3
3
|
likelihood/graph/__init__.py,sha256=6TuFDfmXTwpLyHl7_KqBfdzW6zqHjGzIFvymjFPlvjI,21
|
|
4
4
|
likelihood/graph/graph.py,sha256=bLrNMvIh7GOTdPTwnNss8oPZ7cbSHQScAsH_ttmVUK0,3294
|
|
5
|
-
likelihood/graph/nn.py,sha256=
|
|
5
|
+
likelihood/graph/nn.py,sha256=uxCxGt1suKmThmEjFope2ew93-WlgvGhgr6RVCHwzhM,11420
|
|
6
6
|
likelihood/models/__init__.py,sha256=e6nB4w47w0Q9DrAFeP3OcUgcoHOtf7Il4mBhgf4AARg,52
|
|
7
7
|
likelihood/models/hmm.py,sha256=0s0gFySH1u4NjRaZDxiZ8oeTaFhFrw1x0GJxwy3dFrA,6253
|
|
8
8
|
likelihood/models/regression.py,sha256=9cakyGlJCEO6WfpoKLh3GxdXQeQp7cUvJIkQ5odT0TA,9404
|
|
9
|
-
likelihood/models/simulation.py,sha256=
|
|
9
|
+
likelihood/models/simulation.py,sha256=6OD2IXAnbctxtOzUJ2b9vKW7_tdGs4dQYmQQShqsioA,8443
|
|
10
10
|
likelihood/models/utils.py,sha256=dvigPi_hxcs5ntfHr7Y1JvP5ULtMW3kkN0nJpS4orE8,1319
|
|
11
|
-
likelihood/models/deep/__init__.py,sha256=
|
|
12
|
-
likelihood/models/deep/autoencoders.py,sha256=
|
|
11
|
+
likelihood/models/deep/__init__.py,sha256=UV_VYhySvrNnB4a0VXYM4wK3KKF7ytjLFFfwvnaZWaA,82
|
|
12
|
+
likelihood/models/deep/autoencoders.py,sha256=9-ZOKbS02tojCufg_Fbd5_Z48pSFSqZnfZZJVohNqdk,29985
|
|
13
13
|
likelihood/models/deep/gan.py,sha256=aoSaNO5LvCU62cjxA0AxvnQvE7NSFtrp1Ta4EDJchpo,10874
|
|
14
|
+
likelihood/models/deep/predictor.py,sha256=Z6GVm9ciz90cMcp4Q6Lvm-_8_9ZOxX1kBquReW2aGqM,27688
|
|
14
15
|
likelihood/tools/__init__.py,sha256=N1IhMDzacsGQT2MIYBMBC0zTxes78vC_0gGrwkuPgmg,78
|
|
15
16
|
likelihood/tools/figures.py,sha256=waF0NHIMrctCmaLhcuz5DMcXyRKynmn6aG0XITYCTLc,10940
|
|
16
|
-
likelihood/tools/impute.py,sha256=
|
|
17
|
+
likelihood/tools/impute.py,sha256=n87Tv-xLUAdPl7BQLFcLWSsXBZbXksahyCayJWMydXc,9485
|
|
17
18
|
likelihood/tools/models_tools.py,sha256=c3-vac-1MYSarYDtfR6XfVC7X_WY9auS7y2_3Z973IQ,8875
|
|
18
|
-
likelihood/tools/numeric_tools.py,sha256=
|
|
19
|
-
likelihood/tools/tools.py,sha256=
|
|
20
|
-
likelihood-1.5.
|
|
21
|
-
likelihood-1.5.
|
|
22
|
-
likelihood-1.5.
|
|
23
|
-
likelihood-1.5.
|
|
24
|
-
likelihood-1.5.
|
|
19
|
+
likelihood/tools/numeric_tools.py,sha256=Hwf-lbqROqPPZ9N7eVzKIDyZxFGQdP53isWxPqpG0eo,12254
|
|
20
|
+
likelihood/tools/tools.py,sha256=FyldbmYNgt4gK89BKgDsya2_EIENwZZwdbBx5pfNhj4,42281
|
|
21
|
+
likelihood-1.5.6.dist-info/licenses/LICENSE,sha256=XWHWt9egYEUHGPTnlcZfJKLPmysacOwdiLj_-J7Z9ew,1066
|
|
22
|
+
likelihood-1.5.6.dist-info/METADATA,sha256=IJzmaE3NJnldHUYUPJNnLjS8cpPYoCKCJ6LfdYJWLxA,2883
|
|
23
|
+
likelihood-1.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
likelihood-1.5.6.dist-info/top_level.txt,sha256=KDiBLr870YTxqLFqObTOSrTK10uw8dFsITSNLlte3PA,11
|
|
25
|
+
likelihood-1.5.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|