Compare commits

...

4 Commits

Author SHA1 Message Date
Daniel Svitan
0f698ae39c 💄 Fixes figsize 2025-03-23 19:59:23 +01:00
Daniel Svitan
b465677d29 📝 Adds results archive to README 2025-03-23 19:49:36 +01:00
Daniel Svitan
d9b8c348cc 📦 Adds results archives 2025-03-23 19:46:04 +01:00
Daniel Svitan
b6b0a88eba 💄 Increases font size 2025-03-23 19:44:11 +01:00
7 changed files with 38 additions and 69 deletions

View File

@ -91,6 +91,8 @@ Quite complicated, right? A ton of data packed into one small image, which could
It can be overwhelming to look at at first, but once you understand what's going on, it's quite intuitive, anyway,
the function that does all this is also saved in [analyze.py](analyze.py)
All the graphs are saved in the archives, which you can download, [results.tar.gz](results.tar.gz) and [results.zip](results.zip)
### Neural network
Ah!

View File

@ -105,7 +105,7 @@ def plot_violin(data, labels, Fs, ps, title):
grade_name_labels = ["Priemer známok", "Známka z matematiky", "Známka zo slovenčiny", "Známka z angličtiny"]
fig, axs = plt.subplots(2, 2)
fig.suptitle(title)
fig.suptitle(title, fontsize=18)
fig.set_size_inches(12, 9)
for j in range(2):
@ -114,9 +114,9 @@ def plot_violin(data, labels, Fs, ps, title):
step = 1 if index > 0 else 0.5
parts = axs[j, k].violinplot(data[index], showmedians=True, showmeans=True)
axs[j, k].set_title(grade_names[index])
axs[j, k].set_xlabel(title, fontweight="bold")
axs[j, k].set_ylabel(grade_name_labels[index], fontweight="bold")
axs[j, k].set_title(grade_names[index], fontsize=16)
axs[j, k].set_xlabel(title, fontweight="bold", fontsize=14)
axs[j, k].set_ylabel(grade_name_labels[index], fontweight="bold", fontsize=14)
# q1-q3 lines
for ind, vec in enumerate(data[index]):
@ -142,12 +142,14 @@ def plot_violin(data, labels, Fs, ps, title):
p = ps[index]
axs[j, k].text(0.01, 0.99, f"F-stat: {F:.4f}\np-val: {p:.4f}", ha="left", va="top",
transform=axs[j, k].transAxes,
fontweight="bold")
fontweight="bold",
fontsize=12)
axs[j, k].text(0.99, 0.99,
f"Na ľavo - priemer (červená)\nNa pravo - medián (zelená)\nSivá - medzi kvartilom 1 a 3",
ha="right",
va="top",
transform=axs[j, k].transAxes)
transform=axs[j, k].transAxes,
fontsize=12)
medians = list([np.median(a) for a in data[index]])
means = list([a.mean() for a in data[index]])
@ -155,8 +157,8 @@ def plot_violin(data, labels, Fs, ps, title):
median = medians[l]
mean = means[l]
# left - mean, right - median
axs[j, k].text(l + 1.13, median - 0.05, f"{median:.2f}", color="green")
axs[j, k].text(l + 0.90 - len(labels) * 0.065, mean - 0.05, f"{mean:.2f}", color="red")
axs[j, k].text(l + 1.13, median - 0.05, f"{median:.2f}", color="green", fontsize=12, fontweight="bold")
axs[j, k].text(l + 0.87 - len(labels) * 0.065, mean - 0.05, f"{mean:.2f}", color="red", fontsize=12, fontweight="bold")
fig.tight_layout()
if save != "":

View File

@ -49,7 +49,7 @@ grade_names = ["Priemer", "Matematika", "Slovenčina", "Angličtina"]
grade_name_labels = ["Priemer známok", "Známka z matematiky", "Známka zo slovenčiny", "Známka z angličtiny"]
fig, axs = plt.subplots(2, 2)
fig.suptitle("Absencia")
fig.suptitle("Absencia", fontsize=18)
fig.set_size_inches(12, 9)
for j in range(2):
@ -61,8 +61,8 @@ for j in range(2):
x = data[index][0] # absence
y = data[index][1] # grade
axs[j, k].scatter(x, y)
axs[j, k].set_xlabel("Počet vymeškaných hodín")
axs[j, k].set_ylabel(grade_name_labels[index])
axs[j, k].set_xlabel("Počet vymeškaných hodín", fontweight="bold", fontsize=14)
axs[j, k].set_ylabel(grade_name_labels[index], fontweight="bold", fontsize=14)
axs[j, k].set_yticks(np.arange(1, 6))
# trendline
@ -76,15 +76,18 @@ for j in range(2):
# data[index][1] - grades
# data[index][0][specific grade] - absences for that specific grande
# loop 1 through 5 plug in ^^
axs[j, k].set_xlabel(grade_name_labels[index], fontweight="bold", fontsize=14)
axs[j, k].set_ylabel("Počet vymeškaných hodín", fontweight="bold", fontsize=14)
axs[j, k].boxplot(by_grade, tick_labels=["1", "2", "3", "4", "5"])
axs[j, k].set_title(grade_names[index])
axs[j, k].set_title(grade_names[index], fontsize=16)
tau = taus[index]
p = ps[index]
axs[j, k].text(0.01, 0.99, f"Tau τ: {tau:.4f}\np-val: {p:.4f}", ha="left", va="top",
transform=axs[j, k].transAxes,
fontweight="bold")
fontweight="bold",
fontsize=12)
fig.tight_layout()
if save != "":

