clip-protocol 2.2.13__tar.gz → 2.3__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.
- {clip_protocol-2.2.13 → clip_protocol-2.3}/PKG-INFO +1 -1
- clip_protocol-2.3/evaluation/AOI datasets/S1.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S10.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S11.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S12.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S13.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S14.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S15.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S16.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S17.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S18.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S19.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S2.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S20.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S3.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S4.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S5.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S6.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S7.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S8.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/S9.xlsx +0 -0
- clip_protocol-2.3/evaluation/AOI datasets/process.py +57 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-3000-d1.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-3000-d2.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-3000-d3.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-3000-d4.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-4000-d1.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-4000-d2.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-4000-d3.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-4000-d4.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-5000-d1.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-5000-d2.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-5000-d3.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-5000-d4.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-6000-d1.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-6000-d2.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-6000-d3.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-6000-d4.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-7000-d1.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-7000-d2.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-7000-d3.xlsx +0 -0
- clip_protocol-2.3/evaluation/Synthetic datasets/SynLog-7000-d4.xlsx +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/experiment_1.py +5 -37
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/experiment_2.py +3 -2
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/experiment_3.py +5 -4
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/experiment_4.py +2 -2
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/experiment_5.py +2 -2
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experiment_2_params.json +2 -2
- clip_protocol-2.3/evaluation/frecuencias_por_archivo.csv +60 -0
- clip_protocol-2.3/evaluation/real_frequencies.py +66 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/pyproject.toml +1 -1
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/main/setup.py +1 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d2-3000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d2-4000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d2-5000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d2-6000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d2-7000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d3-3000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d3-4000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d3-5000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d3-6000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets/aoi-hits-d3-7000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d1-3000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d1-4000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d1-5000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d1-6000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d1-7000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d4-3000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d4-4000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d4-5000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d4-6000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/datasets-article/aoi-hits-d4-7000.xlsx +0 -0
- clip_protocol-2.2.13/evaluation/figures/experiment6_estimate.txt +0 -213
- clip_protocol-2.2.13/evaluation/test_ks.py +0 -37
- {clip_protocol-2.2.13 → clip_protocol-2.3}/.github/workflows/python-app.yml +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/.gitignore +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/.readthedocs.yaml +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/.vscode/settings.json +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/LICENSE +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/README.md +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/docs/api-reference.md +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/docs/assets/images/logo.png +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/docs/assets/images/overview.png +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/docs/index.md +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/docs/installation.md +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/docs/requirements.txt +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d1-3000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d1-4000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d1-5000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d1-6000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d1-7000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d2-3000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d2-4000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d2-5000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d2-6000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d2-7000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d3-3000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d3-4000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d3-5000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d3-6000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets-article → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d3-7000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d4-3000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d4-4000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d4-5000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d4-6000.xlsx +0 -0
- {clip_protocol-2.2.13/evaluation/datasets → clip_protocol-2.3/evaluation/TFG datasets}/aoi-hits-d4-7000.xlsx +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/experiment_7.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experiment_4_params.json +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experiment_5.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experiment_5_size_comparison.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d1_PCMeS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d1_PHCMS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d2_PCMeS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d2_PHCMS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d3_PCMeS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d3_PHCMS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d4_PCMeS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experimet_4_d4_PHCMS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/table_experiment_3_PCMeS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/table_experiment_3_PHCMS.csv +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/generate_dataset.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/mkdocs.yml +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/requirements.txt +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/cli.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/count_mean/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/count_mean/cms_client_mean.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/count_mean/private_cms_client.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/count_mean/private_cms_server.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/hadamard_count_mean/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/hadamard_count_mean/private_hcms_client.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/hadamard_count_mean/private_hcms_server.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/main/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/main/agregate.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/main/estimate.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/main/mask.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/utils/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/utils/errors.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/utils/utils.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/tests/__init__.py +0 -0
- {clip_protocol-2.2.13 → clip_protocol-2.3}/tests/test_sample.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clip_protocol
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3
|
|
4
4
|
Summary: Protocol to ensure the privatization of
|
|
5
5
|
Project-URL: Homepage, https://github.com/martaajonees/Local_Privacy
|
|
6
6
|
Project-URL: Issues, https://github.com/martaajonees/Local_Privacy/issues
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import glob
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
# Carpeta actual donde está el script
|
|
6
|
+
current_folder = os.getcwd()
|
|
7
|
+
|
|
8
|
+
# Buscar todos los archivos .xlsx en la carpeta actual
|
|
9
|
+
xlsx_files = glob.glob(os.path.join(current_folder, "*.xlsx"))
|
|
10
|
+
|
|
11
|
+
for file_path in xlsx_files:
|
|
12
|
+
try:
|
|
13
|
+
# Leer el archivo
|
|
14
|
+
df_temp = pd.read_excel(file_path)
|
|
15
|
+
|
|
16
|
+
if any(col.startswith("Unnamed") for col in df_temp.columns):
|
|
17
|
+
df = pd.read_excel(file_path, header=1)
|
|
18
|
+
else:
|
|
19
|
+
df = df_temp
|
|
20
|
+
|
|
21
|
+
# --- MEJORA: Limpiar nombres de columnas ---
|
|
22
|
+
# Eliminamos espacios en blanco extra y pasamos a minúsculas para comparar fácilmente
|
|
23
|
+
df.columns = [str(c).strip() for c in df.columns]
|
|
24
|
+
cols_lower = [c.lower() for c in df.columns]
|
|
25
|
+
|
|
26
|
+
# Buscamos los índices de las columnas que necesitamos (sin importar mayúsculas)
|
|
27
|
+
target_p = 'participant'
|
|
28
|
+
target_a = 'aoi hit'
|
|
29
|
+
|
|
30
|
+
if target_p in cols_lower and target_a in cols_lower:
|
|
31
|
+
# Identificar los nombres reales de las columnas en este archivo específico
|
|
32
|
+
real_col_p = df.columns[cols_lower.index(target_p)]
|
|
33
|
+
real_col_a = df.columns[cols_lower.index(target_a)]
|
|
34
|
+
|
|
35
|
+
# Obtener el nombre del archivo sin extensión para el participante
|
|
36
|
+
participant_name = os.path.splitext(os.path.basename(file_path))[0]
|
|
37
|
+
|
|
38
|
+
# Reemplazar valores y filtrar
|
|
39
|
+
df[real_col_p] = participant_name
|
|
40
|
+
|
|
41
|
+
# Mantener solo las dos columnas y limpiar nulos
|
|
42
|
+
df = df[[real_col_p, real_col_a]]
|
|
43
|
+
df = df[df[real_col_a].notna()]
|
|
44
|
+
|
|
45
|
+
# Renombrar a los nombres finales deseados
|
|
46
|
+
df.columns = ['Participant', 'AOI hit']
|
|
47
|
+
|
|
48
|
+
# Sobrescribir el archivo original
|
|
49
|
+
df.to_excel(file_path, index=False)
|
|
50
|
+
print(f"✅ Procesado: {os.path.basename(file_path)}")
|
|
51
|
+
else:
|
|
52
|
+
print(f"❌ Columnas no encontradas en {os.path.basename(file_path)}. Columnas detectadas: {list(df.columns)}")
|
|
53
|
+
|
|
54
|
+
except Exception as e:
|
|
55
|
+
print(f"⚠️ Error procesando {os.path.basename(file_path)}: {e}")
|
|
56
|
+
|
|
57
|
+
print("\nProceso finalizado.")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -24,38 +24,6 @@ def run_command(e, k, m, df, privacy_method):
|
|
|
24
24
|
|
|
25
25
|
return compute_error_table(get_real_frequency(df), df_estimated, 2), df_estimated
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
def plot_latex(errors, path):
|
|
29
|
-
lines = [
|
|
30
|
-
r"\begin{figure}[h]",
|
|
31
|
-
r"\centering",
|
|
32
|
-
r"\begin{tikzpicture}",
|
|
33
|
-
r"\begin{axis}[",
|
|
34
|
-
r" xlabel={$\epsilon$}, ylabel={Error},",
|
|
35
|
-
r" legend style={at={(0.5,-0.15)}, anchor=north,legend columns=-1},",
|
|
36
|
-
r" xmin=0, grid=major, width=12cm, height=8cm,",
|
|
37
|
-
r" cycle list name=color list,",
|
|
38
|
-
r"]"
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
for metric, points in errors.items():
|
|
42
|
-
name = "Lp Norm" if metric == "Lρ Norm" else metric
|
|
43
|
-
lines.append(r"\addplot coordinates {")
|
|
44
|
-
lines += [f" ({eps}, {err})" for eps, err in sorted(points)]
|
|
45
|
-
lines.append(r"};")
|
|
46
|
-
lines.append(fr"\addlegendentry{{{name}}}")
|
|
47
|
-
|
|
48
|
-
lines += [
|
|
49
|
-
r"\end{axis}",
|
|
50
|
-
r"\end{tikzpicture}",
|
|
51
|
-
r"\caption{Evolución del error por métrica en función del parámetro $\epsilon$}",
|
|
52
|
-
r"\end{figure}"
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
with open(path, "w") as f:
|
|
56
|
-
f.write("\n".join(lines))
|
|
57
|
-
print(f"✅ LaTeX graph saved to {path}")
|
|
58
|
-
|
|
59
27
|
def run_experiment1(df, privacy_method):
|
|
60
28
|
k = int(input("🔑 Enter k value: "))
|
|
61
29
|
m = int(input("🔢 Enter m value: "))
|
|
@@ -65,13 +33,13 @@ def run_experiment1(df, privacy_method):
|
|
|
65
33
|
epsilons = [round(e, 1) for e in list(reversed([x * 0.5 for x in range(1, 21)])) + [0.4, 0.3, 0.2, 0.1]]
|
|
66
34
|
|
|
67
35
|
for eps in epsilons:
|
|
68
|
-
|
|
36
|
+
print(f"Running with epsilon: {eps}")
|
|
37
|
+
table, _ = run_command(eps, k, m, df, privacy_method)
|
|
69
38
|
for metric, val in table:
|
|
70
39
|
error_history.setdefault(metric, []).append((eps, val))
|
|
71
40
|
|
|
72
41
|
df = pd.DataFrame(error_history)
|
|
73
|
-
df.to_csv(f"
|
|
74
|
-
plot_latex(error_history, f"figures/experiment_1_{privacy_method}.tex")
|
|
42
|
+
df.to_csv(f"table_experiment_1_{privacy_method}.csv", index=False)
|
|
75
43
|
|
|
76
44
|
if __name__ == "__main__":
|
|
77
45
|
parser = argparse.ArgumentParser(description="Run experiment 1")
|
|
@@ -79,8 +47,8 @@ if __name__ == "__main__":
|
|
|
79
47
|
args = parser.parse_args()
|
|
80
48
|
|
|
81
49
|
distribution = input(" Enter the distribution 1/2/3/4: ")
|
|
82
|
-
|
|
83
|
-
pattern = f"
|
|
50
|
+
|
|
51
|
+
pattern = f"SynLog-5000-d{distribution}"
|
|
84
52
|
matching_files = [f for f in os.listdir(args.f) if pattern in f and f.endswith(".xlsx")]
|
|
85
53
|
|
|
86
54
|
file_path = os.path.join(args.f, matching_files[0])
|
|
@@ -115,7 +115,7 @@ def run_experiment_2(datasets_by_size, params):
|
|
|
115
115
|
"Iteraciones PCMeS", "Tiempo de ejecución PCMeS"]
|
|
116
116
|
df_pivot = df_pivot[final_cols]
|
|
117
117
|
|
|
118
|
-
df_pivot.to_csv("
|
|
118
|
+
df_pivot.to_csv("table_experiment_2.csv", index=False)
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
if __name__ == "__main__":
|
|
@@ -133,7 +133,8 @@ if __name__ == "__main__":
|
|
|
133
133
|
|
|
134
134
|
datasets = {}
|
|
135
135
|
for size in sizes:
|
|
136
|
-
|
|
136
|
+
|
|
137
|
+
pattern = f"SynLog-{size}-d{distribution}"
|
|
137
138
|
file_path = os.path.join(args.f, pattern + ".xlsx")
|
|
138
139
|
header = 1 if "Unnamed" in pd.read_excel(file_path, nrows=1).columns[0] else 0
|
|
139
140
|
df = pd.read_excel(file_path, header=header)
|
|
@@ -66,7 +66,8 @@ def optimize_e(k, m, df, e_r, privacy_level, error_value, tolerance, privacy_met
|
|
|
66
66
|
def run_experiment_3(datasets, params):
|
|
67
67
|
error_value = 0.05
|
|
68
68
|
tolerance = 0.01
|
|
69
|
-
privacy_level = "high"
|
|
69
|
+
# privacy_level = "high"
|
|
70
|
+
privacy_level = "low"
|
|
70
71
|
|
|
71
72
|
for method in ["PCMeS", "PHCMS"]:
|
|
72
73
|
row_apple = {"Método": "Método de Apple"}
|
|
@@ -89,7 +90,7 @@ def run_experiment_3(datasets, params):
|
|
|
89
90
|
row_clip[size] = f"{epsilon:.2f} / {pe_error:.2f}"
|
|
90
91
|
|
|
91
92
|
df_result = pd.DataFrame([row_apple, row_clip])
|
|
92
|
-
df_result.to_csv(f"
|
|
93
|
+
df_result.to_csv(f"table_experiment_3_{method}.csv", index=False)
|
|
93
94
|
|
|
94
95
|
|
|
95
96
|
if __name__ == "__main__":
|
|
@@ -107,11 +108,11 @@ if __name__ == "__main__":
|
|
|
107
108
|
|
|
108
109
|
datasets = {}
|
|
109
110
|
for size in sizes:
|
|
110
|
-
pattern = f"
|
|
111
|
+
pattern = f"SynLog-{size}-d{distribution}"
|
|
111
112
|
file_path = os.path.join(args.f, pattern + ".xlsx")
|
|
112
113
|
header = 1 if "Unnamed" in pd.read_excel(file_path, nrows=1).columns[0] else 0
|
|
113
114
|
df = pd.read_excel(file_path, header=header)
|
|
114
115
|
datasets[size] = df
|
|
115
116
|
|
|
116
117
|
|
|
117
|
-
run_experiment_3(datasets, params)
|
|
118
|
+
run_experiment_3(datasets, params)
|
|
@@ -84,7 +84,7 @@ def run_experiment_4(datasets, params):
|
|
|
84
84
|
cleaned_table = [[col[0], col[1].replace('%', '') if isinstance(col[1], str) else col[1]] for col in filtered_table]
|
|
85
85
|
|
|
86
86
|
error_by_aoi = pd.DataFrame(cleaned_table, columns=['AOI', 'Error'])
|
|
87
|
-
path_individual = f"
|
|
87
|
+
path_individual = f"experimet_4_d{distribution}_{method}.csv"
|
|
88
88
|
error_by_aoi.to_csv(path_individual, index=False)
|
|
89
89
|
|
|
90
90
|
if __name__ == "__main__":
|
|
@@ -101,7 +101,7 @@ if __name__ == "__main__":
|
|
|
101
101
|
|
|
102
102
|
datasets = {}
|
|
103
103
|
for distribution in distributions:
|
|
104
|
-
pattern = f"
|
|
104
|
+
pattern = f"SynLog-5000-d{distribution}"
|
|
105
105
|
file_path = os.path.join(args.f, pattern + ".xlsx")
|
|
106
106
|
header = 1 if "Unnamed" in pd.read_excel(file_path, nrows=1).columns[0] else 0
|
|
107
107
|
df = pd.read_excel(file_path, header=header)
|
|
@@ -149,10 +149,10 @@ def run_experiment_5(datasets, privatized_path):
|
|
|
149
149
|
privatized_data.to_csv(filename, index=False)
|
|
150
150
|
|
|
151
151
|
performance_df = pd.DataFrame(performance_records)
|
|
152
|
-
performance_df.to_csv("
|
|
152
|
+
performance_df.to_csv("experiment_5.csv", index=False)
|
|
153
153
|
|
|
154
154
|
size_df = pd.DataFrame(size_comparison_records)
|
|
155
|
-
size_df.to_csv("
|
|
155
|
+
size_df.to_csv("experiment_5_size_comparison.csv", index=False)
|
|
156
156
|
|
|
157
157
|
def load_excel_with_header_check(filepath):
|
|
158
158
|
try:
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Archivo,Campo,Frecuencia
|
|
2
|
+
s01-event-statistics-single.xlsx,AOI 003,4720
|
|
3
|
+
s01-event-statistics-single.xlsx,AOI 002,191
|
|
4
|
+
s01-event-statistics-single.xlsx,AOI 001,89
|
|
5
|
+
s02-event-statistics-single.xlsx,AOI 003,2518
|
|
6
|
+
s02-event-statistics-single.xlsx,AOI 001,123
|
|
7
|
+
s02-event-statistics-single.xlsx,AOI 002,85
|
|
8
|
+
s03-event-statistics-single.xlsx,AOI 003,3850
|
|
9
|
+
s03-event-statistics-single.xlsx,AOI 002,159
|
|
10
|
+
s03-event-statistics-single.xlsx,AOI 001,6
|
|
11
|
+
s04-event-statistics-single.xlsx,AOI 003,2923
|
|
12
|
+
s04-event-statistics-single.xlsx,AOI 002,636
|
|
13
|
+
s04-event-statistics-single.xlsx,AOI 001,338
|
|
14
|
+
s05-event-statistics-single.xlsx,AOI 003,4465
|
|
15
|
+
s05-event-statistics-single.xlsx,AOI 002,475
|
|
16
|
+
s05-event-statistics-single.xlsx,AOI 001,40
|
|
17
|
+
s06-event-statistics-single.xlsx,AOI 003,3739
|
|
18
|
+
s06-event-statistics-single.xlsx,AOI 002,326
|
|
19
|
+
s06-event-statistics-single.xlsx,AOI 001,103
|
|
20
|
+
s07-event-statistics-single.xlsx,AOI 003,6733
|
|
21
|
+
s07-event-statistics-single.xlsx,AOI 002,645
|
|
22
|
+
s07-event-statistics-single.xlsx,AOI 001,33
|
|
23
|
+
s08-event-statistics-single.xlsx,AOI 003,2619
|
|
24
|
+
s08-event-statistics-single.xlsx,AOI 002,154
|
|
25
|
+
s08-event-statistics-single.xlsx,AOI 001,36
|
|
26
|
+
s09-event-statistics-single.xlsx,AOI 003,5409
|
|
27
|
+
s09-event-statistics-single.xlsx,AOI 002,270
|
|
28
|
+
s09-event-statistics-single.xlsx,AOI 001,222
|
|
29
|
+
s11-event-statistics-single.xlsx,AOI 003,2902
|
|
30
|
+
s11-event-statistics-single.xlsx,AOI 002,129
|
|
31
|
+
s11-event-statistics-single.xlsx,AOI 001,93
|
|
32
|
+
s12-event-statistics-single.xlsx,AOI 003,2158
|
|
33
|
+
s12-event-statistics-single.xlsx,AOI 002,48
|
|
34
|
+
s12-event-statistics-single.xlsx,AOI 001,3
|
|
35
|
+
s13-event-statistics-single.xlsx,AOI 003,3634
|
|
36
|
+
s13-event-statistics-single.xlsx,AOI 002,329
|
|
37
|
+
s13-event-statistics-single.xlsx,AOI 001,68
|
|
38
|
+
s14-event-statistics-single.xlsx,AOI 003,2531
|
|
39
|
+
s14-event-statistics-single.xlsx,AOI 002,85
|
|
40
|
+
s16-event-statistics-single.xlsx,AOI 003,4210
|
|
41
|
+
s16-event-statistics-single.xlsx,AOI 002,218
|
|
42
|
+
s16-event-statistics-single.xlsx,AOI 001,117
|
|
43
|
+
s18-event-statistics-single.xlsx,AOI 003,1367
|
|
44
|
+
s18-event-statistics-single.xlsx,AOI 001,10
|
|
45
|
+
s18-event-statistics-single.xlsx,AOI 002,6
|
|
46
|
+
s19-event-statistics-single.xlsx,AOI 003,2882
|
|
47
|
+
s19-event-statistics-single.xlsx,AOI 001,186
|
|
48
|
+
s19-event-statistics-single.xlsx,AOI 002,61
|
|
49
|
+
s21-event-statistics-single.xlsx,AOI 003,2658
|
|
50
|
+
s21-event-statistics-single.xlsx,AOI 001,349
|
|
51
|
+
s21-event-statistics-single.xlsx,AOI 002,26
|
|
52
|
+
s23-event-statistics-single.xlsx,AOI 003,6429
|
|
53
|
+
s23-event-statistics-single.xlsx,AOI 002,79
|
|
54
|
+
s23-event-statistics-single.xlsx,AOI 001,2
|
|
55
|
+
s24-event-statistics-single.xlsx,AOI 003,2248
|
|
56
|
+
s24-event-statistics-single.xlsx,AOI 002,37
|
|
57
|
+
s24-event-statistics-single.xlsx,AOI 001,24
|
|
58
|
+
s25-event-statistics-single.xlsx,AOI 003,3466
|
|
59
|
+
s25-event-statistics-single.xlsx,AOI 002,110
|
|
60
|
+
s25-event-statistics-single.xlsx,AOI 001,101
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import pandas as pd
|
|
3
|
+
from collections import Counter
|
|
4
|
+
from glob import glob
|
|
5
|
+
|
|
6
|
+
def filter_databases(excel_files, field):
|
|
7
|
+
excels = []
|
|
8
|
+
for excel_file in excel_files:
|
|
9
|
+
try:
|
|
10
|
+
df_temp = pd.read_excel(excel_file)
|
|
11
|
+
if any(col.startswith("Unnamed") for col in df_temp.columns):
|
|
12
|
+
df = pd.read_excel(excel_file, header=1)
|
|
13
|
+
else:
|
|
14
|
+
df = df_temp
|
|
15
|
+
|
|
16
|
+
matching_columns = [col for col in field if col in df.columns]
|
|
17
|
+
if not matching_columns:
|
|
18
|
+
print(f"⚠️ Ninguna de las columnas especificadas está en {excel_file}")
|
|
19
|
+
continue
|
|
20
|
+
|
|
21
|
+
df = df[matching_columns].copy()
|
|
22
|
+
df.columns = ["value"]
|
|
23
|
+
|
|
24
|
+
df['value'] = df['value'].astype(str).apply(lambda x: x.strip())
|
|
25
|
+
df = df[df['value'] != '-']
|
|
26
|
+
df = df[df['value'].str.contains(r'\w', na=False)]
|
|
27
|
+
filename = os.path.basename(excel_file)
|
|
28
|
+
|
|
29
|
+
excels.append((df, filename))
|
|
30
|
+
|
|
31
|
+
except Exception as e:
|
|
32
|
+
print(f"❌ Error leyendo {excel_file}: {e}")
|
|
33
|
+
print(f"✅ Procesado {excel_file} correctamente.")
|
|
34
|
+
return excels
|
|
35
|
+
|
|
36
|
+
def compute_real_frequencies(df: pd.DataFrame):
|
|
37
|
+
counter = Counter(df['value'])
|
|
38
|
+
freq_df = pd.DataFrame(counter.items(), columns=["Element", "Frequency"]).sort_values(by="Frequency", ascending=False)
|
|
39
|
+
return freq_df.reset_index(drop=True)
|
|
40
|
+
|
|
41
|
+
if __name__ == "__main__":
|
|
42
|
+
carpeta_excel = "/Users/martajones/Downloads/Databases"
|
|
43
|
+
campos_a_contar = ["AOI Name", "AOI name", "AOI_Name"] # por si varía el nombre
|
|
44
|
+
|
|
45
|
+
archivos_excel = glob(os.path.join(carpeta_excel, "*.xlsx"))
|
|
46
|
+
dfs = filter_databases(archivos_excel, campos_a_contar)
|
|
47
|
+
|
|
48
|
+
if not dfs:
|
|
49
|
+
print("No se han encontrado datos válidos.")
|
|
50
|
+
exit()
|
|
51
|
+
|
|
52
|
+
all_freqs = []
|
|
53
|
+
for df, filename in dfs:
|
|
54
|
+
counts = df['value'].value_counts()
|
|
55
|
+
for value, freq in counts.items():
|
|
56
|
+
all_freqs.append({
|
|
57
|
+
"Archivo": filename,
|
|
58
|
+
"Campo": value,
|
|
59
|
+
"Frecuencia": freq
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
df_all_freqs = pd.DataFrame(all_freqs)
|
|
63
|
+
df_all_freqs = df_all_freqs.sort_values(by=["Archivo", "Frecuencia"], ascending=[True, False])
|
|
64
|
+
df_all_freqs.to_csv("frecuencias_por_archivo.csv", index=False)
|
|
65
|
+
|
|
66
|
+
|
|
@@ -76,6 +76,7 @@ class Setup:
|
|
|
76
76
|
self.df['value'] = self.df['value'].astype(str).apply(lambda x: x.strip())
|
|
77
77
|
self.df = self.df[self.df['value'] != '-']
|
|
78
78
|
self.df = self.df[self.df['value'].str.contains(r'\w', na=False)]
|
|
79
|
+
self.df = self.df.sample(frac=1, random_state=None).reset_index(drop=True)
|
|
79
80
|
self.N = len(self.df)
|
|
80
81
|
|
|
81
82
|
def run_command(self, e, k, m):
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
Enter the event to estimate or q' to quit:
|
|
2
|
-
📊 Estimated frequency of '' per user:
|
|
3
|
-
|
|
4
|
-
🧑 User a5fcecb447: 6.0226
|
|
5
|
-
🧑 User 7246a691b1: 0.0000
|
|
6
|
-
🧑 User ac7e217530: 0.0000
|
|
7
|
-
🧑 User a4d19bf287: 2.2811
|
|
8
|
-
🧑 User 021112db53: 0.0000
|
|
9
|
-
🧑 User 5207a4267e: 0.3976
|
|
10
|
-
🧑 User 919c67db77: 0.8454
|
|
11
|
-
🧑 User 3c644a1401: 0.2286
|
|
12
|
-
🧑 User 88e1c85a55: 1.1747
|
|
13
|
-
🧑 User 701ac89b2f: 0.0000
|
|
14
|
-
🧑 User 9f59e66ff1: 0.0000
|
|
15
|
-
🧑 User 6d08d55f05: 0.0000
|
|
16
|
-
🧑 User 26fec0ec9d: 2.2726
|
|
17
|
-
🧑 User 7641928d49: 0.0000
|
|
18
|
-
🧑 User f0c8e40f51: 0.0000
|
|
19
|
-
🧑 User ecff214750: 0.0000
|
|
20
|
-
🧑 User 8257e18d5e: 0.0000
|
|
21
|
-
🧑 User 970ee0452b: 0.0000
|
|
22
|
-
🧑 User 84901f320a: 2.8722
|
|
23
|
-
🧑 User 737d61a297: 0.0000
|
|
24
|
-
🧑 User 183e3f200d: 1.1747
|
|
25
|
-
🧑 User 4de4d32ead: 0.0000
|
|
26
|
-
🧑 User 2a85807b6b: 0.0000
|
|
27
|
-
🧑 User bd7fec0021: 5.9296
|
|
28
|
-
🧑 User 8d99470a36: 3.3875
|
|
29
|
-
🧑 User 444ca7a7d2: 3.7168
|
|
30
|
-
🧑 User 013719842e: 1.5884
|
|
31
|
-
🧑 User d5fe134ee2: 0.0000
|
|
32
|
-
🧑 User 64a436d06c: 0.0000
|
|
33
|
-
🧑 User 92e781df39: 0.0000
|
|
34
|
-
🧑 User bbc60a94e1: 1.4280
|
|
35
|
-
🧑 User daf4391eac: 0.0000
|
|
36
|
-
🧑 User 38f6fa697b: 0.0000
|
|
37
|
-
🧑 User 762c85c64e: 3.8097
|
|
38
|
-
🧑 User d81be1c2f1: 0.0683
|
|
39
|
-
🧑 User 17574d81d1: 0.0000
|
|
40
|
-
🧑 User a7a70ff1d7: 2.3655
|
|
41
|
-
🧑 User 34534ea7d2: 0.0000
|
|
42
|
-
🧑 User a08f3d0564: 0.0000
|
|
43
|
-
🧑 User 716e75916f: 0.0000
|
|
44
|
-
🧑 User 3a36ef8b11: 4.7558
|
|
45
|
-
🧑 User 8079e67204: 3.5479
|
|
46
|
-
🧑 User 9e76dff829: 0.0000
|
|
47
|
-
🧑 User abec3cb8ce: 0.0000
|
|
48
|
-
🧑 User 749d22a2cc: 1.4366
|
|
49
|
-
🧑 User 7fcf6de40f: 0.0000
|
|
50
|
-
🧑 User dea36ce3cf: 0.1527
|
|
51
|
-
🧑 User a6523ce7e0: 2.1036
|
|
52
|
-
🧑 User f1fb300c01: 0.9128
|
|
53
|
-
🧑 User 6e133b897a: 0.0000
|
|
54
|
-
Enter the event to estimate or q' to quit:
|
|
55
|
-
📊 Estimated frequency of 'AOI 001' per user:
|
|
56
|
-
|
|
57
|
-
🧑 User a5fcecb447: 0.0000
|
|
58
|
-
🧑 User 7246a691b1: 0.0000
|
|
59
|
-
🧑 User ac7e217530: 0.0000
|
|
60
|
-
🧑 User a4d19bf287: 0.0000
|
|
61
|
-
🧑 User 021112db53: 1.3351
|
|
62
|
-
🧑 User 5207a4267e: 0.0000
|
|
63
|
-
🧑 User 919c67db77: 0.0000
|
|
64
|
-
🧑 User 3c644a1401: 0.0000
|
|
65
|
-
🧑 User 88e1c85a55: 1.1747
|
|
66
|
-
🧑 User 701ac89b2f: 0.0000
|
|
67
|
-
🧑 User 9f59e66ff1: 2.0107
|
|
68
|
-
🧑 User 6d08d55f05: 0.0000
|
|
69
|
-
🧑 User 26fec0ec9d: 0.0597
|
|
70
|
-
🧑 User 7641928d49: 0.0000
|
|
71
|
-
🧑 User f0c8e40f51: 2.0363
|
|
72
|
-
🧑 User ecff214750: 0.0000
|
|
73
|
-
🧑 User 8257e18d5e: 0.0000
|
|
74
|
-
🧑 User 970ee0452b: 0.0000
|
|
75
|
-
🧑 User 84901f320a: 0.6594
|
|
76
|
-
🧑 User 737d61a297: 1.5125
|
|
77
|
-
🧑 User 183e3f200d: 0.0000
|
|
78
|
-
🧑 User 4de4d32ead: 0.0000
|
|
79
|
-
🧑 User 2a85807b6b: 8.5817
|
|
80
|
-
🧑 User bd7fec0021: 2.6104
|
|
81
|
-
🧑 User 8d99470a36: 0.0000
|
|
82
|
-
🧑 User 444ca7a7d2: 2.6104
|
|
83
|
-
🧑 User 013719842e: 0.0000
|
|
84
|
-
🧑 User d5fe134ee2: 0.0000
|
|
85
|
-
🧑 User 64a436d06c: 3.3875
|
|
86
|
-
🧑 User 92e781df39: 0.4146
|
|
87
|
-
🧑 User bbc60a94e1: 0.0000
|
|
88
|
-
🧑 User daf4391eac: 0.9128
|
|
89
|
-
🧑 User 38f6fa697b: 0.0000
|
|
90
|
-
🧑 User 762c85c64e: 0.4905
|
|
91
|
-
🧑 User d81be1c2f1: 0.0000
|
|
92
|
-
🧑 User 17574d81d1: 0.0000
|
|
93
|
-
🧑 User a7a70ff1d7: 1.2591
|
|
94
|
-
🧑 User 34534ea7d2: 0.5835
|
|
95
|
-
🧑 User a08f3d0564: 2.3570
|
|
96
|
-
🧑 User 716e75916f: 2.3655
|
|
97
|
-
🧑 User 3a36ef8b11: 2.5430
|
|
98
|
-
🧑 User 8079e67204: 0.0000
|
|
99
|
-
🧑 User 9e76dff829: 1.5125
|
|
100
|
-
🧑 User abec3cb8ce: 1.8674
|
|
101
|
-
🧑 User 749d22a2cc: 4.7558
|
|
102
|
-
🧑 User 7fcf6de40f: 0.0000
|
|
103
|
-
🧑 User dea36ce3cf: 0.0000
|
|
104
|
-
🧑 User a6523ce7e0: 2.1036
|
|
105
|
-
🧑 User f1fb300c01: 0.0000
|
|
106
|
-
🧑 User 6e133b897a: 1.0817
|
|
107
|
-
Enter the event to estimate or q' to quit:
|
|
108
|
-
📊 Estimated frequency of 'AOI 002' per user:
|
|
109
|
-
|
|
110
|
-
🧑 User a5fcecb447: 0.4905
|
|
111
|
-
🧑 User 7246a691b1: 0.0000
|
|
112
|
-
🧑 User ac7e217530: 0.0000
|
|
113
|
-
🧑 User a4d19bf287: 2.2811
|
|
114
|
-
🧑 User 021112db53: 7.9735
|
|
115
|
-
🧑 User 5207a4267e: 0.0000
|
|
116
|
-
🧑 User 919c67db77: 0.0000
|
|
117
|
-
🧑 User 3c644a1401: 5.7607
|
|
118
|
-
🧑 User 88e1c85a55: 5.6003
|
|
119
|
-
🧑 User 701ac89b2f: 0.9213
|
|
120
|
-
🧑 User 9f59e66ff1: 0.0000
|
|
121
|
-
🧑 User 6d08d55f05: 0.0000
|
|
122
|
-
🧑 User 26fec0ec9d: 2.2726
|
|
123
|
-
🧑 User 7641928d49: 0.0000
|
|
124
|
-
🧑 User f0c8e40f51: 4.2491
|
|
125
|
-
🧑 User ecff214750: 1.6899
|
|
126
|
-
🧑 User 8257e18d5e: 0.0000
|
|
127
|
-
🧑 User 970ee0452b: 4.6628
|
|
128
|
-
🧑 User 84901f320a: 0.0000
|
|
129
|
-
🧑 User 737d61a297: 0.0000
|
|
130
|
-
🧑 User 183e3f200d: 0.0000
|
|
131
|
-
🧑 User 4de4d32ead: 0.0000
|
|
132
|
-
🧑 User 2a85807b6b: 4.1561
|
|
133
|
-
🧑 User bd7fec0021: 0.0000
|
|
134
|
-
🧑 User 8d99470a36: 0.0000
|
|
135
|
-
🧑 User 444ca7a7d2: 0.0000
|
|
136
|
-
🧑 User 013719842e: 3.8012
|
|
137
|
-
🧑 User d5fe134ee2: 0.0000
|
|
138
|
-
🧑 User 64a436d06c: 3.3875
|
|
139
|
-
🧑 User 92e781df39: 0.0000
|
|
140
|
-
🧑 User bbc60a94e1: 0.0000
|
|
141
|
-
🧑 User daf4391eac: 3.1256
|
|
142
|
-
🧑 User 38f6fa697b: 0.1442
|
|
143
|
-
🧑 User 762c85c64e: 2.7033
|
|
144
|
-
🧑 User d81be1c2f1: 0.0000
|
|
145
|
-
🧑 User 17574d81d1: 0.0000
|
|
146
|
-
🧑 User a7a70ff1d7: 1.2591
|
|
147
|
-
🧑 User 34534ea7d2: 0.5835
|
|
148
|
-
🧑 User a08f3d0564: 0.0000
|
|
149
|
-
🧑 User 716e75916f: 3.4719
|
|
150
|
-
🧑 User 3a36ef8b11: 0.0000
|
|
151
|
-
🧑 User 8079e67204: 1.3351
|
|
152
|
-
🧑 User 9e76dff829: 0.0000
|
|
153
|
-
🧑 User abec3cb8ce: 0.0000
|
|
154
|
-
🧑 User 749d22a2cc: 3.6494
|
|
155
|
-
🧑 User 7fcf6de40f: 0.0000
|
|
156
|
-
🧑 User dea36ce3cf: 0.1527
|
|
157
|
-
🧑 User a6523ce7e0: 0.0000
|
|
158
|
-
🧑 User f1fb300c01: 2.0192
|
|
159
|
-
🧑 User 6e133b897a: 5.5073
|
|
160
|
-
Enter the event to estimate or q' to quit:
|
|
161
|
-
📊 Estimated frequency of 'AOI 003' per user:
|
|
162
|
-
|
|
163
|
-
🧑 User a5fcecb447: 1.5969
|
|
164
|
-
🧑 User 7246a691b1: 0.0000
|
|
165
|
-
🧑 User ac7e217530: 0.0000
|
|
166
|
-
🧑 User a4d19bf287: 0.0683
|
|
167
|
-
🧑 User 021112db53: 0.0000
|
|
168
|
-
🧑 User 5207a4267e: 1.5040
|
|
169
|
-
🧑 User 919c67db77: 0.0000
|
|
170
|
-
🧑 User 3c644a1401: 2.4415
|
|
171
|
-
🧑 User 88e1c85a55: 0.0000
|
|
172
|
-
🧑 User 701ac89b2f: 4.2405
|
|
173
|
-
🧑 User 9f59e66ff1: 0.0000
|
|
174
|
-
🧑 User 6d08d55f05: 0.0000
|
|
175
|
-
🧑 User 26fec0ec9d: 2.2726
|
|
176
|
-
🧑 User 7641928d49: 1.0817
|
|
177
|
-
🧑 User f0c8e40f51: 2.0363
|
|
178
|
-
🧑 User ecff214750: 2.7963
|
|
179
|
-
🧑 User 8257e18d5e: 0.0000
|
|
180
|
-
🧑 User 970ee0452b: 2.4500
|
|
181
|
-
🧑 User 84901f320a: 0.0000
|
|
182
|
-
🧑 User 737d61a297: 1.5125
|
|
183
|
-
🧑 User 183e3f200d: 0.0683
|
|
184
|
-
🧑 User 4de4d32ead: 0.0000
|
|
185
|
-
🧑 User 2a85807b6b: 0.0000
|
|
186
|
-
🧑 User bd7fec0021: 1.5040
|
|
187
|
-
🧑 User 8d99470a36: 0.0000
|
|
188
|
-
🧑 User 444ca7a7d2: 0.0000
|
|
189
|
-
🧑 User 013719842e: 2.6948
|
|
190
|
-
🧑 User d5fe134ee2: 0.0000
|
|
191
|
-
🧑 User 64a436d06c: 0.0683
|
|
192
|
-
🧑 User 92e781df39: 0.4146
|
|
193
|
-
🧑 User bbc60a94e1: 1.4280
|
|
194
|
-
🧑 User daf4391eac: 3.1256
|
|
195
|
-
🧑 User 38f6fa697b: 0.1442
|
|
196
|
-
🧑 User 762c85c64e: 0.0000
|
|
197
|
-
🧑 User d81be1c2f1: 0.0000
|
|
198
|
-
🧑 User 17574d81d1: 2.6948
|
|
199
|
-
🧑 User a7a70ff1d7: 3.4719
|
|
200
|
-
🧑 User 34534ea7d2: 0.5835
|
|
201
|
-
🧑 User a08f3d0564: 0.0000
|
|
202
|
-
🧑 User 716e75916f: 0.1527
|
|
203
|
-
🧑 User 3a36ef8b11: 1.4366
|
|
204
|
-
🧑 User 8079e67204: 0.0000
|
|
205
|
-
🧑 User 9e76dff829: 0.0000
|
|
206
|
-
🧑 User abec3cb8ce: 0.0000
|
|
207
|
-
🧑 User 749d22a2cc: 2.5430
|
|
208
|
-
🧑 User 7fcf6de40f: 0.0000
|
|
209
|
-
🧑 User dea36ce3cf: 2.3655
|
|
210
|
-
🧑 User a6523ce7e0: 0.0000
|
|
211
|
-
🧑 User f1fb300c01: 0.9128
|
|
212
|
-
🧑 User 6e133b897a: 2.1881
|
|
213
|
-
Enter the event to estimate or q' to quit:
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import pandas as pd
|
|
2
|
-
import numpy as np
|
|
3
|
-
from scipy.stats import chisquare, poisson, uniform
|
|
4
|
-
|
|
5
|
-
# Carga datos
|
|
6
|
-
df_5000 = pd.read_excel('datasets-article/aoi-hits-d1-3000.xlsx')
|
|
7
|
-
|
|
8
|
-
df_5000['aoi_hit'] = df_5000['aoi_hit'].replace({
|
|
9
|
-
'subevent_0': 0,
|
|
10
|
-
'subevent_1': 1,
|
|
11
|
-
'subevent_2': 2,
|
|
12
|
-
'subevent_3': 3
|
|
13
|
-
}).astype(int)
|
|
14
|
-
|
|
15
|
-
counts = np.bincount(df_5000['aoi_hit'], minlength=4)
|
|
16
|
-
#counts = [790, 1580, 1580, 1050] # para poisson
|
|
17
|
-
|
|
18
|
-
print("Counts (observed):", counts)
|
|
19
|
-
|
|
20
|
-
# Parámetro lambda
|
|
21
|
-
lambda_poisson = 2
|
|
22
|
-
|
|
23
|
-
# Calcula probabilidades Poisson para valores 0..3
|
|
24
|
-
probs = poisson.pmf(np.arange(4), mu=lambda_poisson)
|
|
25
|
-
#probs = uniform.pdf(np.arange(4), loc=0, scale=4) # Distribución uniforme para 0..3
|
|
26
|
-
|
|
27
|
-
# Normaliza para que sumen 1 solo en esos valores
|
|
28
|
-
probs = probs / probs.sum()
|
|
29
|
-
|
|
30
|
-
# Calcula esperados según la distribución teórica
|
|
31
|
-
expected = probs * sum(counts)
|
|
32
|
-
|
|
33
|
-
# Test chi-cuadrado
|
|
34
|
-
stat, pvalue = chisquare(counts, f_exp=expected)
|
|
35
|
-
|
|
36
|
-
print(f"Chi2 statistic: {stat:.4f}")
|
|
37
|
-
print(f"P-value: {pvalue:.4f}")
|
|
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
|
|
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
|
|
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
|
{clip_protocol-2.2.13 → clip_protocol-2.3}/evaluation/figures/experiment_5_size_comparison.csv
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/count_mean/private_cms_client.py
RENAMED
|
File without changes
|
{clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/count_mean/private_cms_server.py
RENAMED
|
File without changes
|
{clip_protocol-2.2.13 → clip_protocol-2.3}/src/clip_protocol/hadamard_count_mean/__init__.py
RENAMED
|
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
|