diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 77d58de4..56b43817 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,8 +3,8 @@
-
-
+
+
@@ -40,26 +40,26 @@
- {
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "WebServerToolWindowFactoryState": "false",
- "last_opened_file_path": "C:/Users/nquen/switchdrive/MST_MasterThesis/imputegap/imputegap/algorithms",
- "nodejs_package_manager_path": "npm",
- "settings.editor.selected.configurable": "preferences.pluginManager",
- "vue.rearranger.settings.migration": "true"
+
+}]]>
+
-
@@ -70,7 +70,7 @@
-
+
@@ -137,7 +137,7 @@
-
+
@@ -150,7 +150,7 @@
-
+
@@ -175,19 +175,19 @@
+
-
+
-
@@ -273,7 +273,7 @@
-
+
@@ -301,7 +301,7 @@
-
+
@@ -315,6 +315,7 @@
+
diff --git a/README.md b/README.md
index 9a4826ef..06831733 100644
--- a/README.md
+++ b/README.md
@@ -147,7 +147,7 @@ from imputegap.tools import utils
ts_1 = TimeSeries()
# 2. load the timeseries from file or from the code
-ts_1.load_timeseries(utils.search_path("eeg-test"))
+ts_1.load_timeseries(utils.search_path("eeg-alcohol"))
ts_1.normalize(normalizer="z_score")
# [OPTIONAL] you can plot your raw data / print the information
@@ -178,7 +178,7 @@ from imputegap.tools import utils
ts_1 = TimeSeries()
# 2. load the timeseries from file or from the code
-ts_1.load_timeseries(utils.search_path("eeg-test"))
+ts_1.load_timeseries(utils.search_path("eeg-alcohol"))
ts_1.normalize(normalizer="min_max")
# 3. contamination of the data with MCAR scenario
@@ -213,7 +213,7 @@ from imputegap.tools import utils
ts_1 = TimeSeries()
# 2. load the timeseries from file or from the code
-ts_1.load_timeseries(utils.search_path("eeg-test"))
+ts_1.load_timeseries(utils.search_path("eeg-alcohol"))
ts_1.normalize(normalizer="min_max")
# 3. contamination of the data
@@ -262,7 +262,7 @@ from imputegap.tools import utils
ts_1 = TimeSeries()
# 2. load the timeseries from file or from the code
-ts_1.load_timeseries(utils.search_path("eeg-test"))
+ts_1.load_timeseries(utils.search_path("eeg-alcohol"))
ts_1.normalize(normalizer="min_max")
# 3. contamination of the data
@@ -280,7 +280,7 @@ cdrec.score(ts_1.data, cdrec.imputed_matrix)
# 6. [OPTIONAL] display the results
ts_1.print_results(cdrec.metrics)
ts_1.plot(raw_data=ts_1.data, infected_data=infected_data, imputed_data=cdrec.imputed_matrix, title="imputation",
- max_series=1, save_path="./assets", display=True)
+ max_series=1, save_path="./imputegap/assets", display=True)
# 7. [OPTIONAL] save hyperparameters
utils.save_optimization(optimal_params=cdrec.parameters, algorithm="cdrec", dataset="eeg", optimizer="b")
@@ -312,10 +312,10 @@ from imputegap.tools import utils
ts_1 = TimeSeries()
# 2. load the timeseries from file or from the code
-ts_1.load_timeseries(utils.search_path("eeg-test"))
+ts_1.load_timeseries(utils.search_path("eeg-alcohol"))
# 3. call the explanation of your dataset with a specific algorithm to gain insight on the Imputation results
-shap_values, shap_details = Explainer.shap_explainer(raw_data=ts_1.data, file_name="eeg-test", algorithm="cdrec")
+shap_values, shap_details = Explainer.shap_explainer(raw_data=ts_1.data, file_name="eeg-alcohol", algorithm="cdrec")
# [OPTIONAL] print the results with the impact of each feature.
Explainer.print(shap_values, shap_details)
diff --git a/imputegap/recovery/__pycache__/manager.cpython-312.pyc b/imputegap/recovery/__pycache__/manager.cpython-312.pyc
index fa177707..44a25bd3 100644
Binary files a/imputegap/recovery/__pycache__/manager.cpython-312.pyc and b/imputegap/recovery/__pycache__/manager.cpython-312.pyc differ
diff --git a/imputegap/recovery/manager.py b/imputegap/recovery/manager.py
index fa191c81..0a6d36e6 100644
--- a/imputegap/recovery/manager.py
+++ b/imputegap/recovery/manager.py
@@ -15,17 +15,11 @@
print("Running in a headless environment or CI. Using Agg backend.")
else:
try:
- # Attempt to use TkAgg if a display is available and we're not in CI
matplotlib.use("TkAgg")
- if importlib.util.find_spec("tkinter") is not None:
- print("tkinter is available.")
- else:
+ if importlib.util.find_spec("tkinter") is None:
print("tkinter is not available.")
- print("Using TkAgg backend with tkinter support.")
except (ImportError, RuntimeError):
- # Fallback to Agg if TkAgg is unavailable
matplotlib.use("Agg")
- print("TkAgg is unavailable. Using Agg backend.")
from matplotlib import pyplot as plt # type: ignore