upgini 1.2.86a1__py3-none-any.whl → 1.2.86.dev1__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 +1 -1
- upgini/autofe/feature.py +6 -1
- upgini/utils/datetime_utils.py +17 -17
- upgini/utils/email_utils.py +5 -5
- {upgini-1.2.86a1.dist-info → upgini-1.2.86.dev1.dist-info}/METADATA +1 -1
- {upgini-1.2.86a1.dist-info → upgini-1.2.86.dev1.dist-info}/RECORD +8 -8
- {upgini-1.2.86a1.dist-info → upgini-1.2.86.dev1.dist-info}/WHEEL +1 -1
- {upgini-1.2.86a1.dist-info → upgini-1.2.86.dev1.dist-info}/licenses/LICENSE +0 -0
upgini/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.2.
|
1
|
+
__version__ = "1.2.86.dev1"
|
upgini/autofe/feature.py
CHANGED
@@ -8,6 +8,7 @@ from pandas._typing import DtypeObj
|
|
8
8
|
|
9
9
|
from upgini.autofe.all_operators import find_op
|
10
10
|
from upgini.autofe.operator import Operator, PandasOperator
|
11
|
+
from upgini.autofe.timeseries.base import TimeSeriesBase
|
11
12
|
from upgini.autofe.utils import pydantic_dump_method, pydantic_parse_method
|
12
13
|
|
13
14
|
|
@@ -162,7 +163,11 @@ class Feature:
|
|
162
163
|
if self.cached_display_name is not None and cache:
|
163
164
|
return self.cached_display_name
|
164
165
|
|
165
|
-
should_stack_op =
|
166
|
+
should_stack_op = (
|
167
|
+
not isinstance(self.children[-1], Column)
|
168
|
+
if self.op.is_unary or isinstance(self.op, TimeSeriesBase)
|
169
|
+
else False
|
170
|
+
)
|
166
171
|
components = []
|
167
172
|
|
168
173
|
if self.alias:
|
upgini/utils/datetime_utils.py
CHANGED
@@ -121,31 +121,31 @@ class DateTimeSearchKeyConverter:
|
|
121
121
|
df[cos_feature] = np.cos(2 * np.pi * df[column] / period)
|
122
122
|
self.generated_features.append(cos_feature)
|
123
123
|
|
124
|
-
df["quarter"] = df[self.date_column].dt.quarter
|
124
|
+
# df["quarter"] = df[self.date_column].dt.quarter
|
125
125
|
|
126
|
-
# Calculate the start date of the quarter for each timestamp
|
127
|
-
df["quarter_start"] = df[self.date_column].dt.to_period("Q").dt.start_time
|
126
|
+
# # Calculate the start date of the quarter for each timestamp
|
127
|
+
# df["quarter_start"] = df[self.date_column].dt.to_period("Q").dt.start_time
|
128
128
|
|
129
|
-
# Calculate the day in the quarter
|
130
|
-
df["day_in_quarter"] = (df[self.date_column] - df["quarter_start"]).dt.days + 1
|
129
|
+
# # Calculate the day in the quarter
|
130
|
+
# df["day_in_quarter"] = (df[self.date_column] - df["quarter_start"]).dt.days + 1
|
131
131
|
|
132
|
-
# Vectorized calculation of days_in_quarter
|
133
|
-
quarter = df["quarter"]
|
134
|
-
start = df["quarter_start"]
|
135
|
-
year = start.dt.year
|
136
|
-
month = start.dt.month
|
132
|
+
# # Vectorized calculation of days_in_quarter
|
133
|
+
# quarter = df["quarter"]
|
134
|
+
# start = df["quarter_start"]
|
135
|
+
# year = start.dt.year
|
136
|
+
# month = start.dt.month
|
137
137
|
|
138
|
-
quarter_end_year = np.where(quarter == 4, year + 1, year)
|
139
|
-
quarter_end_month = np.where(quarter == 4, 1, month + 3)
|
138
|
+
# quarter_end_year = np.where(quarter == 4, year + 1, year)
|
139
|
+
# quarter_end_month = np.where(quarter == 4, 1, month + 3)
|
140
140
|
|
141
|
-
end = pd.to_datetime({"year": quarter_end_year, "month": quarter_end_month, "day": 1})
|
142
|
-
end.index = df.index
|
141
|
+
# end = pd.to_datetime({"year": quarter_end_year, "month": quarter_end_month, "day": 1})
|
142
|
+
# end.index = df.index
|
143
143
|
|
144
|
-
df["days_in_quarter"] = (end - start).dt.days
|
144
|
+
# df["days_in_quarter"] = (end - start).dt.days
|
145
145
|
|
146
|
-
add_cyclical_features(df, "day_in_quarter", df["days_in_quarter"]) # Days in the quarter
|
146
|
+
# add_cyclical_features(df, "day_in_quarter", df["days_in_quarter"]) # Days in the quarter
|
147
147
|
|
148
|
-
df.drop(columns=["quarter", "quarter_start", "day_in_quarter", "days_in_quarter"], inplace=True)
|
148
|
+
# df.drop(columns=["quarter", "quarter_start", "day_in_quarter", "days_in_quarter"], inplace=True)
|
149
149
|
|
150
150
|
df[seconds] = (df[self.date_column] - df[self.date_column].dt.floor("D")).dt.seconds
|
151
151
|
|
upgini/utils/email_utils.py
CHANGED
@@ -36,11 +36,11 @@ class EmailDomainGenerator:
|
|
36
36
|
self.generated_features = []
|
37
37
|
|
38
38
|
def generate(self, df: pd.DataFrame) -> pd.DataFrame:
|
39
|
-
for email_col in self.email_columns:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
# for email_col in self.email_columns:
|
40
|
+
# domain_feature = email_col + self.DOMAIN_SUFFIX
|
41
|
+
# if domain_feature not in df.columns:
|
42
|
+
# df[domain_feature] = df[email_col].apply(self._email_to_domain).astype("string")
|
43
|
+
# self.generated_features.append(domain_feature)
|
44
44
|
return df
|
45
45
|
|
46
46
|
@staticmethod
|
@@ -1,4 +1,4 @@
|
|
1
|
-
upgini/__about__.py,sha256=
|
1
|
+
upgini/__about__.py,sha256=x1iyqkRuCxNu5kTIKv8yNfzxxa0JD4GnBFMpKHM2wRM,28
|
2
2
|
upgini/__init__.py,sha256=LXSfTNU0HnlOkE69VCxkgIKDhWP-JFo_eBQ71OxTr5Y,261
|
3
3
|
upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
|
4
4
|
upgini/dataset.py,sha256=fRtqSkXNONLnPe6cCL967GMt349FTIpXzy_u8LUKncw,35354
|
@@ -16,7 +16,7 @@ upgini/autofe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
upgini/autofe/all_operators.py,sha256=rdjF5eaE4bC6Q4eu_el5Z7ekYt8DjOFermz2bePPbUc,333
|
17
17
|
upgini/autofe/binary.py,sha256=oOEECc4nRzZN2tYaiqx8F2XHnfWpk1bVvb7ZkZJ0lO8,7709
|
18
18
|
upgini/autofe/date.py,sha256=MM1S-6imNSzCDOhbNnmsc_bwSqUWBcS8vWAdHF8j1kY,11134
|
19
|
-
upgini/autofe/feature.py,sha256=
|
19
|
+
upgini/autofe/feature.py,sha256=cu4xXjzVVF13ZV4RxuTrysK2qCfezlRCMOzCKRo1rNs,15558
|
20
20
|
upgini/autofe/groupby.py,sha256=IYmQV9uoCdRcpkeWZj_kI3ObzoNCNx3ff3h8sTL01tk,3603
|
21
21
|
upgini/autofe/operator.py,sha256=EOffJw6vKXpEh5yymqb1RFNJPxGxmnHdFRo9dB5SCFo,4969
|
22
22
|
upgini/autofe/unary.py,sha256=Sx11IoHRh5nwyALzjgG9GQOrVNIs8NZ1JzunAJuN66A,5731
|
@@ -51,10 +51,10 @@ upgini/utils/blocked_time_series.py,sha256=Uqr3vp4YqNclj2-PzEYqVy763GSXHn86sbpIl
|
|
51
51
|
upgini/utils/country_utils.py,sha256=lY-eXWwFVegdVENFttbvLcgGDjFO17Sex8hd2PyJaRk,6937
|
52
52
|
upgini/utils/custom_loss_utils.py,sha256=kieNZYBYZm5ZGBltF1F_jOSF4ea6C29rYuCyiDcqVNY,3857
|
53
53
|
upgini/utils/cv_utils.py,sha256=w6FQb9nO8BWDx88EF83NpjPLarK4eR4ia0Wg0kLBJC4,3525
|
54
|
-
upgini/utils/datetime_utils.py,sha256=
|
54
|
+
upgini/utils/datetime_utils.py,sha256=FKeCc5PQnhMSyLiw8nuiMccmMkrUCj4zCIgpZnffpbU,13569
|
55
55
|
upgini/utils/deduplicate_utils.py,sha256=AcMLoObMjhOTQ_fMS1LWy0GKp6WXnZ-FNux_8V3nbZU,8914
|
56
56
|
upgini/utils/display_utils.py,sha256=hAeWEcJtPDg8fAVcMNrNB-azFD2WJp1nvbPAhR7SeP4,12071
|
57
|
-
upgini/utils/email_utils.py,sha256=
|
57
|
+
upgini/utils/email_utils.py,sha256=TZ_2UL0T7rzXG5WNu3dLUReY15qt6PozEGY_4cyuhdM,5287
|
58
58
|
upgini/utils/fallback_progress_bar.py,sha256=PDaKb8dYpVZaWMroNcOHsTc3pSjgi9mOm0--cOFTwJ0,1074
|
59
59
|
upgini/utils/feature_info.py,sha256=Q9HN6A-fvfVD-irFWrmOqqZG9RsUSvh5MTY_k0xu-tE,7287
|
60
60
|
upgini/utils/features_validator.py,sha256=lEfmk4DoxZ4ooOE1HC0ZXtUb_lFKRFHIrnFULZ4_rL8,3746
|
@@ -70,7 +70,7 @@ upgini/utils/target_utils.py,sha256=LRN840dzx78-wg7ftdxAkp2c1eu8-JDvkACiRThm4HE,
|
|
70
70
|
upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
|
71
71
|
upgini/utils/ts_utils.py,sha256=26vhC0pN7vLXK6R09EEkMK3Lwb9IVPH7LRdqFIQ3kPs,1383
|
72
72
|
upgini/utils/warning_counter.py,sha256=-GRY8EUggEBKODPSuXAkHn9KnEQwAORC0mmz_tim-PM,254
|
73
|
-
upgini-1.2.
|
74
|
-
upgini-1.2.
|
75
|
-
upgini-1.2.
|
76
|
-
upgini-1.2.
|
73
|
+
upgini-1.2.86.dev1.dist-info/METADATA,sha256=WbxVPEQbJJMxYSDRTiJAdevnfltYEQ8WjxyGgVv7vaE,49167
|
74
|
+
upgini-1.2.86.dev1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
75
|
+
upgini-1.2.86.dev1.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
76
|
+
upgini-1.2.86.dev1.dist-info/RECORD,,
|
File without changes
|