diff --git a/jobs/bprPoisson.sh b/jobs/bprNetwork.sh similarity index 90% rename from jobs/bprPoisson.sh rename to jobs/bprNetwork.sh index 076e7d5..77c7125 100644 --- a/jobs/bprPoisson.sh +++ b/jobs/bprNetwork.sh @@ -1,5 +1,5 @@ #!/bin/bash -#SBATCH --job-name=bprPoisson +#SBATCH --job-name=bprNetwork #SBATCH --partition=general1 #SBATCH --nodes=1 #SBATCH --ntasks=60 @@ -9,7 +9,7 @@ #SBATCH --no-requeue #SBATCH --mail-type=FAIL -OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/poisson" +OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/network" for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 do diff --git a/jobs/bprGeneral.sh b/jobs/bprUniform.sh similarity index 90% rename from jobs/bprGeneral.sh rename to jobs/bprUniform.sh index 3b53a18..eb52815 100644 --- a/jobs/bprGeneral.sh +++ b/jobs/bprUniform.sh @@ -1,5 +1,5 @@ #!/bin/bash -#SBATCH --job-name=bprGeneral +#SBATCH --job-name=bprUniform #SBATCH --partition=general1 #SBATCH --nodes=1 #SBATCH --ntasks=60 @@ -9,7 +9,7 @@ #SBATCH --no-requeue #SBATCH --mail-type=FAIL -OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/general" +OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/uniform" for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 do diff --git a/jobs/tmpCP.sh b/jobs/tmpCP.sh new file mode 100644 index 0000000..bee1bbc --- /dev/null +++ b/jobs/tmpCP.sh @@ -0,0 +1,17 @@ +#!/bin/bash +#SBATCH --job-name=tmpCP +#SBATCH --partition=general1 +#SBATCH --nodes=1 +#SBATCH --ntasks=20 +#SBATCH --cpus-per-task=1 +#SBATCH --mem-per-cpu=2000 +#SBATCH --time=100:00:00 +#SBATCH --no-requeue +#SBATCH --mail-type=FAIL + +OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/network" + +for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +do + target/release/bpr --log "${OUTPUTDIR}/cov/OUT_${NUM}" --na $((16 * $NUM)) --nb $((400 * $NUM)) --vs 10 --iterations 500 --instances 10 --goal COV --algorithm ALL --parameters 4 --poisson & +done diff --git a/scripts/fitTime.py b/scripts/fitTime.py new file mode 100644 index 0000000..d86b5dc --- /dev/null +++ b/scripts/fitTime.py @@ -0,0 +1,34 @@ +import pickle +from math import log +import matplotlib.pyplot as plt + +PATH = "logs/time/T_COV_G" + +def fun(na: int, nb: int) -> int: + return na * na * na * na * nb + +with open(PATH, "rb") as f: + data = pickle.load(f) + +keys = data["x"] + +values = [ + data["y"][key][0] for key in range(len(keys)) +] + +factors = [ + values[key] / fun(keys[key] * 16, keys[key] * 16) for key in range(len(keys)) +] + +factor = sum(factors) / len(keys) + +fitting = [ + factor * fun(keys[key] * 16, keys[key] * 16) for key in range(len(keys)) +] + +plt.plot(keys, values, label = "Values") +plt.plot(keys, fitting, label = "Fitting") +plt.yscale("log") +plt.legend() + +plt.show() \ No newline at end of file diff --git a/scripts/timePlot.py b/scripts/timePlot.py index 63cf455..d445e2c 100644 --- a/scripts/timePlot.py +++ b/scripts/timePlot.py @@ -38,7 +38,7 @@ values = np.array(inverted_array) -data = pd.DataFrame(values, keys, columns = ["OPT - General", "OPT - Poisson", "AMP - General", "AMP - Poisson", "NAMP - General", "NAMP - Poisson"]) +data = pd.DataFrame(values, keys, columns = ["OPT - Uniform", "OPT - Network", "AMP - Uniform", "AMP - Network", "NAMP - Uniform", "NAMP - Network"]) plot = sns.lineplot(data = data, palette = "Paired", dashes = False, linewidth = 2.5)