upgini 1.2.0a1__py3-none-any.whl → 1.2.2__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/unary.py +20 -5
- {upgini-1.2.0a1.dist-info → upgini-1.2.2.dist-info}/METADATA +1 -1
- {upgini-1.2.0a1.dist-info → upgini-1.2.2.dist-info}/RECORD +6 -6
- {upgini-1.2.0a1.dist-info → upgini-1.2.2.dist-info}/WHEEL +0 -0
- {upgini-1.2.0a1.dist-info → upgini-1.2.2.dist-info}/licenses/LICENSE +0 -0
upgini/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.2.
|
|
1
|
+
__version__ = "1.2.2"
|
upgini/autofe/unary.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Dict, Optional
|
|
2
2
|
import numpy as np
|
|
3
3
|
import pandas as pd
|
|
4
|
-
from sklearn.preprocessing import Normalizer
|
|
5
4
|
|
|
6
5
|
from upgini.autofe.operand import PandasOperand, VectorizableMixin
|
|
7
6
|
|
|
@@ -119,17 +118,33 @@ class Norm(PandasOperand):
|
|
|
119
118
|
name: str = "norm"
|
|
120
119
|
is_unary: bool = True
|
|
121
120
|
output_type: Optional[str] = "float"
|
|
121
|
+
norm: Optional[float] = None
|
|
122
122
|
|
|
123
123
|
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
124
124
|
data_dropna = data.dropna()
|
|
125
125
|
if data_dropna.empty:
|
|
126
126
|
return data
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
if self.norm is not None:
|
|
129
|
+
normalized_data = data / self.norm
|
|
130
|
+
else:
|
|
131
|
+
self.norm = np.sqrt(np.sum(data * data))
|
|
132
|
+
normalized_data = data / self.norm
|
|
133
|
+
|
|
131
134
|
return normalized_data
|
|
132
135
|
|
|
136
|
+
def set_params(self, params: Dict[str, str]):
|
|
137
|
+
super().set_params(params)
|
|
138
|
+
if params is not None and "norm" in params:
|
|
139
|
+
self.norm = params["norm"]
|
|
140
|
+
return self
|
|
141
|
+
|
|
142
|
+
def get_params(self) -> Dict[str, Optional[str]]:
|
|
143
|
+
res = super().get_params()
|
|
144
|
+
if self.norm is not None:
|
|
145
|
+
res["norm"] = self.norm
|
|
146
|
+
return res
|
|
147
|
+
|
|
133
148
|
|
|
134
149
|
class Embeddings(PandasOperand):
|
|
135
150
|
name: str = "emb"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
upgini/__about__.py,sha256=
|
|
1
|
+
upgini/__about__.py,sha256=uuf4VNtTNA93fMhoAur9YafzaKJFnczY-H1SSCSuRVQ,22
|
|
2
2
|
upgini/__init__.py,sha256=Xs0YFVBu1KUdtZzbStGRPQtLt3YLzJnjx5nIUBlX8BE,415
|
|
3
3
|
upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
|
|
4
4
|
upgini/dataset.py,sha256=olZ-OHSfBNoBSCo7R5t7uCLukI2nO7afpx_A-HCiJLk,31067
|
|
@@ -20,7 +20,7 @@ upgini/autofe/date.py,sha256=OpFc3Al0xO3qlESn2Uokfxw51ArVqmh3xngWwdrsaqE,9762
|
|
|
20
20
|
upgini/autofe/feature.py,sha256=gwGWY2UcX_0wHAvfEiu1rRU7GFZyzMWZIaPVcf6kD80,14223
|
|
21
21
|
upgini/autofe/groupby.py,sha256=r-xl_keZZgm_tpiEoDhjYSkT6NHv7a4cRQR4wJ4uCp8,3263
|
|
22
22
|
upgini/autofe/operand.py,sha256=uk883RaNqgXqtkaRqA1re1d9OFnnpv0JVvelYx09Yw0,2943
|
|
23
|
-
upgini/autofe/unary.py,sha256=
|
|
23
|
+
upgini/autofe/unary.py,sha256=aMKgsitM_SnaJWzGfcberTJaqwG7yzAJBkAfsei8pPM,4545
|
|
24
24
|
upgini/autofe/vector.py,sha256=ehcZUDqV71TfbU8EmKfdYp603gS2dJY_-fpr10ho5sI,663
|
|
25
25
|
upgini/data_source/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
upgini/data_source/data_source_publisher.py,sha256=Vg0biG86YB0OEaoxbK9YYrr4yARm11_h3bTWIBgoScA,22115
|
|
@@ -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.
|
|
61
|
-
upgini-1.2.
|
|
62
|
-
upgini-1.2.
|
|
63
|
-
upgini-1.2.
|
|
60
|
+
upgini-1.2.2.dist-info/METADATA,sha256=ebR2S_ee9oODpdVzWouTsjnliU8Cea_hO81mgyebyiE,48228
|
|
61
|
+
upgini-1.2.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
62
|
+
upgini-1.2.2.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
|
63
|
+
upgini-1.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|