View File

@ -35,8 +35,8 @@ def plot_pie(data, labels, title, explode=None):
i += 1
plt.figure(figsize=(8, 6))
plt.pie(np.array(data), labels=labels, autopct=lambda pct: percent(pct / 100), explode=explode)
plt.title(title)
plt.pie(np.array(data), labels=labels, autopct=lambda pct: percent(pct / 100), explode=explode, textprops={"fontsize": 16})
plt.title(title, fontsize=20)
plt.tight_layout()
if save:
@ -53,9 +53,9 @@ def plot_hist(data, title, xlabel, ylabel):
plt.figure(figsize=(8, 6))
plt.hist(data, 25, edgecolor="black")
plt.title(title)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.title(title, fontsize=20)
plt.xlabel(xlabel, fontsize=16)
plt.ylabel(ylabel, fontsize=16)
plt.tight_layout()
if save:
@ -103,7 +103,7 @@ print("--- GPA ---")
print("n/a")
print("")
plot_hist(dataset[:, 2], "Distribúcia piemernu známok", "Piemerná známka", "Počet študentov/tiek")
plot_hist(dataset[:, 2], "Distribúcia piemernu známok", "Piemerná známka", "Počet študent*iek")
math = dataset[:, 3]
math_dist = [
@ -192,7 +192,7 @@ print(f"none : {percent(occupation_dist[5])}")
print("")
plot_pie(occupation_dist,
["Práca 10 a viac hodín týždenne", "Práca menej ako 10 hodín týždenne", "Šport", "Hudba", "Niečo iné",
["Práca 10 a viac\nhodín týždenne", "Práca menej ako\n10 hodín týždenne", "Šport", "Hudba", "Niečo iné",
"Žiadne"], "Distribúcia práce a aktivít")
living = dataset[:, 8]
@ -212,7 +212,7 @@ print(f"other : {percent(living_dist[4])}")
print("")
plot_pie(living_dist,
["S rodinou", "S rodinným príslušníkom/ou", "Sám/a alebo so spolubývajúcim/ou", "Intrák", "Iné"],
["S rodinou", "\nS rodinnou príslušní*čkou", "Sám*a alebo so\nspolubývajúc*ou", "Intrák", "Iné"],
"Distribúcia životných situácií")
commute = dataset[:, 9]
@ -253,4 +253,4 @@ print("--- ABSENCE ---")
print("n/a")
print("")
plot_hist(dataset[:, 11], "Distribúcia absencií", "Počet neprítomných hodín", "Počet študentov/tiek")
plot_hist(dataset[:, 11], "Distribúcia absencií", "Počet neprítomných hodín", "Počet študent*iek")

View File

@ -1,47 +1,9 @@
contourpy==1.3.1
cycler==0.12.1
filelock==3.16.1
fonttools==4.55.3
fsspec==2024.12.0
Jinja2==3.1.5
joblib==1.4.2
kiwisolver==1.4.7
MarkupSafe==3.0.2
matplotlib==3.10.0
mpmath==1.3.0
networkx==3.4.2
numpy==2.2.1
nvidia-cublas-cu12==12.4.5.8
nvidia-cuda-cupti-cu12==12.4.127
nvidia-cuda-nvrtc-cu12==12.4.127
nvidia-cuda-runtime-cu12==12.4.127
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.2.1.3
nvidia-curand-cu12==10.3.5.147
nvidia-cusolver-cu12==11.6.1.9
nvidia-cusparse-cu12==12.3.1.170
nvidia-nccl-cu12==2.21.5
nvidia-nvjitlink-cu12==12.4.127
nvidia-nvtx-cu12==12.4.127
packaging==24.2
pandas==2.2.3
pandas-flavor==0.6.0
patsy==1.0.1
pillow==11.0.0
pyparsing==3.2.0
python-dateutil==2.9.0.post0
pytz==2024.2
scikit-learn==1.6.0
scikit-posthocs==0.11.2
scipy==1.14.1
seaborn==0.13.2
setuptools==75.6.0
six==1.17.0
statsmodels==0.14.4
sympy==1.13.1
tabulate==0.9.0
threadpoolctl==3.5.0
torch==2.5.1
typing_extensions==4.12.2
tzdata==2024.2
xarray==2024.11.0
numpy
matplotlib
PyQt6
pandas
scipy
scikit_posthocs
tabulate
torch
scikit-learn

BIN
results.tar.gz Normal file

Binary file not shown.

BIN
results.zip Normal file

Binary file not shown.