upgini 1.2.13a1__py3-none-any.whl → 1.2.13a3__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.

Potentially problematic release.


This version of upgini might be problematic. Click here for more details.

upgini/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.2.13a1"
1
+ __version__ = "1.2.13a3"
upgini/autofe/binary.py CHANGED
@@ -140,19 +140,27 @@ class Distance(PandasOperand):
140
140
  has_symmetry_importance: bool = True
141
141
 
142
142
  def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
143
+ # Handle None values by replacing them with 0 in the dot product and norm calculations
144
+ left = left.apply(lambda x: np.array(x) if x is not None else np.zeros_like(right[0]))
145
+ right = right.apply(lambda x: np.array(x) if x is not None else np.zeros_like(left[0]))
146
+
143
147
  return pd.Series(
144
148
  1 - self.__dot(left, right) / (self.__norm(left) * self.__norm(right)), index=left.index
145
149
  )
146
150
 
147
- # row-wise dot product
151
+ # row-wise dot product, handling None values
148
152
  def __dot(self, left: pd.Series, right: pd.Series) -> pd.Series:
149
- left = left.apply(lambda x: np.array(x))
150
- right = right.apply(lambda x: np.array(x))
151
- res = (left.dropna() * right.dropna()).apply(np.sum)
152
- res = res.reindex(left.index.union(right.index))
153
+ left = left.apply(lambda x: np.array(x) if x is not None else np.zeros_like(right[0]))
154
+ right = right.apply(lambda x: np.array(x) if x is not None else np.zeros_like(left[0]))
155
+
156
+ # Perform element-wise multiplication and handle missing values
157
+ res = (left * right).apply(np.sum)
153
158
  return res
154
159
 
160
+ # Calculate the norm of a vector, handling None values
155
161
  def __norm(self, vector: pd.Series) -> pd.Series:
162
+ # Replace None with a zero vector
163
+ vector = vector.apply(lambda x: np.array(x) if x is not None else np.zeros_like(vector[0]))
156
164
  return np.sqrt(self.__dot(vector, vector))
157
165
 
158
166
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: upgini
3
- Version: 1.2.13a1
3
+ Version: 1.2.13a3
4
4
  Summary: Intelligent data search & enrichment for Machine Learning
5
5
  Project-URL: Bug Reports, https://github.com/upgini/upgini/issues
6
6
  Project-URL: Homepage, https://upgini.com/
@@ -1,4 +1,4 @@
1
- upgini/__about__.py,sha256=NeqKjXeod2KcYoaB6esY6NUK6smRiIRoDjxdFlYtelY,25
1
+ upgini/__about__.py,sha256=-7DJQLGOhF0r2W7BFtcYxOGA1U0eO5UUMqJzRXTeSrI,25
2
2
  upgini/__init__.py,sha256=M64LwQTBa-5Jz24Zm2h8rWwlKQQ1J8nP7gGgIciS0WU,589
3
3
  upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
4
4
  upgini/dataset.py,sha256=olZ-OHSfBNoBSCo7R5t7uCLukI2nO7afpx_A-HCiJLk,31067
@@ -15,7 +15,7 @@ upgini/ads_management/__init__.py,sha256=qzyisOToVRP-tquAJD1PblZhNtMrOB8FiyF9Jvf
15
15
  upgini/ads_management/ads_manager.py,sha256=igVbN2jz80Umb2BUJixmJVj-zx8unoKpecVo-R-nGdw,2648
16
16
  upgini/autofe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  upgini/autofe/all_operands.py,sha256=cCCB44qvkmuWyiRM5Xykx8tkHPIjQthrWyj67STWN80,2578
18
- upgini/autofe/binary.py,sha256=TRjEdxsfyPY5E8ksYfdKMmU6GtvALfGFPNVIG7DBhzM,7520
18
+ upgini/autofe/binary.py,sha256=lb_xRCeJ25X5oJZ-2ER50HcVGpENvTlSoq7bOpcreno,8119
19
19
  upgini/autofe/date.py,sha256=OpFc3Al0xO3qlESn2Uokfxw51ArVqmh3xngWwdrsaqE,9762
20
20
  upgini/autofe/feature.py,sha256=eL7wABUhDKZzv3E-RPJNcyGwSfB0UptcfU2RbvsOks4,15082
21
21
  upgini/autofe/groupby.py,sha256=r-xl_keZZgm_tpiEoDhjYSkT6NHv7a4cRQR4wJ4uCp8,3263
@@ -57,7 +57,7 @@ upgini/utils/sklearn_ext.py,sha256=13jQS_k7v0aUtudXV6nGUEWjttPQzAW9AFYL5wgEz9k,4
57
57
  upgini/utils/target_utils.py,sha256=BVtDmrmFMKerSUWaNOIEdzsYHIFiODdpnWbE50QDPDc,7864
58
58
  upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
59
59
  upgini/utils/warning_counter.py,sha256=dIWBB4dI5XRRJZudvIlqlIYKEiwLLPcXarsZuYRt338,227
60
- upgini-1.2.13a1.dist-info/METADATA,sha256=lrKOQP58Sj3YuYsO-lTFB3aq2UpAjJkXij-17FlqPoA,48579
61
- upgini-1.2.13a1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
62
- upgini-1.2.13a1.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
63
- upgini-1.2.13a1.dist-info/RECORD,,
60
+ upgini-1.2.13a3.dist-info/METADATA,sha256=ChCSigDvsmEioMfptnn7ngsRaWHChRyCmVI-vCnXNxA,48579
61
+ upgini-1.2.13a3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
62
+ upgini-1.2.13a3.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
63
+ upgini-1.2.13a3.dist-info/RECORD,,