Skip to content
Snippets Groups Projects
Commit 2fc6a3d7 authored by dmt's avatar dmt
Browse files

Initialize recontr. request with either conceptual or procedural models.

parent a6a1b1de
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,9 @@ from cml.shared.request import (
from cml.ports.ml_adapter import (
KernelDensityEstimator,
find_relative_extrema,
Autoencoder
Autoencoder,
ReconstructionConceptualMLModel,
ReconstructionProceduralMLModel
)
......@@ -119,9 +121,19 @@ def feature_selection(filter_ml_model, embedded_ml_model):
return feature_selection_usecase.execute(feature_selection_req)
def reconstruction(*args, **kwargs):
def reconstruction(reconstruction_type, *args, **kwargs):
# TODO (dmt): Create ReconstructionModels depending on the sklearn
# models.
if reconstruction_type == "conceptual":
ml_models = [ReconstructionConceptualMLModel(model) for model in args]
elif reconstruction_type == "procedural":
ml_models = [ReconstructionProceduralMLModel(model) for model in args]
else:
raise ValueError("reconstruction_type is wrong.")
settings = specific_settings_factory("reconstruction")
reconstruction_req = ReconstructionRequest(settings)
reconstruction_req = ReconstructionRequest(settings,
ml_models,
reconstruction_type)
reconstruction_usecase = ReconstructionUsecase()
return reconstruction_usecase.execute(reconstruction_req)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment