upgini 1.1.262a3250.post4__py3-none-any.whl → 1.1.262a3250.post6__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.

@@ -1,5 +1,5 @@
1
1
  from typing import Dict
2
- from upgini.autofe.date import DateDiff, DateDiffFuture
2
+ from upgini.autofe.date import DateDiff, DateDiffType2
3
3
  from upgini.autofe.groupby import GroupByThenAgg, GroupByThenRank
4
4
  from upgini.autofe.operand import Operand
5
5
  from upgini.autofe.unary import Abs, Log, Residual, Sqrt, Square, Sigmoid, Floor, Freq
@@ -37,7 +37,7 @@ ALL_OPERANDS: Dict[str, Operand] = {
37
37
  Operand(name="GroupByThenFreq", output_type="float", is_grouping=True),
38
38
  Sim(),
39
39
  DateDiff(),
40
- DateDiffFuture(),
40
+ DateDiffType2(),
41
41
  ]
42
42
  }
43
43
 
upgini/autofe/date.py CHANGED
@@ -34,8 +34,8 @@ class DateDiff(PandasOperand, DateDiffMixin):
34
34
  return x
35
35
 
36
36
 
37
- class DateDiffFuture(PandasOperand, DateDiffMixin):
38
- name = "date_diff_future"
37
+ class DateDiffType2(PandasOperand, DateDiffMixin):
38
+ name = "date_diff_type2"
39
39
  is_binary = True
40
40
  has_symmetry_importance = True
41
41
  is_vectorizable = False
@@ -43,9 +43,11 @@ class DateDiffFuture(PandasOperand, DateDiffMixin):
43
43
  def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
44
44
  left = self._convert_to_date(left, self.left_unit)
45
45
  right = self._convert_to_date(right, self.right_unit)
46
- future = pd.to_datetime(dict(day=right.dt.day, month=right.dt.month, year=left.dt.year))
46
+ future = right + (left.dt.year - right.dt.year).apply(
47
+ lambda y: np.datetime64("NaT") if np.isnan(y) else pd.tseries.offsets.DateOffset(years=y)
48
+ )
47
49
  before = future[future < left]
48
- future[future < left] = pd.to_datetime(dict(day=before.dt.day, month=before.dt.month, year=before.dt.year + 1))
50
+ future[future < left] = before + pd.tseries.offsets.DateOffset(years=1)
49
51
  diff = (future - left) / np.timedelta64(1, self.diff_unit)
50
52
 
51
53
  return diff
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: upgini
3
- Version: 1.1.262a3250.post4
3
+ Version: 1.1.262a3250.post6
4
4
  Summary: Intelligent data search & enrichment for Machine Learning
5
5
  Home-page: https://upgini.com/
6
6
  Author: Upgini Developers
@@ -12,9 +12,9 @@ upgini/version_validator.py,sha256=rDIncP6BEko4J2F2hUcMOtKm_vZbI4ICWcNcw8hrwM4,1
12
12
  upgini/ads_management/__init__.py,sha256=qzyisOToVRP-tquAJD1PblZhNtMrOB8FiyF9JvfkvgE,50
13
13
  upgini/ads_management/ads_manager.py,sha256=fP4Yqx3h2Snw5X335TbXEwFoupq1RYsE7y0PAduvetU,2646
14
14
  upgini/autofe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- upgini/autofe/all_operands.py,sha256=KWAdcYv6cToc6NZPcCmz6P3N8Nwjp8UqojKuz-f2BZY,1589
15
+ upgini/autofe/all_operands.py,sha256=Nb7Fu4owDNy9gKbJN88c1DxODNtEEGAhiLT1-Eoc9yI,1587
16
16
  upgini/autofe/binary.py,sha256=f8LQqZi9zyaMUAv-jASMmWNA_vT05ncYCjZq0qx3USs,3972
17
- upgini/autofe/date.py,sha256=AC7Gabc7x2n4-_EmO1Q-7ncfCI_5-kPMQ3r3vFgQ1g4,1788
17
+ upgini/autofe/date.py,sha256=lrZ5xpQO2L0c2bPta3EMdd1v5czDH_WY08Ww1s50t4w,1824
18
18
  upgini/autofe/feature.py,sha256=2FQRGtIumNz60hFAjfLReaY18SI7HxzYZOoC5avzSjQ,11847
19
19
  upgini/autofe/groupby.py,sha256=iXRfOmOc84ooSzRhsh9GmmG7rTafX0-ekXko8s9Qs68,3089
20
20
  upgini/autofe/operand.py,sha256=dhtToPDGWtP_0u_RjayUpezJJZAgq_TzNbPH0bI9OXI,2805
@@ -55,8 +55,8 @@ upgini/utils/sklearn_ext.py,sha256=fvuTWJ5AnT3ED9KSaQu_yIgW2JR19hFlaGDoVP3k60g,4
55
55
  upgini/utils/target_utils.py,sha256=WVhhxpQVvnhsDV7ctlds51VFg7hz59S_MFUSoRZFszw,7204
56
56
  upgini/utils/track_info.py,sha256=EPcJ13Jqa17_T0JjM37Ac9kWDz5Zk0GVsIZKutOb8aU,5207
57
57
  upgini/utils/warning_counter.py,sha256=dIWBB4dI5XRRJZudvIlqlIYKEiwLLPcXarsZuYRt338,227
58
- upgini-1.1.262a3250.post4.dist-info/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
59
- upgini-1.1.262a3250.post4.dist-info/METADATA,sha256=XfUGTmbya5IYq0uJYXwhUGxBy9DAnrQyWvNsyiZl6gM,48167
60
- upgini-1.1.262a3250.post4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
61
- upgini-1.1.262a3250.post4.dist-info/top_level.txt,sha256=OFhTGiDIWKl5gFI49qvWq1R9IKflPaE2PekcbDXDtx4,7
62
- upgini-1.1.262a3250.post4.dist-info/RECORD,,
58
+ upgini-1.1.262a3250.post6.dist-info/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
59
+ upgini-1.1.262a3250.post6.dist-info/METADATA,sha256=vjvBbcthjWqPxzG7t44Y92DaJFmITxdVGe5dL-MoFqE,48167
60
+ upgini-1.1.262a3250.post6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
61
+ upgini-1.1.262a3250.post6.dist-info/top_level.txt,sha256=OFhTGiDIWKl5gFI49qvWq1R9IKflPaE2PekcbDXDtx4,7
62
+ upgini-1.1.262a3250.post6.dist-info/RECORD,,