TimeFeatures 1.0.11__tar.gz → 1.0.12__tar.gz
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.
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/PKG-INFO +1 -1
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/TimeFeatures.egg-info/PKG-INFO +1 -1
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/setup.py +1 -1
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/owtimefeaturesconstructor.py +45 -1
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/owvardependencygraph.py +5 -1
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/LICENSE +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/README.md +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/TimeFeatures.egg-info/SOURCES.txt +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/TimeFeatures.egg-info/dependency_links.txt +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/TimeFeatures.egg-info/entry_points.txt +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/TimeFeatures.egg-info/top_level.txt +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/setup.cfg +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/__init__.py +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/icons/graphgenerator.svg +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/icons/savedatadb.svg +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/icons/timefeature-xs.svg +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/icons/timefeature.svg +0 -0
- {TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/owsavetodb.py +0 -0
|
@@ -21,7 +21,7 @@ setup(name="TimeFeatures",
|
|
|
21
21
|
packages=["timefeatures.widgets"],
|
|
22
22
|
package_data={"timefeatures.widgets": ["icons/*.svg", "icons/*.png"]},
|
|
23
23
|
entry_points={"orange.widgets": "Time-Features = timefeatures.widgets"},
|
|
24
|
-
version="1.0.
|
|
24
|
+
version="1.0.12",
|
|
25
25
|
author="Alejandro Rivas García",
|
|
26
26
|
author_email="alejandrorivasgarcia@gmail.com",
|
|
27
27
|
keywords=[
|
{TimeFeatures-1.0.11 → TimeFeatures-1.0.12}/timefeatures/widgets/owtimefeaturesconstructor.py
RENAMED
|
@@ -819,6 +819,7 @@ class owtimefeaturesconstructor(OWWidget, ConcurrentWidgetMixin):
|
|
|
819
819
|
|
|
820
820
|
class Inputs:
|
|
821
821
|
data = Input("Data", Orange.data.Table)
|
|
822
|
+
expressions = Input("Variable Definitions", Orange.data.Table)
|
|
822
823
|
|
|
823
824
|
class Outputs:
|
|
824
825
|
data = Output("Data", Orange.data.Table)
|
|
@@ -1103,6 +1104,35 @@ class owtimefeaturesconstructor(OWWidget, ConcurrentWidgetMixin):
|
|
|
1103
1104
|
self.fix_button.setHidden(not self.expressions_with_values)
|
|
1104
1105
|
self.editorstack.setEnabled(self.currentIndex >= 0)
|
|
1105
1106
|
|
|
1107
|
+
@Inputs.expressions
|
|
1108
|
+
@check_sql_input
|
|
1109
|
+
def setExpressions(self, expressions=None):
|
|
1110
|
+
|
|
1111
|
+
self.expressions = expressions
|
|
1112
|
+
|
|
1113
|
+
if self.expressions is None:
|
|
1114
|
+
self.Warning.clear()
|
|
1115
|
+
self.Error.transform_error.clear()
|
|
1116
|
+
|
|
1117
|
+
if self.data is not None and self.expressions is not None:
|
|
1118
|
+
if self.expressions is not None:
|
|
1119
|
+
if len(self.expressions.domain) >= 2 and (
|
|
1120
|
+
self.expressions.domain[0].name != "Variable" or self.expressions.domain[1].name != "Expression"):
|
|
1121
|
+
self.Warning.table_warning()
|
|
1122
|
+
else:
|
|
1123
|
+
self.Error.transform_error.clear()
|
|
1124
|
+
for datos in reversed(self.expressions):
|
|
1125
|
+
if not math.isnan(datos[1]) and str(datos[1]) != "NaN":
|
|
1126
|
+
desc = ContinuousDescriptor(
|
|
1127
|
+
name=str(datos[0]),
|
|
1128
|
+
expression=str(datos[1]),
|
|
1129
|
+
meta=False,
|
|
1130
|
+
number_of_decimals=3,
|
|
1131
|
+
)
|
|
1132
|
+
self.addFeature(desc)
|
|
1133
|
+
else:
|
|
1134
|
+
self.Error.transform_error("There is not data input.")
|
|
1135
|
+
|
|
1106
1136
|
def handleNewSignals(self):
|
|
1107
1137
|
if self.data is not None:
|
|
1108
1138
|
self.apply()
|
|
@@ -1188,6 +1218,14 @@ class owtimefeaturesconstructor(OWWidget, ConcurrentWidgetMixin):
|
|
|
1188
1218
|
desc = self._validate_descriptors(desc)
|
|
1189
1219
|
self.start(run, self.data, desc, self.expressions_with_values)
|
|
1190
1220
|
|
|
1221
|
+
'''
|
|
1222
|
+
INTENTO DE PODER USAR VARIABLES NO CONTENIDAS EN EL DATASET ORIGINAL.
|
|
1223
|
+
|
|
1224
|
+
desc = list(self.featuremodel)
|
|
1225
|
+
for d in desc:
|
|
1226
|
+
self.start(run, self.data, self._validate_descriptors(d), self.expressions_with_values)'''
|
|
1227
|
+
|
|
1228
|
+
|
|
1191
1229
|
def on_done(self, result: "Result") -> None:
|
|
1192
1230
|
data, attrs, desc = result.data, result.attributes, result.desc
|
|
1193
1231
|
disc_attrs_not_ok = self.check_attrs_values(
|
|
@@ -1361,6 +1399,7 @@ class Result:
|
|
|
1361
1399
|
def run(data: Table, desc, use_values, task: TaskState) -> Result:
|
|
1362
1400
|
if task.is_interruption_requested():
|
|
1363
1401
|
raise CancelledError # pragma: no cover
|
|
1402
|
+
|
|
1364
1403
|
new_variables, new_metas = construct_variables(desc, data, use_values)
|
|
1365
1404
|
# Explicit cancellation point after `construct_variables` which can
|
|
1366
1405
|
# already run `compute_value`.
|
|
@@ -1374,10 +1413,14 @@ def run(data: Table, desc, use_values, task: TaskState) -> Result:
|
|
|
1374
1413
|
try:
|
|
1375
1414
|
for variable in new_variables:
|
|
1376
1415
|
variable.compute_value.mask_exceptions = False
|
|
1377
|
-
|
|
1416
|
+
try:
|
|
1417
|
+
data = data.transform(new_domain)
|
|
1418
|
+
except:
|
|
1419
|
+
raise TypeError("One or more variables were not found.")
|
|
1378
1420
|
finally:
|
|
1379
1421
|
for variable in new_variables:
|
|
1380
1422
|
variable.compute_value.mask_exceptions = True
|
|
1423
|
+
|
|
1381
1424
|
return Result(data, new_variables, new_metas, desc)
|
|
1382
1425
|
|
|
1383
1426
|
|
|
@@ -1456,6 +1499,7 @@ def validate_exp(exp):
|
|
|
1456
1499
|
|
|
1457
1500
|
def construct_variables(descriptions, data, use_values=False):
|
|
1458
1501
|
# subs
|
|
1502
|
+
|
|
1459
1503
|
variables = []
|
|
1460
1504
|
metas = []
|
|
1461
1505
|
source_vars = data.domain.variables + data.domain.metas
|
|
@@ -17,7 +17,11 @@ from PyQt5.QtWidgets import QPushButton, QVBoxLayout, QHBoxLayout
|
|
|
17
17
|
from orangecontrib.network import Network
|
|
18
18
|
from orangewidget.utils.signals import Input
|
|
19
19
|
|
|
20
|
-
'''
|
|
20
|
+
'''
|
|
21
|
+
|
|
22
|
+
CALCULO DE PONDERACIONES PARA LOS PESOS DE LAS ARISTAS.
|
|
23
|
+
|
|
24
|
+
def calculate_weight(expression):
|
|
21
25
|
# Encontrar todas las coincidencias con las funciones temporales y almacenarlas
|
|
22
26
|
matches_shift = list(re.finditer(r'shift\(([^,]+),([-+]?\d+)\)', expression))
|
|
23
27
|
matches_sum = list(re.finditer(r'sum\(([^,]+),([-+]?\d+),([-+]?\d+)\)', expression))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|