Commit 2ba74222 authored by Uwe Köckemann's avatar Uwe Köckemann
Browse files

Added jupyter notebook for MT intergraion

parent b255052b
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,6 +14,7 @@ class MovingTarget(ABC):
def __init__(self, ML, n=10):
self.n = n
self.ML = ML
self.y_k_history = []
def apply(self, args):
ml_problem = args[Symbolic("examples")]
......@@ -33,6 +34,7 @@ class MovingTarget(ABC):
y_k = self.ML.apply(ml_problem)
for i in range(0, self.n):
sat_C = self.check_constraints_ext(M, C, (d[0], np.array(y_k.unpack())))
if not sat_C:
......@@ -41,10 +43,10 @@ class MovingTarget(ABC):
self.m_beta(M, L, y_k, beta)
z_k = self.solve_ext(M)
ml_problem = self.assemble_ml_problem(ml_problem, z_k)
y_k = self.ML.apply(ml_problem)
return y_k
def add_constraints(self, M, C, y_s):
......@@ -71,7 +73,6 @@ class MovingTarget(ABC):
"""Initialize external solver and return blank model."""
def convert_data(self, current):
label = current[Symbolic('label')]
attributes = current[Symbolic('attributes')]
data = current[Symbolic('data')]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment