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.
@@ -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)
@@ -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
- A tuple containing two factors of the target number.
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
- factor = target // i
365
- return i, factor
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
@@ -1153,7 +1153,6 @@ class FeatureSelection:
1153
1153
  return feature_string + "} "
1154
1154
 
1155
1155
  def _load_data(self, dataset: DataFrame):
1156
-
1157
1156
  if len(self.not_features) > 0:
1158
1157
  self.X = dataset.drop(columns=self.not_features)
1159
1158
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: likelihood
3
- Version: 1.5.4
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
- ![likelihood](https://raw.githubusercontent.com/RodolfoFerro/likelihood/main/likelihood.png)
52
+ ![likelihood](https://raw.githubusercontent.com/jzsmoreno/likelihood/main/likelihood.png)
53
53
 
54
54
  ![GitHub last commit](https://img.shields.io/github/last-commit/jzsmoreno/likelihood?style=for-the-badge)
55
55
  ![GitHub repo size](https://img.shields.io/github/repo-size/jzsmoreno/likelihood?style=for-the-badge)
@@ -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=EaMmboKriCFnkP48_HLGRAsOZSWxwUlMG0WDGZ4ey1o,11035
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=IkYGA6-L1LvSnIlyrVWTzQQu-JnfXml5Tewt-GC05PY,8446
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=m607FtMP2gAfPtM0mssFXMKyKOqoeYskZ_xIC6dKhr4,47
12
- likelihood/models/deep/autoencoders.py,sha256=0EIZwDNlZ9NCfQbhQ_KdXkkRwIjUEU-jk0l0u-J1wmA,44212
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=BwBVFSQkG3uWsZEk1THTmqZc3YhHlDhMXgKIV3sx5Lg,9486
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=OelCF45QO-zhanX3GmfcdYMfUZxYt353oJ8_gPEdWss,11959
19
- likelihood/tools/tools.py,sha256=vlQ-peK_z5-MLVnStxlBdl-NfmF6ILxZ6LhBd4K77JI,42282
20
- likelihood-1.5.4.dist-info/licenses/LICENSE,sha256=XWHWt9egYEUHGPTnlcZfJKLPmysacOwdiLj_-J7Z9ew,1066
21
- likelihood-1.5.4.dist-info/METADATA,sha256=a2NZgFoz6h9JzzCHpnRV3Pgt_ZPjLefearwKN0H2RZ8,2886
22
- likelihood-1.5.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
23
- likelihood-1.5.4.dist-info/top_level.txt,sha256=KDiBLr870YTxqLFqObTOSrTK10uw8dFsITSNLlte3PA,11
24
- likelihood-1.5.4.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5