Skip to content

Commit b39a9b7

Browse files
committed
Regression eval test
1 parent fa0501e commit b39a9b7

1 file changed

Lines changed: 32 additions & 2 deletions

File tree

core/tests/test_regression.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import unittest
2+
13
from django.test import TestCase
24

35
from core.core import calculate
4-
from core.tests.test_prepare import split_double, add_default_config
6+
from core.tests.test_prepare import split_double, add_default_config, split_single
57
from encoders.encoding_container import EncodingContainer, SIMPLE_INDEX, ZERO_PADDING, BOOLEAN, COMPLEX, LAST_PAYLOAD
6-
from encoders.label_container import LabelContainer
8+
from encoders.label_container import LabelContainer, REMAINING_TIME
79

810

911
class TestRegression(TestCase):
@@ -74,3 +76,31 @@ def test_reg_lasso_last_payload(self):
7476
job['encoding'] = EncodingContainer(LAST_PAYLOAD, padding=ZERO_PADDING)
7577
add_default_config(job)
7678
calculate(job)
79+
80+
81+
@unittest.skip("evaluation test not needed normally")
82+
class TestEvaluation(TestCase):
83+
@property
84+
def get_job(self):
85+
json = dict()
86+
json["clustering"] = "noCluster"
87+
json["split"] = split_single()
88+
json['split']['original_log_path'] = 'log_cache/Sepsis Cases - Event Log.xes'
89+
json["method"] = "lasso"
90+
json["encoding"] = EncodingContainer(COMPLEX, padding=ZERO_PADDING, prefix_length=16)
91+
json["label"] = LabelContainer(REMAINING_TIME)
92+
json["type"] = "regression"
93+
return json
94+
95+
def test_reg_lasso(self):
96+
job = self.get_job
97+
add_default_config(job)
98+
calculate(job)
99+
100+
def test_reg_intercase(self):
101+
print('interace')
102+
job = self.get_job
103+
job["label"] = LabelContainer(REMAINING_TIME, add_resources_used=True, add_new_traces=True,
104+
add_executed_events=True)
105+
add_default_config(job)
106+
calculate(job)

0 commit comments

Comments
 (0)