Dendrogram

Column

Dendrogram ishodi učenja (tri klastera)

Column

Broj studenata u klasterima

  Cluster  n
1       1 17
2       2 45
3       3 37

Silhouette

Row

Silhouette

Row

Silhouette info

Silhouette of 99 units in 3 clusters from silhouette.default(x = data3_cluster3$Cluster, dist = dist(data3)) :
 Cluster sizes and average silhouette widths:
       17        45        37 
0.2551505 0.1142679 0.2901968 
Individual silhouette widths:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.1634  0.1080  0.2031  0.2042  0.3250  0.4918 

Preporučeni broj klastera

Tablice studenata

Column

Svi studenti

Tablica svih studenata
osoba LO_1 LO_2 LO_3 LO_4 LO_5 LO_6 ukupno cluster neighbor sil_width
student_81 8.38 11.70 18.66 5.35 23.91 7.59 75.59 1 3 0.0161292
student_1 4.90 10.15 18.73 5.94 16.73 7.19 63.64 1 2 0.1042359
student_99 4.54 11.93 4.00 4.35 17.75 29.10 71.67 1 3 0.1099171
student_60 6.51 10.14 14.69 7.10 16.28 9.88 64.60 1 3 0.1160848
student_56 4.66 13.01 15.86 5.25 17.80 10.60 67.18 1 3 0.1766196
student_95 5.75 11.84 17.66 5.92 14.84 9.31 65.32 1 3 0.2179839
student_22 8.25 13.71 22.97 6.92 23.73 10.58 86.16 1 3 0.2565887
student_53 6.51 13.00 18.97 4.40 17.16 12.65 72.69 1 3 0.2724631
student_78 8.12 12.25 25.27 7.26 13.56 8.88 75.34 1 3 0.2770300
student_63 5.17 10.33 24.12 6.13 12.40 11.40 69.55 1 2 0.2778267
student_79 8.33 12.83 25.27 7.31 22.71 11.47 87.92 1 3 0.3285192
student_23 6.76 13.02 22.97 6.45 17.05 8.64 74.89 1 3 0.3332467
student_87 7.25 11.64 24.20 6.86 15.12 8.88 73.95 1 3 0.3399991
student_70 7.13 12.36 22.58 6.84 21.52 10.46 80.89 1 3 0.3587070
student_82 6.04 11.44 19.30 6.86 20.52 13.15 77.31 1 3 0.3606424
student_86 6.38 12.28 24.20 7.63 17.85 9.79 78.13 1 3 0.3791571
student_88 6.86 12.82 23.85 6.46 20.94 13.55 84.48 1 3 0.4124079
student_64 2.18 11.60 25.71 4.21 21.75 11.07 76.52 2 1 -0.1633962
student_20 5.69 12.33 7.73 4.73 16.17 3.66 50.31 2 3 -0.1582243
student_61 5.85 11.56 16.16 5.35 15.95 4.89 59.76 2 3 -0.0973356
student_69 5.44 10.54 22.58 2.99 20.57 8.46 70.58 2 1 -0.0906907
student_45 4.50 11.90 14.51 6.10 16.50 4.86 58.37 2 3 -0.0750362
student_17 6.62 9.57 4.00 5.61 12.24 2.16 40.20 2 3 -0.0369059
student_12 3.00 12.11 10.61 7.12 15.79 2.28 50.91 2 3 -0.0258133
student_8 5.13 9.21 11.12 6.46 15.48 6.17 53.57 2 3 -0.0156690
student_98 4.44 11.00 12.13 6.56 14.37 5.33 53.83 2 3 -0.0156436
student_37 5.61 11.05 11.43 4.56 15.68 6.81 55.14 2 3 -0.0013030
student_54 8.40 9.94 15.43 3.56 12.48 7.29 57.10 2 3 -0.0006254
student_11 5.57 9.81 9.43 6.27 13.44 1.60 46.12 2 3 0.0041666
student_44 5.14 8.54 11.00 4.86 20.84 5.98 56.36 2 3 0.0230291
student_96 5.69 8.91 23.84 2.26 20.17 7.25 68.12 2 1 0.0437297
student_41 3.39 13.01 12.47 3.29 17.56 10.16 59.88 2 1 0.0472016
student_49 7.29 9.06 5.00 2.30 17.94 3.19 44.78 2 3 0.0480158
student_9 4.25 11.48 11.12 5.04 15.84 5.71 53.44 2 3 0.0848514
student_89 3.73 11.11 3.00 5.18 13.75 5.59 42.36 2 3 0.1028887
student_35 2.33 9.74 3.00 6.77 15.09 4.43 41.36 2 3 0.1077949
student_33 4.94 8.50 3.00 6.06 13.10 0.60 36.20 2 3 0.1082713
student_51 4.08 12.99 18.66 2.92 14.32 6.76 59.73 2 1 0.1244170
student_77 4.03 9.43 25.27 4.78 14.65 3.60 61.76 2 1 0.1266362
student_26 3.88 10.32 3.00 3.96 18.13 4.72 44.01 2 3 0.1304836
student_97 7.00 5.10 19.25 1.93 15.50 9.33 58.11 2 1 0.1422908
student_30 4.64 5.69 3.00 6.85 11.84 4.23 36.25 2 3 0.1500039
student_55 2.02 13.98 15.22 2.43 16.15 7.34 57.14 2 1 0.1638307
student_40 4.42 8.92 13.01 5.35 16.50 6.93 55.13 2 3 0.1686274
student_3 3.35 9.67 19.31 5.59 15.76 4.50 58.18 2 1 0.1705258
student_75 5.58 8.65 4.00 4.01 15.41 2.29 39.94 2 3 0.1727787
student_58 6.10 8.00 12.00 4.08 16.50 2.31 48.99 2 3 0.1834742
student_10 7.61 2.72 11.07 3.09 0.00 1.95 26.44 2 3 0.1840969
student_50 4.99 10.09 5.00 2.87 16.31 2.89 42.15 2 3 0.1939295
student_43 2.38 5.53 11.00 4.80 21.52 8.03 53.26 2 3 0.2005761
student_34 3.38 9.94 3.00 3.66 17.55 0.33 37.86 2 3 0.2011218
student_59 3.85 11.17 12.60 4.50 15.59 3.73 51.44 2 3 0.2099980
student_24 3.33 10.66 3.00 3.60 16.29 2.47 39.35 2 3 0.2129886
student_42 6.72 5.58 10.00 2.32 11.16 9.07 44.85 2 3 0.2275335
student_92 2.08 8.33 5.00 6.28 8.42 4.61 34.72 2 3 0.2332407
student_48 4.01 5.46 5.00 3.61 18.36 0.35 36.79 2 3 0.2541967
student_7 5.75 6.89 11.12 2.50 16.43 1.00 43.69 2 3 0.2620335
student_2 2.49 10.04 19.47 2.67 15.99 5.43 56.09 2 1 0.2767399
student_91 3.17 4.23 3.00 3.98 6.65 0.19 21.22 2 3 0.2817269
student_68 3.41 2.58 8.00 3.67 7.57 3.39 28.62 2 3 0.2998961
student_73 2.13 7.53 6.00 3.68 14.00 0.60 33.94 2 3 0.3338157
student_62 2.33 8.13 16.16 3.28 10.78 5.25 45.93 2 1 0.3477869
student_52 6.77 8.69 18.85 6.52 17.48 4.43 62.74 3 1 -0.0135591
student_80 5.90 13.16 19.03 5.87 23.42 4.50 71.88 3 1 0.0247545
student_46 4.37 12.72 14.51 4.19 22.48 3.72 61.99 3 2 0.0623321
student_28 6.75 10.68 13.39 5.95 13.81 7.00 57.58 3 1 0.0703050
student_29 6.75 12.44 13.71 6.81 14.50 6.38 60.59 3 1 0.1220795
student_57 6.35 9.33 12.60 7.09 16.44 1.60 53.41 3 2 0.1391107
student_32 7.63 10.62 3.00 2.70 23.59 2.17 49.71 3 2 0.1400943
student_38 6.25 13.59 11.43 3.71 17.60 6.17 58.75 3 2 0.1643856
student_36 7.88 13.25 11.83 6.75 21.50 8.16 69.37 3 1 0.1811432
student_27 5.38 12.85 14.27 5.72 18.40 2.05 58.67 3 2 0.1905123
student_47 8.61 11.27 13.73 6.87 15.75 5.52 61.75 3 1 0.2030516
student_25 5.87 10.04 3.00 6.55 16.03 4.77 46.26 3 2 0.2146077
student_90 5.87 12.10 3.00 6.77 13.88 2.03 43.65 3 2 0.2299992
student_85 5.34 13.78 5.00 6.83 25.25 7.85 64.05 3 1 0.2396485
student_21 8.75 11.51 6.33 5.40 15.73 9.33 57.05 3 1 0.2676504
student_72 8.92 12.38 6.00 3.28 19.46 4.16 54.20 3 2 0.2758958
student_39 7.50 13.09 13.20 4.84 21.08 3.69 63.40 3 1 0.2868183
student_93 7.04 13.60 5.00 3.90 17.96 7.94 55.44 3 2 0.2951804
student_19 6.63 13.11 6.33 7.16 21.73 8.62 63.58 3 1 0.2970922
student_83 8.25 14.00 5.00 7.27 22.24 9.00 65.76 3 1 0.3099411
student_65 6.38 12.31 3.00 4.93 23.44 2.89 52.95 3 2 0.3215055
student_71 7.00 13.86 8.73 6.33 18.24 6.86 61.02 3 1 0.3632029
student_66 9.25 12.38 3.00 6.56 19.81 9.00 60.00 3 1 0.3686235
student_74 6.63 12.28 4.00 6.10 15.21 5.93 50.15 3 2 0.3721799
student_84 6.54 13.04 5.00 7.83 15.75 5.76 53.92 3 1 0.3816202
student_94 7.17 14.00 5.00 6.92 19.17 8.07 60.33 3 1 0.3880566
student_31 8.74 10.60 3.00 7.42 17.32 6.58 53.66 3 1 0.3994146
student_4 6.13 12.05 4.00 6.63 17.45 6.90 53.16 3 1 0.4123697
student_15 6.60 12.17 4.00 7.15 18.67 2.18 50.77 3 2 0.4213438
student_6 9.42 12.98 4.00 6.67 15.67 5.71 54.45 3 1 0.4220694
student_67 9.73 13.68 3.00 7.38 20.11 4.43 58.33 3 1 0.4242308
student_76 8.54 13.47 4.00 5.91 19.40 7.25 58.57 3 1 0.4387718
student_13 9.17 12.52 4.00 7.09 17.84 6.23 56.85 3 1 0.4461268
student_18 6.33 12.96 4.00 7.02 18.13 4.10 52.54 3 2 0.4602038
student_14 9.14 12.84 4.00 7.11 19.86 4.50 57.45 3 1 0.4603843
student_5 8.75 12.45 4.00 7.10 17.48 5.83 55.61 3 1 0.4642900
student_16 6.92 13.70 4.00 6.40 18.54 4.10 53.66 3 1 0.4918430

Column

Studenti u krivom klasteru

Tablica studenata u pogrešnom klasteru
osoba LO_1 LO_2 LO_3 LO_4 LO_5 LO_6 ukupno cluster neighbor sil_width
student_64 2.18 11.60 25.71 4.21 21.75 11.07 76.52 2 1 -0.1633962
student_20 5.69 12.33 7.73 4.73 16.17 3.66 50.31 2 3 -0.1582243
student_61 5.85 11.56 16.16 5.35 15.95 4.89 59.76 2 3 -0.0973356
student_69 5.44 10.54 22.58 2.99 20.57 8.46 70.58 2 1 -0.0906907
student_45 4.50 11.90 14.51 6.10 16.50 4.86 58.37 2 3 -0.0750362
student_17 6.62 9.57 4.00 5.61 12.24 2.16 40.20 2 3 -0.0369059
student_12 3.00 12.11 10.61 7.12 15.79 2.28 50.91 2 3 -0.0258133
student_8 5.13 9.21 11.12 6.46 15.48 6.17 53.57 2 3 -0.0156690
student_98 4.44 11.00 12.13 6.56 14.37 5.33 53.83 2 3 -0.0156436
student_37 5.61 11.05 11.43 4.56 15.68 6.81 55.14 2 3 -0.0013030
student_54 8.40 9.94 15.43 3.56 12.48 7.29 57.10 2 3 -0.0006254
student_52 6.77 8.69 18.85 6.52 17.48 4.43 62.74 3 1 -0.0135591

Silhouette (ručni zahvat)

Column

Napomena

Svi studenti iz klastera 2 s negativnom silhouettom su prebačeni u susjedni klaster.

Silhouette (nakon ručnog zahvata)

Column

info (nakon ručnog zahvata)

Silhouette of 99 units in 3 clusters from silhouette.default(x = klast, dist = dist(data3)) :
 Cluster sizes and average silhouette widths:
       19        34        46 
0.2181708 0.1250552 0.2647420 
Individual silhouette widths:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.1175  0.1125  0.2070  0.2078  0.3013  0.4702 

Tablice studenata (ručni zahvat)

Column

Svi studenti (nakon ručnog zahvata)

Tablica svih studenata
osoba LO_1 LO_2 LO_3 LO_4 LO_5 LO_6 ukupno cluster neighbor sil_width
student_81 8.38 11.70 18.66 5.35 23.91 7.59 75.59 1 3 0.0393863
student_60 6.51 10.14 14.69 7.10 16.28 9.88 64.60 1 3 0.0435366
student_1 4.90 10.15 18.73 5.94 16.73 7.19 63.64 1 3 0.0750490
student_99 4.54 11.93 4.00 4.35 17.75 29.10 71.67 1 3 0.1095378
student_69 5.44 10.54 22.58 2.99 20.57 8.46 70.58 1 2 0.1319685
student_95 5.75 11.84 17.66 5.92 14.84 9.31 65.32 1 3 0.1433346
student_56 4.66 13.01 15.86 5.25 17.80 10.60 67.18 1 3 0.1512356
student_64 2.18 11.60 25.71 4.21 21.75 11.07 76.52 1 2 0.2036695
student_78 8.12 12.25 25.27 7.26 13.56 8.88 75.34 1 3 0.2167920
student_22 8.25 13.71 22.97 6.92 23.73 10.58 86.16 1 3 0.2482913
student_53 6.51 13.00 18.97 4.40 17.16 12.65 72.69 1 3 0.2561440
student_63 5.17 10.33 24.12 6.13 12.40 11.40 69.55 1 3 0.2725998
student_87 7.25 11.64 24.20 6.86 15.12 8.88 73.95 1 3 0.2772415
student_23 6.76 13.02 22.97 6.45 17.05 8.64 74.89 1 3 0.2816578
student_79 8.33 12.83 25.27 7.31 22.71 11.47 87.92 1 3 0.3083319
student_86 6.38 12.28 24.20 7.63 17.85 9.79 78.13 1 3 0.3287792
student_70 7.13 12.36 22.58 6.84 21.52 10.46 80.89 1 3 0.3323920
student_82 6.04 11.44 19.30 6.86 20.52 13.15 77.31 1 3 0.3339811
student_88 6.86 12.82 23.85 6.46 20.94 13.55 84.48 1 3 0.3913173
student_11 5.57 9.81 9.43 6.27 13.44 1.60 46.12 2 3 -0.1175316
student_9 4.25 11.48 11.12 5.04 15.84 5.71 53.44 2 3 -0.0762605
student_44 5.14 8.54 11.00 4.86 20.84 5.98 56.36 2 3 -0.0463868
student_96 5.69 8.91 23.84 2.26 20.17 7.25 68.12 2 1 -0.0395391
student_41 3.39 13.01 12.47 3.29 17.56 10.16 59.88 2 1 -0.0279296
student_89 3.73 11.11 3.00 5.18 13.75 5.59 42.36 2 3 0.0156038
student_49 7.29 9.06 5.00 2.30 17.94 3.19 44.78 2 3 0.0337893
student_35 2.33 9.74 3.00 6.77 15.09 4.43 41.36 2 3 0.0386284
student_40 4.42 8.92 13.01 5.35 16.50 6.93 55.13 2 3 0.0467131
student_33 4.94 8.50 3.00 6.06 13.10 0.60 36.20 2 3 0.0516557
student_51 4.08 12.99 18.66 2.92 14.32 6.76 59.73 2 1 0.0571373
student_77 4.03 9.43 25.27 4.78 14.65 3.60 61.76 2 1 0.0719789
student_26 3.88 10.32 3.00 3.96 18.13 4.72 44.01 2 3 0.0923075
student_59 3.85 11.17 12.60 4.50 15.59 3.73 51.44 2 3 0.0949882
student_3 3.35 9.67 19.31 5.59 15.76 4.50 58.18 2 3 0.1074768
student_55 2.02 13.98 15.22 2.43 16.15 7.34 57.14 2 1 0.1121780
student_30 4.64 5.69 3.00 6.85 11.84 4.23 36.25 2 3 0.1163489
student_58 6.10 8.00 12.00 4.08 16.50 2.31 48.99 2 3 0.1268265
student_97 7.00 5.10 19.25 1.93 15.50 9.33 58.11 2 1 0.1296326
student_75 5.58 8.65 4.00 4.01 15.41 2.29 39.94 2 3 0.1386161
student_50 4.99 10.09 5.00 2.87 16.31 2.89 42.15 2 3 0.1669377
student_10 7.61 2.72 11.07 3.09 0.00 1.95 26.44 2 3 0.1775372
student_43 2.38 5.53 11.00 4.80 21.52 8.03 53.26 2 3 0.1793190
student_24 3.33 10.66 3.00 3.60 16.29 2.47 39.35 2 3 0.1871460
student_34 3.38 9.94 3.00 3.66 17.55 0.33 37.86 2 3 0.1875450
student_92 2.08 8.33 5.00 6.28 8.42 4.61 34.72 2 3 0.1943209
student_42 6.72 5.58 10.00 2.32 11.16 9.07 44.85 2 3 0.2104967
student_2 2.49 10.04 19.47 2.67 15.99 5.43 56.09 2 1 0.2419791
student_7 5.75 6.89 11.12 2.50 16.43 1.00 43.69 2 3 0.2553718
student_48 4.01 5.46 5.00 3.61 18.36 0.35 36.79 2 3 0.2643642
student_91 3.17 4.23 3.00 3.98 6.65 0.19 21.22 2 3 0.2882854
student_68 3.41 2.58 8.00 3.67 7.57 3.39 28.62 2 3 0.3063086
student_62 2.33 8.13 16.16 3.28 10.78 5.25 45.93 2 3 0.3320312
student_73 2.13 7.53 6.00 3.68 14.00 0.60 33.94 2 3 0.3339990
student_80 5.90 13.16 19.03 5.87 23.42 4.50 71.88 3 1 0.0144734
student_52 6.77 8.69 18.85 6.52 17.48 4.43 62.74 3 1 0.0506421
student_54 8.40 9.94 15.43 3.56 12.48 7.29 57.10 3 2 0.0544625
student_17 6.62 9.57 4.00 5.61 12.24 2.16 40.20 3 2 0.0797930
student_12 3.00 12.11 10.61 7.12 15.79 2.28 50.91 3 2 0.1092839
student_37 5.61 11.05 11.43 4.56 15.68 6.81 55.14 3 2 0.1128607
student_8 5.13 9.21 11.12 6.46 15.48 6.17 53.57 3 2 0.1206529
student_46 4.37 12.72 14.51 4.19 22.48 3.72 61.99 3 2 0.1260169
student_32 7.63 10.62 3.00 2.70 23.59 2.17 49.71 3 2 0.1321475
student_98 4.44 11.00 12.13 6.56 14.37 5.33 53.83 3 2 0.1453894
student_61 5.85 11.56 16.16 5.35 15.95 4.89 59.76 3 1 0.1514216
student_36 7.88 13.25 11.83 6.75 21.50 8.16 69.37 3 1 0.1569911
student_28 6.75 10.68 13.39 5.95 13.81 7.00 57.58 3 1 0.1603616
student_45 4.50 11.90 14.51 6.10 16.50 4.86 58.37 3 1 0.1720974
student_29 6.75 12.44 13.71 6.81 14.50 6.38 60.59 3 1 0.1922789
student_85 5.34 13.78 5.00 6.83 25.25 7.85 64.05 3 1 0.2070214
student_38 6.25 13.59 11.43 3.71 17.60 6.17 58.75 3 1 0.2135220
student_57 6.35 9.33 12.60 7.09 16.44 1.60 53.41 3 2 0.2244898
student_20 5.69 12.33 7.73 4.73 16.17 3.66 50.31 3 2 0.2279738
student_47 8.61 11.27 13.73 6.87 15.75 5.52 61.75 3 1 0.2347001
student_83 8.25 14.00 5.00 7.27 22.24 9.00 65.76 3 1 0.2663991
student_19 6.63 13.11 6.33 7.16 21.73 8.62 63.58 3 1 0.2672075
student_39 7.50 13.09 13.20 4.84 21.08 3.69 63.40 3 1 0.2706942
student_21 8.75 11.51 6.33 5.40 15.73 9.33 57.05 3 1 0.2739000
student_25 5.87 10.04 3.00 6.55 16.03 4.77 46.26 3 2 0.2757768
student_27 5.38 12.85 14.27 5.72 18.40 2.05 58.67 3 1 0.2830020
student_72 8.92 12.38 6.00 3.28 19.46 4.16 54.20 3 2 0.2837686
student_90 5.87 12.10 3.00 6.77 13.88 2.03 43.65 3 2 0.2915257
student_93 7.04 13.60 5.00 3.90 17.96 7.94 55.44 3 1 0.2962639
student_65 6.38 12.31 3.00 4.93 23.44 2.89 52.95 3 2 0.3183235
student_66 9.25 12.38 3.00 6.56 19.81 9.00 60.00 3 1 0.3305089
student_71 7.00 13.86 8.73 6.33 18.24 6.86 61.02 3 1 0.3517226
student_94 7.17 14.00 5.00 6.92 19.17 8.07 60.33 3 1 0.3575829
student_67 9.73 13.68 3.00 7.38 20.11 4.43 58.33 3 1 0.3842755
student_31 8.74 10.60 3.00 7.42 17.32 6.58 53.66 3 1 0.3845012
student_84 6.54 13.04 5.00 7.83 15.75 5.76 53.92 3 1 0.3877971
student_76 8.54 13.47 4.00 5.91 19.40 7.25 58.57 3 1 0.3982786
student_6 9.42 12.98 4.00 6.67 15.67 5.71 54.45 3 1 0.4029756
student_13 9.17 12.52 4.00 7.09 17.84 6.23 56.85 3 1 0.4131313
student_4 6.13 12.05 4.00 6.63 17.45 6.90 53.16 3 1 0.4154912
student_74 6.63 12.28 4.00 6.10 15.21 5.93 50.15 3 2 0.4159552
student_14 9.14 12.84 4.00 7.11 19.86 4.50 57.45 3 1 0.4203047
student_15 6.60 12.17 4.00 7.15 18.67 2.18 50.77 3 2 0.4348190
student_5 8.75 12.45 4.00 7.10 17.48 5.83 55.61 3 1 0.4348509
student_18 6.33 12.96 4.00 7.02 18.13 4.10 52.54 3 1 0.4622874
student_16 6.92 13.70 4.00 6.40 18.54 4.10 53.66 3 1 0.4702085

Column

Studenti u krivom klasteru (nakon ručnog zahvata)

Tablica studenata u pogrešnom klasteru
osoba LO_1 LO_2 LO_3 LO_4 LO_5 LO_6 ukupno cluster neighbor sil_width
student_11 5.57 9.81 9.43 6.27 13.44 1.60 46.12 2 3 -0.1175316
student_9 4.25 11.48 11.12 5.04 15.84 5.71 53.44 2 3 -0.0762605
student_44 5.14 8.54 11.00 4.86 20.84 5.98 56.36 2 3 -0.0463868
student_96 5.69 8.91 23.84 2.26 20.17 7.25 68.12 2 1 -0.0395391
student_41 3.39 13.01 12.47 3.29 17.56 10.16 59.88 2 1 -0.0279296

Silhouette svih verzija

Column

Silhouette (dobivena računalom)

info

Silhouette of 99 units in 3 clusters from silhouette.default(x = data3_cluster3$Cluster, dist = dist(data3)) :
 Cluster sizes and average silhouette widths:
       17        45        37 
0.2551505 0.1142679 0.2901968 
Individual silhouette widths:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.1634  0.1080  0.2031  0.2042  0.3250  0.4918 

Column

Silhouette (nakon ručnog zahvata)

info (nakon ručnog zahvata)

Silhouette of 99 units in 3 clusters from silhouette.default(x = klast, dist = dist(data3)) :
 Cluster sizes and average silhouette widths:
       19        34        46 
0.2181708 0.1250552 0.2647420 
Individual silhouette widths:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.1175  0.1125  0.2070  0.2078  0.3013  0.4702 

Funkcije gustoća

Column

Funkcije gustoća za pojedini ishod

Column

Funkcije gustoća za pojedini ishod unutar klastera

Planirani i ostvareni bodovi (slika1)

Tri klastera

Planirani i ostvareni bodovi (slika2)

Tri klastera

Planirani i ostvareni bodovi (slika3)

Tri klastera

Radar charts

Row

Uspjeh svih studenata

Uspjeh klastera 1

Row

Uspjeh klastera 2

Uspjeh klastera 3

Dendrogram

Column

Dendrogram logovi (3 klastera)

Column

Broj studenata u klasterima

# A tibble: 3 × 2
  klaster     n
    <int> <int>
1       1    23
2       2    74
3       3     2

Silhouette

Row

Silhouette

Row

Silhouette info

Silhouette of 99 units in 3 clusters from silhouette.default(x = logovi2_cluster$klaster, dist = dist_logdata) :
 Cluster sizes and average silhouette widths:
         23          74           2 
-0.08719971  0.42042458  0.15863279 
Individual silhouette widths:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.3170  0.1337  0.4035  0.2972  0.4699  0.5413 

Preporučeni broj klastera

Tablice studenata

Column

Svi studenti

Tablica svih studenata
Student BigBlueButton Datoteka Forum Izvjestaj_student Poveznica Povratna_informacija Radionica Stranica Sustav Test Wiki Zadaca Zoom_meeting Ukupno cluster neighbor sil_width
student_95 7 11 32 213 19 0 2 17 557 240 0 72 25 1195 1 2 -0.3169926
student_74 146 81 64 35 6 3 0 71 511 202 7 34 30 1190 1 2 -0.3069487
student_35 228 45 59 74 3 3 1 32 401 215 105 25 33 1224 1 2 -0.2562031
student_49 91 74 86 65 17 7 3 54 528 286 163 52 21 1447 1 2 -0.2170306
student_71 149 50 13 42 20 8 28 12 434 323 333 28 39 1479 1 2 -0.2017254
student_99 118 134 16 10 75 0 0 93 456 148 0 32 18 1100 1 2 -0.1866644
student_68 254 48 70 14 12 0 0 29 553 279 0 61 44 1364 1 2 -0.1746767
student_3 54 50 77 0 13 10 39 48 612 208 339 36 36 1522 1 2 -0.1601567
student_65 42 104 102 94 18 8 2 48 467 269 72 94 26 1346 1 2 -0.1324608
student_42 39 129 106 39 22 5 11 108 641 131 47 58 13 1349 1 2 -0.1228180
student_1 70 85 35 213 20 1 18 50 797 379 132 78 20 1898 1 2 -0.1146196
student_17 9 160 2 21 117 3 3 83 665 204 56 48 25 1396 1 2 -0.0858226
student_52 16 46 34 94 11 9 117 25 606 422 202 47 31 1660 1 2 -0.0728687
student_43 56 89 108 2 13 8 32 75 810 268 247 33 32 1773 1 2 -0.0685127
student_83 156 76 88 0 35 3 6 62 1122 340 129 66 23 2106 1 2 -0.0333260
student_39 10 118 65 193 54 8 16 51 688 387 17 52 32 1691 1 2 -0.0296017
student_69 31 105 96 72 15 7 45 92 683 266 226 88 20 1746 1 2 -0.0194259
student_80 127 89 66 3 20 13 60 37 554 291 491 84 20 1855 1 2 0.0059231
student_94 83 167 131 205 12 4 0 48 1196 294 52 60 30 2282 1 2 0.0615846
student_96 214 127 23 133 176 0 1 77 931 354 0 84 34 2154 1 2 0.0654418
student_23 36 200 85 0 33 6 14 179 1440 272 422 52 25 2764 1 2 0.1029550
student_84 352 107 94 47 25 8 7 92 1296 392 38 70 39 2567 1 2 0.1160883
student_79 95 169 175 6 63 6 68 131 1358 213 317 57 20 2678 1 2 0.1422680
student_41 67 73 38 0 5 5 38 58 780 416 161 96 38 1775 2 1 0.1070093
student_56 112 104 8 36 8 4 27 136 702 272 144 28 29 1610 2 1 0.1251203
student_44 40 129 46 50 27 1 23 49 598 255 85 109 40 1452 2 1 0.1639531
student_32 41 113 16 49 21 1 3 48 774 249 50 117 31 1513 2 1 0.2089839
student_61 140 54 55 0 12 4 36 29 431 195 59 20 55 1090 2 1 0.2450528
student_21 170 98 7 0 15 2 0 60 581 254 209 28 25 1449 2 1 0.2571570
student_64 56 36 37 5 1 12 19 14 270 245 183 73 23 974 2 1 0.2754967
student_89 60 84 73 6 30 1 1 85 567 264 47 38 25 1281 2 1 0.2908811
student_88 42 48 8 13 32 3 12 64 414 354 10 76 40 1116 2 1 0.3098433
student_2 36 66 57 0 2 1 32 45 339 262 357 39 25 1261 2 1 0.3257463
student_28 44 38 96 38 12 2 35 41 456 295 81 34 27 1199 2 1 0.3409756
student_76 100 62 7 2 2 5 4 60 457 333 58 50 36 1176 2 1 0.3465123
student_60 32 44 41 18 7 0 14 50 527 263 364 30 18 1408 2 1 0.3495995
student_37 72 37 84 33 6 5 12 19 321 287 24 31 41 972 2 1 0.3543682
student_26 16 31 7 0 7 7 0 32 389 189 81 108 29 896 2 1 0.3571990
student_48 27 73 93 14 21 3 0 55 426 229 91 36 20 1088 2 1 0.3746555
student_81 103 31 20 61 10 1 13 21 334 233 314 44 15 1200 2 1 0.3790318
student_70 39 70 87 13 21 3 15 39 389 175 117 61 27 1056 2 1 0.3816096
student_47 27 63 15 6 15 9 22 45 298 224 89 50 30 893 2 1 0.3832157
student_36 57 45 45 34 10 1 10 68 424 282 2 76 30 1084 2 1 0.3866401
student_20 54 55 58 18 4 7 22 30 362 272 161 36 24 1103 2 1 0.3925542
student_97 56 7 54 18 7 0 2 6 262 68 0 52 3 535 2 1 0.3983970
student_13 64 58 32 79 30 2 4 37 496 297 102 52 21 1274 2 1 0.3987665
student_82 85 58 43 44 11 2 12 58 469 282 183 22 25 1294 2 1 0.4015411
student_55 108 50 16 17 8 3 37 29 495 274 72 36 29 1174 2 1 0.4034778
student_59 15 38 81 86 14 1 17 25 489 262 61 37 16 1142 2 1 0.4069187
student_15 31 29 34 50 3 5 4 8 301 367 22 20 14 888 2 1 0.4082893
student_38 92 45 9 25 12 3 25 29 387 242 237 59 18 1183 2 1 0.4086608
student_19 29 91 2 14 11 4 0 34 254 228 224 70 25 986 2 1 0.4121881
student_57 12 82 32 34 11 5 22 29 410 326 91 36 26 1116 2 1 0.4147865
student_12 13 44 61 38 12 4 36 38 345 252 118 44 32 1037 2 1 0.4174103
student_16 4 55 5 57 24 8 1 9 229 206 25 46 15 684 2 1 0.4191251
student_66 16 37 46 19 19 7 0 58 472 233 93 24 25 1049 2 1 0.4198005
student_33 15 82 62 0 35 1 0 35 534 210 17 40 25 1056 2 1 0.4204862
student_9 31 31 75 31 2 1 28 26 393 250 120 38 37 1063 2 1 0.4251828
student_6 7 89 17 19 14 4 5 56 566 272 7 40 20 1116 2 1 0.4274586
student_62 127 60 17 21 11 1 19 45 396 244 116 22 24 1103 2 1 0.4288241
student_53 13 33 97 8 19 1 7 31 301 151 2 24 25 712 2 1 0.4290156
student_50 67 69 52 69 6 0 0 39 548 229 64 28 30 1201 2 1 0.4326096
student_46 19 43 83 3 16 1 12 21 405 238 207 38 23 1109 2 1 0.4338632
student_10 3 90 12 20 7 0 4 67 425 147 1 28 18 822 2 1 0.4434803
student_45 54 25 59 0 8 6 20 7 426 205 83 42 17 952 2 1 0.4486026
student_40 34 45 3 33 10 6 31 35 350 171 68 32 14 832 2 1 0.4506959
student_63 31 39 28 48 11 0 17 36 262 207 0 81 25 785 2 1 0.4590113
student_77 13 46 17 79 7 2 14 47 371 180 163 31 36 1006 2 1 0.4631084
student_14 27 45 6 67 1 3 0 10 268 256 6 30 6 725 2 1 0.4645493
student_78 69 38 10 5 11 3 6 26 700 235 22 53 22 1200 2 1 0.4656801
student_58 9 41 43 14 6 2 1 31 383 243 81 28 43 925 2 1 0.4682785
student_92 20 85 22 0 20 2 3 47 437 136 79 49 26 926 2 1 0.4695576
student_18 8 64 7 30 14 2 4 76 377 197 1 40 24 844 2 1 0.4701864
student_98 59 24 35 0 6 0 0 13 193 83 0 30 20 463 2 1 0.4755780
student_73 35 16 19 2 1 0 1 7 225 76 66 18 24 490 2 1 0.4807743
student_91 31 65 46 0 1 4 0 17 376 183 56 12 34 825 2 1 0.4813937
student_54 31 61 26 61 6 1 19 28 434 206 90 58 14 1035 2 1 0.4845340
student_86 25 70 25 50 8 2 23 13 505 225 141 24 23 1134 2 1 0.4879560
student_25 44 19 31 7 4 2 1 11 192 165 135 21 10 642 2 1 0.4983407
student_72 54 23 40 2 6 3 3 5 199 168 183 22 22 730 2 1 0.4996496
student_27 22 40 11 15 5 6 15 40 314 222 8 24 20 742 2 1 0.5002395
student_51 86 14 31 0 4 1 12 9 330 245 67 41 29 869 2 1 0.5032546
student_75 59 22 0 17 3 0 0 18 256 163 1 20 30 589 2 1 0.5034614
student_4 13 50 12 7 0 0 0 16 324 225 1 50 11 709 2 1 0.5035685
student_30 7 71 13 9 2 1 2 5 374 132 5 34 24 679 2 1 0.5068612
student_85 25 40 22 28 6 5 3 29 349 214 100 54 32 907 2 1 0.5082283
student_11 14 14 6 20 1 0 0 19 311 216 0 22 31 654 2 1 0.5158123
student_67 22 32 15 40 13 4 0 30 363 264 26 39 29 877 2 1 0.5173858
student_90 23 54 25 10 7 2 5 35 351 207 173 30 15 937 2 1 0.5241831
student_24 8 46 35 10 2 1 0 41 299 149 64 16 21 692 2 1 0.5252110
student_29 28 26 12 22 14 1 20 27 202 186 147 42 20 747 2 1 0.5264131
student_8 27 45 29 16 10 4 7 42 340 259 101 30 29 939 2 1 0.5272330
student_87 32 30 30 53 7 1 5 10 379 190 13 30 29 809 2 1 0.5294014
student_5 11 28 3 6 2 3 0 28 196 218 21 22 16 554 2 1 0.5301340
student_34 34 53 36 21 13 4 0 21 262 222 31 39 20 756 2 1 0.5352939
student_7 19 49 25 8 14 0 4 36 378 184 117 40 21 895 2 1 0.5396376
student_31 7 65 21 26 0 2 0 14 320 183 61 32 18 749 2 1 0.5413169
student_22 54 172 64 410 51 6 90 125 1391 428 465 146 32 3434 3 1 0.1157460
student_93 116 198 132 268 73 12 9 145 1570 504 120 162 92 3401 3 1 0.2015196

Studenti u krivom klasteru

Tablica studenata u pogrešnom klasteru
Student BigBlueButton Datoteka Forum Izvjestaj_student Poveznica Povratna_informacija Radionica Stranica Sustav Test Wiki Zadaca Zoom_meeting Ukupno cluster neighbor sil_width
student_95 7 11 32 213 19 0 2 17 557 240 0 72 25 1195 1 2 -0.3169926
student_74 146 81 64 35 6 3 0 71 511 202 7 34 30 1190 1 2 -0.3069487
student_35 228 45 59 74 3 3 1 32 401 215 105 25 33 1224 1 2 -0.2562031
student_49 91 74 86 65 17 7 3 54 528 286 163 52 21 1447 1 2 -0.2170306
student_71 149 50 13 42 20 8 28 12 434 323 333 28 39 1479 1 2 -0.2017254
student_99 118 134 16 10 75 0 0 93 456 148 0 32 18 1100 1 2 -0.1866644
student_68 254 48 70 14 12 0 0 29 553 279 0 61 44 1364 1 2 -0.1746767
student_3 54 50 77 0 13 10 39 48 612 208 339 36 36 1522 1 2 -0.1601567
student_65 42 104 102 94 18 8 2 48 467 269 72 94 26 1346 1 2 -0.1324608
student_42 39 129 106 39 22 5 11 108 641 131 47 58 13 1349 1 2 -0.1228180
student_1 70 85 35 213 20 1 18 50 797 379 132 78 20 1898 1 2 -0.1146196
student_17 9 160 2 21 117 3 3 83 665 204 56 48 25 1396 1 2 -0.0858226
student_52 16 46 34 94 11 9 117 25 606 422 202 47 31 1660 1 2 -0.0728687
student_43 56 89 108 2 13 8 32 75 810 268 247 33 32 1773 1 2 -0.0685127
student_83 156 76 88 0 35 3 6 62 1122 340 129 66 23 2106 1 2 -0.0333260
student_39 10 118 65 193 54 8 16 51 688 387 17 52 32 1691 1 2 -0.0296017
student_69 31 105 96 72 15 7 45 92 683 266 226 88 20 1746 1 2 -0.0194259

Vizualizacija klastera (BoxPlot)

Vizualizacija aktivnosti po klasterima

Broj logova po pojedinoj aktivnosti unutar pojedinih klastera

Broj logova po pojedinoj aktivnosti unutar pojedinih klastera

Postotak po aktivnosti

Column

Postotak aktivnosti po klasterima

Postotak logova po pojedinoj aktivnosti u odnosu na ukupni broj logova unutar samog klastera

Postotak logova po pojedinoj aktivnosti u odnosu na ukupni broj logova unutar samog klastera

Postotak aktivnosti po klasterima (sortirano)

Postotak logova po pojedinoj aktivnosti u odnosu na ukupni broj logova unutar samog klastera

Postotak logova po pojedinoj aktivnosti u odnosu na ukupni broj logova unutar samog klastera

Prosjek logova

Prosjek logova po klasterima

Prosječni broj logova po pojedinoj aktivnosti unutar pojedinog klastera

Prosječni broj logova po pojedinoj aktivnosti unutar pojedinog klastera

Tablica ishoda i logova

Column

Sortirano po ishod klasterima i ostvarenim bodovima

Tablica svih studenata s klasteriranjem po ishodima i logovima, sortirano po klasterima po ishodu i ostvarenim bodovima
Student Ukupno.ishod Ukupno.log cluster.ishod cluster.log sil_width.ishod sil_width.log
student_79 87.92 2678 1 1 0.3285192 0.1422680
student_22 86.16 3434 1 3 0.2565887 0.1157460
student_88 84.48 1116 1 2 0.4124079 0.3098433
student_70 80.89 1056 1 2 0.3587070 0.3816096
student_86 78.13 1134 1 2 0.3791571 0.4879560
student_82 77.31 1294 1 2 0.3606424 0.4015411
student_81 75.59 1200 1 2 0.0161292 0.3790318
student_78 75.34 1200 1 2 0.2770300 0.4656801
student_23 74.89 2764 1 1 0.3332467 0.1029550
student_87 73.95 809 1 2 0.3399991 0.5294014
student_53 72.69 712 1 2 0.2724631 0.4290156
student_99 71.67 1100 1 1 0.1099171 -0.1866644
student_63 69.55 785 1 2 0.2778267 0.4590113
student_56 67.18 1610 1 2 0.1766196 0.1251203
student_95 65.32 1195 1 1 0.2179839 -0.3169926
student_60 64.60 1408 1 2 0.1160848 0.3495995
student_1 63.64 1898 1 1 0.1042359 -0.1146196
student_64 76.52 974 2 2 -0.1633962 0.2754967
student_69 70.58 1746 2 1 -0.0906907 -0.0194259
student_96 68.12 2154 2 1 0.0437297 0.0654418
student_77 61.76 1006 2 2 0.1266362 0.4631084
student_41 59.88 1775 2 2 0.0472016 0.1070093
student_61 59.76 1090 2 2 -0.0973356 0.2450528
student_51 59.73 869 2 2 0.1244170 0.5032546
student_45 58.37 952 2 2 -0.0750362 0.4486026
student_3 58.18 1522 2 1 0.1705258 -0.1601567
student_97 58.11 535 2 2 0.1422908 0.3983970
student_55 57.14 1174 2 2 0.1638307 0.4034778
student_54 57.10 1035 2 2 -0.0006254 0.4845340
student_44 56.36 1452 2 2 0.0230291 0.1639531
student_2 56.09 1261 2 2 0.2767399 0.3257463
student_37 55.14 972 2 2 -0.0013030 0.3543682
student_40 55.13 832 2 2 0.1686274 0.4506959
student_98 53.83 463 2 2 -0.0156436 0.4755780
student_8 53.57 939 2 2 -0.0156690 0.5272330
student_9 53.44 1063 2 2 0.0848514 0.4251828
student_43 53.26 1773 2 1 0.2005761 -0.0685127
student_59 51.44 1142 2 2 0.2099980 0.4069187
student_12 50.91 1037 2 2 -0.0258133 0.4174103
student_20 50.31 1103 2 2 -0.1582243 0.3925542
student_58 48.99 925 2 2 0.1834742 0.4682785
student_11 46.12 654 2 2 0.0041666 0.5158123
student_62 45.93 1103 2 2 0.3477869 0.4288241
student_42 44.85 1349 2 1 0.2275335 -0.1228180
student_49 44.78 1447 2 1 0.0480158 -0.2170306
student_26 44.01 896 2 2 0.1304836 0.3571990
student_7 43.69 895 2 2 0.2620335 0.5396376
student_89 42.36 1281 2 2 0.1028887 0.2908811
student_50 42.15 1201 2 2 0.1939295 0.4326096
student_35 41.36 1224 2 1 0.1077949 -0.2562031
student_17 40.20 1396 2 1 -0.0369059 -0.0858226
student_75 39.94 589 2 2 0.1727787 0.5034614
student_24 39.35 692 2 2 0.2129886 0.5252110
student_34 37.86 756 2 2 0.2011218 0.5352939
student_48 36.79 1088 2 2 0.2541967 0.3746555
student_30 36.25 679 2 2 0.1500039 0.5068612
student_33 36.20 1056 2 2 0.1082713 0.4204862
student_92 34.72 926 2 2 0.2332407 0.4695576
student_73 33.94 490 2 2 0.3338157 0.4807743
student_68 28.62 1364 2 1 0.2998961 -0.1746767
student_10 26.44 822 2 2 0.1840969 0.4434803
student_91 21.22 825 2 2 0.2817269 0.4813937
student_80 71.88 1855 3 1 0.0247545 0.0059231
student_36 69.37 1084 3 2 0.1811432 0.3866401
student_83 65.76 2106 3 1 0.3099411 -0.0333260
student_85 64.05 907 3 2 0.2396485 0.5082283
student_19 63.58 986 3 2 0.2970922 0.4121881
student_39 63.40 1691 3 1 0.2868183 -0.0296017
student_52 62.74 1660 3 1 -0.0135591 -0.0728687
student_46 61.99 1109 3 2 0.0623321 0.4338632
student_47 61.75 893 3 2 0.2030516 0.3832157
student_71 61.02 1479 3 1 0.3632029 -0.2017254
student_29 60.59 747 3 2 0.1220795 0.5264131
student_94 60.33 2282 3 1 0.3880566 0.0615846
student_66 60.00 1049 3 2 0.3686235 0.4198005
student_38 58.75 1183 3 2 0.1643856 0.4086608
student_27 58.67 742 3 2 0.1905123 0.5002395
student_76 58.57 1176 3 2 0.4387718 0.3465123
student_67 58.33 877 3 2 0.4242308 0.5173858
student_28 57.58 1199 3 2 0.0703050 0.3409756
student_14 57.45 725 3 2 0.4603843 0.4645493
student_21 57.05 1449 3 2 0.2676504 0.2571570
student_13 56.85 1274 3 2 0.4461268 0.3987665
student_5 55.61 554 3 2 0.4642900 0.5301340
student_93 55.44 3401 3 3 0.2951804 0.2015196
student_6 54.45 1116 3 2 0.4220694 0.4274586
student_72 54.20 730 3 2 0.2758958 0.4996496
student_84 53.92 2567 3 1 0.3816202 0.1160883
student_16 53.66 684 3 2 0.4918430 0.4191251
student_31 53.66 749 3 2 0.3994146 0.5413169
student_57 53.41 1116 3 2 0.1391107 0.4147865
student_4 53.16 709 3 2 0.4123697 0.5035685
student_65 52.95 1346 3 1 0.3215055 -0.1324608
student_18 52.54 844 3 2 0.4602038 0.4701864
student_15 50.77 888 3 2 0.4213438 0.4082893
student_74 50.15 1190 3 1 0.3721799 -0.3069487
student_32 49.71 1513 3 2 0.1400943 0.2089839
student_25 46.26 642 3 2 0.2146077 0.4983407
student_90 43.65 937 3 2 0.2299992 0.5241831

Column

Sortirano po log klasterima i ukupnim logovima

Tablica svih studenata s klasteriranjem po ishodima i logovima, sortirano po klasterima po logovima i ukupnim logovima
Student Ukupno.ishod Ukupno.log cluster.ishod cluster.log sil_width.ishod sil_width.log
student_23 74.89 2764 1 1 0.3332467 0.1029550
student_79 87.92 2678 1 1 0.3285192 0.1422680
student_84 53.92 2567 3 1 0.3816202 0.1160883
student_94 60.33 2282 3 1 0.3880566 0.0615846
student_96 68.12 2154 2 1 0.0437297 0.0654418
student_83 65.76 2106 3 1 0.3099411 -0.0333260
student_1 63.64 1898 1 1 0.1042359 -0.1146196
student_80 71.88 1855 3 1 0.0247545 0.0059231
student_43 53.26 1773 2 1 0.2005761 -0.0685127
student_69 70.58 1746 2 1 -0.0906907 -0.0194259
student_39 63.40 1691 3 1 0.2868183 -0.0296017
student_52 62.74 1660 3 1 -0.0135591 -0.0728687
student_3 58.18 1522 2 1 0.1705258 -0.1601567
student_71 61.02 1479 3 1 0.3632029 -0.2017254
student_49 44.78 1447 2 1 0.0480158 -0.2170306
student_17 40.20 1396 2 1 -0.0369059 -0.0858226
student_68 28.62 1364 2 1 0.2998961 -0.1746767
student_42 44.85 1349 2 1 0.2275335 -0.1228180
student_65 52.95 1346 3 1 0.3215055 -0.1324608
student_35 41.36 1224 2 1 0.1077949 -0.2562031
student_95 65.32 1195 1 1 0.2179839 -0.3169926
student_74 50.15 1190 3 1 0.3721799 -0.3069487
student_99 71.67 1100 1 1 0.1099171 -0.1866644
student_41 59.88 1775 2 2 0.0472016 0.1070093
student_56 67.18 1610 1 2 0.1766196 0.1251203
student_32 49.71 1513 3 2 0.1400943 0.2089839
student_44 56.36 1452 2 2 0.0230291 0.1639531
student_21 57.05 1449 3 2 0.2676504 0.2571570
student_60 64.60 1408 1 2 0.1160848 0.3495995
student_82 77.31 1294 1 2 0.3606424 0.4015411
student_89 42.36 1281 2 2 0.1028887 0.2908811
student_13 56.85 1274 3 2 0.4461268 0.3987665
student_2 56.09 1261 2 2 0.2767399 0.3257463
student_50 42.15 1201 2 2 0.1939295 0.4326096
student_78 75.34 1200 1 2 0.2770300 0.4656801
student_81 75.59 1200 1 2 0.0161292 0.3790318
student_28 57.58 1199 3 2 0.0703050 0.3409756
student_38 58.75 1183 3 2 0.1643856 0.4086608
student_76 58.57 1176 3 2 0.4387718 0.3465123
student_55 57.14 1174 2 2 0.1638307 0.4034778
student_59 51.44 1142 2 2 0.2099980 0.4069187
student_86 78.13 1134 1 2 0.3791571 0.4879560
student_6 54.45 1116 3 2 0.4220694 0.4274586
student_57 53.41 1116 3 2 0.1391107 0.4147865
student_88 84.48 1116 1 2 0.4124079 0.3098433
student_46 61.99 1109 3 2 0.0623321 0.4338632
student_20 50.31 1103 2 2 -0.1582243 0.3925542
student_62 45.93 1103 2 2 0.3477869 0.4288241
student_61 59.76 1090 2 2 -0.0973356 0.2450528
student_48 36.79 1088 2 2 0.2541967 0.3746555
student_36 69.37 1084 3 2 0.1811432 0.3866401
student_9 53.44 1063 2 2 0.0848514 0.4251828
student_33 36.20 1056 2 2 0.1082713 0.4204862
student_70 80.89 1056 1 2 0.3587070 0.3816096
student_66 60.00 1049 3 2 0.3686235 0.4198005
student_12 50.91 1037 2 2 -0.0258133 0.4174103
student_54 57.10 1035 2 2 -0.0006254 0.4845340
student_77 61.76 1006 2 2 0.1266362 0.4631084
student_19 63.58 986 3 2 0.2970922 0.4121881
student_64 76.52 974 2 2 -0.1633962 0.2754967
student_37 55.14 972 2 2 -0.0013030 0.3543682
student_45 58.37 952 2 2 -0.0750362 0.4486026
student_8 53.57 939 2 2 -0.0156690 0.5272330
student_90 43.65 937 3 2 0.2299992 0.5241831
student_92 34.72 926 2 2 0.2332407 0.4695576
student_58 48.99 925 2 2 0.1834742 0.4682785
student_85 64.05 907 3 2 0.2396485 0.5082283
student_26 44.01 896 2 2 0.1304836 0.3571990
student_7 43.69 895 2 2 0.2620335 0.5396376
student_47 61.75 893 3 2 0.2030516 0.3832157
student_15 50.77 888 3 2 0.4213438 0.4082893
student_67 58.33 877 3 2 0.4242308 0.5173858
student_51 59.73 869 2 2 0.1244170 0.5032546
student_18 52.54 844 3 2 0.4602038 0.4701864
student_40 55.13 832 2 2 0.1686274 0.4506959
student_91 21.22 825 2 2 0.2817269 0.4813937
student_10 26.44 822 2 2 0.1840969 0.4434803
student_87 73.95 809 1 2 0.3399991 0.5294014
student_63 69.55 785 1 2 0.2778267 0.4590113
student_34 37.86 756 2 2 0.2011218 0.5352939
student_31 53.66 749 3 2 0.3994146 0.5413169
student_29 60.59 747 3 2 0.1220795 0.5264131
student_27 58.67 742 3 2 0.1905123 0.5002395
student_72 54.20 730 3 2 0.2758958 0.4996496
student_14 57.45 725 3 2 0.4603843 0.4645493
student_53 72.69 712 1 2 0.2724631 0.4290156
student_4 53.16 709 3 2 0.4123697 0.5035685
student_24 39.35 692 2 2 0.2129886 0.5252110
student_16 53.66 684 3 2 0.4918430 0.4191251
student_30 36.25 679 2 2 0.1500039 0.5068612
student_11 46.12 654 2 2 0.0041666 0.5158123
student_25 46.26 642 3 2 0.2146077 0.4983407
student_75 39.94 589 2 2 0.1727787 0.5034614
student_5 55.61 554 3 2 0.4642900 0.5301340
student_97 58.11 535 2 2 0.1422908 0.3983970
student_73 33.94 490 2 2 0.3338157 0.4807743
student_98 53.83 463 2 2 -0.0156436 0.4755780
student_22 86.16 3434 1 3 0.2565887 0.1157460
student_93 55.44 3401 3 3 0.2951804 0.2015196
---
title: "DSTG - Klasteriranje po ishodima i logovima"
output: 
  flexdashboard::flex_dashboard:
    social: menu
    orientation: columns
    vertical_layout: fill
    source_code: embed
---

```{css, echo=FALSE}
.sidebar { overflow: auto; }
.dataTables_scrollBody {
    height:95% !important;
    max-height:95% !important;
}
.chart-stage-flex {
    overflow:auto !important;
}
```

```{r setup, include=FALSE}
library(readxl)
library(tidyverse)
library(tidytext)
library(cluster)
library(knitr)
library(kableExtra)
library(tidyverse)
library(corrplot)
library(dendextend)
library(factoextra)
library(circlize)
library(fmsb)

data1 <- read_excel('DSTG_ishodi.xlsx', sheet=1)
data1 <- na.omit(data1)

data2 <- data1 %>% select(LO_1:LO_6) 
data3 <- data.frame(scale(data2))

dist_student <- dist(data3)
hc_ward <- hclust(dist_student, method = "ward.D2")
ward_dend <- as.dendrogram(hc_ward) #%>% set("labels", 1:99)

ward_dend_color3 <- color_branches(ward_dend, k=3, col=c("#00BA38","#619CFF","#F8766D"))

klasteri3 <- cutree(hc_ward, k=3)
data3_cluster3 <- data3 %>% mutate(Cluster = klasteri3)
#data1_cluster3 <- data1 %>% mutate(Cluster = klasteri3)

AS <- data1 %>% summarise_at(vars(LO_1:LO_6), mean, na.rm = TRUE)

# rez3 <- data1_cluster3 %>% group_by(Cluster) %>% 
#         summarise_at(vars(LO_1:LO_6), mean, na.rm = TRUE) %>% 
#         gather(learning_outcome, Average, LO_1:LO_6)
# rez3 <- rez3 %>% 
#         add_row(Cluster=rep(0,6), learning_outcome=c("LO_1","LO_2","LO_3","LO_4","LO_5","LO_6"), 
#                 Average=as.numeric(AS))
# rez3$Cluster <- factor(rez3$Cluster)
# levels(rez3$Cluster) <- c("All", "1", "2", "3")

bodovi <- c(10,14,26,8,26,16)

boje <- c("#C77CFF","#F8766D","#00BA38","#619CFF")


sil3 <- silhouette(data3_cluster3$Cluster, dist(data3))
rez1 <- data.frame(unclass(sil3))
tablica <- data1 %>% rowwise() %>% mutate(ukupno = sum(c_across(LO_1:LO_6), na.rm = T)) %>% ungroup()
tablica1 <- tablica %>% bind_cols(rez1) %>% group_by(cluster) %>% arrange(sil_width, .by_group = TRUE)
tablica1 <- tablica1 %>% ungroup()

#viz3 <- data3_cluster3 %>% gather(learning_outcome, Scores, LO_1:LO_6)

hl <- data.frame(learning_outcome=c("LO_1","LO_2","LO_3","LO_4","LO_5","LO_6"), 
                 Scores=c(10,14,26,8,26,16),
                 xcor1=rep(2.5,6), xcor2=rep(3,6), ycor=c(12,16,28,10,28,18))

klast <- c()
for (i in 1:length(sil3[,"cluster"])) {
  ifelse(sil3[,"sil_width"][i] < 0 && sil3[,"cluster"][i] == 2, klast[i] <- sil3[,"neighbor"][i], klast[i] <- sil3[,"cluster"][i])
}
sil3_novi <- silhouette(klast, dist(data3))
rez2 <- data.frame(unclass(sil3_novi))

tablica2 <- tablica %>% bind_cols(rez2) %>% group_by(cluster) %>% arrange(sil_width, .by_group = TRUE)
tablica2 <- tablica2 %>% ungroup()

data3_cluster3_novi <- data3 %>% mutate(Cluster = klast)
viz3_novi <- data3_cluster3_novi %>% gather(learning_outcome, Scores, LO_1:LO_6)

data1_cluster3_novi <- data1 %>% mutate(Cluster = klast)
rez3_novi <- data1_cluster3_novi %>% group_by(Cluster) %>% 
        summarise_at(vars(LO_1:LO_6), mean, na.rm = TRUE) %>% 
        gather(learning_outcome, Average, LO_1:LO_6)
rez3_novi <- rez3_novi %>% 
        add_row(Cluster=rep(0,6), learning_outcome=c("LO_1","LO_2","LO_3","LO_4","LO_5","LO_6"), 
                Average=as.numeric(AS))
rez3_novi$Cluster <- factor(rez3_novi$Cluster)
levels(rez3_novi$Cluster) <- c("All", "1", "2", "3")

radar <- data.frame(
  LO_1 = c(10, 0), LO_2 = c(14, 0), LO_3 = c(26, 0),
  LO_4 = c(8, 0), LO_5 = c(26, 0), LO_6 = c(16, 0))
kl1 <- t(rez3_novi %>% filter(Cluster==1) %>% select(Average))
kl2 <- t(rez3_novi %>% filter(Cluster==2) %>% select(Average))
kl3 <- t(rez3_novi %>% filter(Cluster==3) %>% select(Average))
colnames(kl1) <- c("LO_1", "LO_2", "LO_3", "LO_4", "LO_5","LO_6")
colnames(kl2) <- c("LO_1", "LO_2", "LO_3", "LO_4", "LO_5","LO_6")
colnames(kl3) <- c("LO_1", "LO_2", "LO_3", "LO_4", "LO_5","LO_6")
radar <- radar %>% bind_rows(AS, as_tibble(kl1), as_tibble(kl2), as_tibble(kl3))
rownames(radar) <- c("Max", "Min", "All", "Cluster 1", "Cluster 2", "Cluster 3")

logovi <- read_excel('studenti_komponente.xlsx', sheet=1)
logovi <- logovi %>% replace(is.na(.), 0)
logovi <- logovi %>% select(!c(Chat, Journal, Napomene_zadaca, Pregledni_izvjestaj, Vodici_korisnici,
                               Odabir, Postavljanje_datoteke))
logovi_long <- logovi %>% pivot_longer(cols = !Student, names_to="Aktivnost", values_to = "Vrijednost")

logovi2 <- as_tibble(data.frame(scale(logovi %>% select(!Student))))

dist_logdata <- dist(logovi2)
hc_logdata <- hclust(dist_logdata, method = "ward.D2")
dend_logdata <- as.dendrogram(hc_logdata) %>% place_labels(parse_number(logovi$Student))

br_klast <- 3
dend_color_logdata <- color_branches(dend_logdata, k=br_klast, col=c("#00BA38","#619CFF","#F8766D"))
klasteri_logdata <- cutree(hc_logdata, k=br_klast)
logovi2_cluster <- logovi2 %>% mutate(klaster = klasteri_logdata)
sil_logovi <- silhouette(logovi2_cluster$klaster, dist_logdata)

analiza1 <- logovi %>% rowwise() %>% mutate(Ukupno = sum(c_across(!Student), na.rm = T)) %>% ungroup()
tablica_logovi <- analiza1 %>% bind_cols(data.frame(unclass(sil_logovi))) %>% group_by(cluster) %>% arrange(sil_width, .by_group = TRUE) %>% ungroup()

logs0 <- logovi %>% mutate(klaster=0) %>% pivot_longer(cols = !c(Student,klaster), names_to="Aktivnost", values_to = "Vrijednost")
logs1 <- logovi %>% mutate(klaster = klasteri_logdata) %>% filter(klaster == 1) %>% 
  pivot_longer(cols = !c(Student,klaster), names_to="Aktivnost", values_to = "Vrijednost")
logs2 <- logovi %>% mutate(klaster = klasteri_logdata) %>% filter(klaster == 2) %>% 
  pivot_longer(cols = !c(Student,klaster), names_to="Aktivnost", values_to = "Vrijednost")
logs3 <- logovi %>% mutate(klaster = klasteri_logdata) %>% filter(klaster == 3) %>% 
  pivot_longer(cols = !c(Student,klaster), names_to="Aktivnost", values_to = "Vrijednost")
logoviSVI <- logs0 %>% add_row(logs1) %>% add_row(logs2) %>% add_row(logs3)
logoviSVI$klaster <- factor(logoviSVI$klaster)
levels(logoviSVI$klaster) <- c("All", "1", "2", "3")

avg1 <-logovi %>% mutate(klaster = klasteri_logdata) %>% group_by(klaster) %>% summarize_at(vars(BigBlueButton:Zoom_meeting), list(mean))
avg2 <- logovi %>% summarize_at(vars(BigBlueButton:Zoom_meeting), list(mean)) %>% add_column(klaster=0, .before="BigBlueButton")
avg <- avg2 %>% bind_rows(avg1)
avg$klaster <- factor(avg$klaster)
levels(avg$klaster) <- c("All", "1", "2", "3")
avg <- avg %>% pivot_longer(BigBlueButton:Zoom_meeting, names_to="Aktivnost", values_to="Vrijednost")

postotak0 <- logs0 %>% mutate(suma = sum(Vrijednost)) %>% group_by(Aktivnost) %>% 
  summarize(postotak = sum(Vrijednost) / suma, .groups="drop_last") %>% 
  distinct() %>% mutate(klaster=0)
postotak1 <- logs1 %>% mutate(suma = sum(Vrijednost)) %>% group_by(Aktivnost) %>% 
  summarize(postotak = sum(Vrijednost) / suma, .groups="drop_last") %>% 
  distinct() %>% mutate(klaster=1)
postotak2 <- logs2 %>% mutate(suma = sum(Vrijednost)) %>% group_by(Aktivnost) %>% 
  summarize(postotak = sum(Vrijednost) / suma, .groups="drop_last") %>% 
  distinct() %>% mutate(klaster=2)
postotak3 <- logs3 %>% mutate(suma = sum(Vrijednost)) %>% group_by(Aktivnost) %>% 
  summarize(postotak = sum(Vrijednost) / suma, .groups="drop_last") %>% 
  distinct() %>% mutate(klaster=3)
postotak_klasteri <- postotak0 %>% add_row(postotak1) %>% 
  add_row(postotak2) %>% add_row(postotak3)
postotak_klasteri$klaster <- factor(postotak_klasteri$klaster)
levels(postotak_klasteri$klaster) <- c("All", "1", "2", "3")

studenti_ishodi <- tablica %>% bind_cols(rez1) %>% 
  select(Student=osoba, Ukupno=ukupno, cluster, sil_width)
studenti_logovi <- analiza1 %>% bind_cols(data.frame(unclass(sil_logovi))) %>% 
  select(Student, Ukupno, cluster, sil_width)
studenti_SVE <- studenti_ishodi %>% 
  inner_join(studenti_logovi, by="Student", suffix=c(".ishod", ".log")) %>%
  relocate(Ukupno.log, .after=Ukupno.ishod) %>%
  relocate(cluster.log, .after=cluster.ishod)
```


Dendrogram {data-navmenu="Klasteriranje po ishodima"}
=======================================================================

Column {data-width=800}
-------------------------------------

### Dendrogram ishodi učenja (tri klastera)
```{r fig.width=18,fig.height=10}
circlize_dendrogram(ward_dend_color3, dend_track_height = 0.8)
```

Column {data-width=100}
-------------------------------------

### Broj studenata u klasterima
```{r}
data3_cluster3 %>% count(Cluster)
```

Silhouette {data-navmenu="Klasteriranje po ishodima"}
=======================================================================

Row {data-width=500}
-------------------------------------

### Silhouette

```{r}
fviz_silhouette(sil3, print.summary=FALSE)
```

Row {data-width=400}
-------------------------------------

### Silhouette info {data-height=200}
```{r}
summary(sil3)
```

### Preporučeni broj klastera {data-height=400}
```{r}
fviz_nbclust(data3, FUN = hcut, method = "silhouette")
```

Tablice studenata {data-navmenu="Klasteriranje po ishodima"}
=======================================================================

Column {data-width=500}
-------------------------------------

### Svi studenti

```{r}
tablica1 %>%
  kbl(caption = "Tablica svih studenata") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

Column {data-width=500}
-------------------------------------

### Studenti u krivom klasteru

```{r}
tablica1 %>% filter(sil_width<0) %>%
  kbl(caption = "Tablica studenata u pogrešnom klasteru") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

Silhouette (ručni zahvat) {data-navmenu="Klasteriranje po ishodima"}
=======================================================================

Column {data-width=600}
-------------------------------------

### Napomena {data-height=100}
Svi studenti iz klastera **2** s negativnom silhouettom su prebačeni u susjedni klaster.

### Silhouette (nakon ručnog zahvata) {data-height=800}
```{r}
fviz_silhouette(sil3_novi, print.summary=FALSE)
```

Column {data-width=300}
-------------------------------------

### info (nakon ručnog zahvata)
```{r}
summary(sil3_novi)
```

Tablice studenata (ručni zahvat) {data-navmenu="Klasteriranje po ishodima"}
=======================================================================

Column {data-width=500}
-------------------------------------

### Svi studenti (nakon ručnog zahvata)

```{r}
tablica2 %>%
  kbl(caption = "Tablica svih studenata") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

Column {data-width=500}
-------------------------------------

### Studenti u krivom klasteru (nakon ručnog zahvata)

```{r}
tablica2 %>% filter(sil_width<0) %>%
  kbl(caption = "Tablica studenata u pogrešnom klasteru") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

Silhouette svih verzija {data-navmenu="Klasteriranje po ishodima"}
=======================================================================

Column {data-width=300}
-------------------------------------

### Silhouette (dobivena računalom)
```{r}
fviz_silhouette(sil3, print.summary=FALSE)
```

### info
```{r}
summary(sil3)
```

Column {data-width=300}
-------------------------------------

### Silhouette (nakon ručnog zahvata)
```{r}
fviz_silhouette(sil3_novi, print.summary=FALSE)
```

### info (nakon ručnog zahvata)
```{r}
summary(sil3_novi)
```

Funkcije gustoća {data-navmenu="Vizualizacije klastera po ishodima"}
=======================================================================

Column {data-width=250}
-------------------------------------

### Funkcije gustoća za pojedini ishod

```{r}
ggplot(viz3_novi, aes(x=Scores, fill=learning_outcome, color=learning_outcome)) + 
  geom_density(alpha=.2) +
  facet_wrap(~learning_outcome) + theme(legend.position="none") + ylim(0,1.5)
```

Column {data-width=500}
-------------------------------------

### Funkcije gustoća za pojedini ishod unutar klastera

```{r}
ggplot(viz3_novi, aes(x=Scores, fill=learning_outcome, color=learning_outcome)) + 
  geom_density(alpha=.2) + facet_grid(Cluster ~ learning_outcome) + ylim(0,1.5) +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),legend.position="none")
```

Planirani i ostvareni bodovi (slika1) {data-navmenu="Vizualizacije klastera po ishodima"}
=======================================================================

### Tri klastera

```{r fig.width=15}
ggplot(rez3_novi, aes(x=learning_outcome, y=Average, fill=Cluster, color=Cluster)) + 
  geom_bar(stat="identity", width=0.4, position = position_dodge(width=0.9)) +
  geom_segment(aes(x=0.6,xend=1.4,y=bodovi[1],yend=bodovi[1]),color="black") +
  geom_segment(aes(x=1.6,xend=2.4,y=bodovi[2],yend=bodovi[2]),color="black") +
  geom_segment(aes(x=2.6,xend=3.4,y=bodovi[3],yend=bodovi[3]),color="black") +
  geom_segment(aes(x=3.6,xend=4.4,y=bodovi[4],yend=bodovi[4]),color="black") +
  geom_segment(aes(x=4.6,xend=5.4,y=bodovi[5],yend=bodovi[5]),color="black") +
  geom_segment(aes(x=5.6,xend=6.4,y=bodovi[6],yend=bodovi[6]),color="black") +
  geom_text(x=1, y=10.7, label=bodovi[1], color="black") +
  geom_text(x=2, y=14.7, label=bodovi[2], color="black") +
  geom_text(x=3, y=26.7, label=bodovi[3], color="black") +
  geom_text(x=4, y=8.7, label=bodovi[4], color="black") +
  geom_text(x=5, y=26.7, label=bodovi[5], color="black") +
  geom_text(x=6, y=16.7, label=bodovi[6], color="black") +
  geom_text(aes(label=round(Average,2)), position=position_dodge(width=0.9), vjust=-0.5) +
  scale_fill_manual(values = c("#C77CFF","#F8766D","#00BA38","#619CFF")) +
  scale_color_manual(values = c("#C77CFF","#F8766D","#00BA38","#619CFF"))
```

Planirani i ostvareni bodovi (slika2) {data-navmenu="Vizualizacije klastera po ishodima"}
=======================================================================

### Tri klastera

```{r fig.width=10}
ggplot() + 
  geom_bar(data=rez3_novi, aes(x=Cluster, y=Average, fill=Cluster, color=Cluster), stat="identity", width=0.65, position = position_dodge(width=0.9)) +
  facet_wrap(~learning_outcome) + 
  geom_hline(data= hl, aes(yintercept=Scores), linetype="dotted") +
  geom_text(data = hl, aes(x=xcor1, y=ycor, label=Scores)) +
  geom_text(data=rez3_novi, aes(x=Cluster, y=Average, label=round(Average,2)), vjust=1.5) +
  scale_fill_manual(values = c("#C77CFF","#F8766D","#00BA38","#619CFF")) +
  scale_color_manual(values = c("#C77CFF","#F8766D","#00BA38","#619CFF"))
```


Planirani i ostvareni bodovi (slika3) {data-navmenu="Vizualizacije klastera po ishodima"}
=======================================================================

### Tri klastera

```{r fig.width=9}
ggplot(data=rez3_novi, aes(x=Cluster, y=Average, fill=Cluster, color=Cluster)) + 
  geom_bar(stat="identity", width=0.65, position = position_dodge(width=0.9)) +
  geom_text(aes(label=round(Average,2)), vjust=-0.3) + expand_limits(y = c(0, 27)) +
  facet_wrap(~learning_outcome, scales="free",
             labeller=as_labeller(c(LO_1="LO_1 (max: 10)", LO_2="LO_2 (max: 14)", LO_3="LO_3 (max: 26)",
                                  LO_4="LO_4 (max: 8)", LO_5="LO_5 (max: 26)", LO_6="LO_6 (max: 16)"))) +
  scale_fill_manual(values = c("#C77CFF","#F8766D","#00BA38","#619CFF")) +
  scale_color_manual(values = c("#C77CFF","#F8766D","#00BA38","#619CFF"))
```

Radar charts {data-navmenu="Vizualizacije klastera po ishodima"}
=====================================

Row {data-width=200}
-----------------------------------------------------------------------

### Uspjeh svih studenata

```{r, echo = F}
#knitr::include_graphics("radar_svi.png")
par(mar=c(1,1,1,1))
radarchart(radar[c(1:3),], axistype=2, pcol = c(boje[1]),
           pfcol = scales::alpha(c(boje[1]), 0.5), 
           plty = 1, plwd = 1.5, vlcex = 0.9, palcex = 0.8, pty=20, cglcol = "grey", cglty = 1)
legend(
  x = "bottomright", legend = rownames(radar[3,]), horiz = FALSE,
  pch = 20 , col = boje[1], cex=0.8,
  text.col = "black", xpd=TRUE
)
```

### Uspjeh klastera 1

```{r, echo = F}
#knitr::include_graphics("radar_svi_klaster1.png")
par(mar=c(1,1,1,1))
radarchart(radar[c(1:3,4),], axistype=2, pcol = c(boje[1],boje[2]),
           pfcol = scales::alpha(c(boje[1],boje[2]), 0.3), 
           plty = 1, plwd = 1.5, vlcex = 0.9, palcex = 0.8, pty=20, cglcol = "grey", cglty = 1)
legend(
  x = "bottomright", legend = rownames(radar[c(3,4),]), horiz = FALSE,
  pch = 20 , col = boje[1:2], cex=0.8,
  text.col = "black", xpd=TRUE
)
```

Row {data-width=200}
-----------------------------------------------------------------------

### Uspjeh klastera 2

```{r, echo = F}
#knitr::include_graphics("radar_svi_klaster2.png")
par(mar=c(1,1,1,1))
radarchart(radar[c(1:3,5),], axistype=2, pcol = c(boje[1],boje[3]),
           pfcol = scales::alpha(c(boje[1],boje[3]), 0.3), 
           plty = 1, plwd = 1.5, vlcex = 0.9, palcex = 0.8, pty=20, cglcol = "grey", cglty = 1)
legend(
  x = "bottomright", legend = rownames(radar[c(3,5),]), horiz = FALSE,
  pch = 20 , col = boje[c(1,3)], cex=0.8,
  text.col = "black", xpd=TRUE
)
```

### Uspjeh klastera 3

```{r, echo = F}
#knitr::include_graphics("radar_svi_klaster3.png")
par(mar=c(1,1,1,1))
radarchart(radar[c(1:3,6),], axistype=2, pcol = c(boje[1],boje[4]),
           pfcol = scales::alpha(c(boje[1],boje[4]), 0.3), 
           plty = 1, plwd = 1.5, vlcex = 0.9, palcex = 0.8, pty=20, cglcol = "grey", cglty = 1)
legend(
  x = "bottomright", legend = rownames(radar[c(3,6),]), horiz = FALSE,
  pch = 20 , col = boje[c(1,4)], cex=0.8,
  text.col = "black", xpd=TRUE
)
```

Dendrogram {data-navmenu="Klasteriranje po logovima"}
=======================================================================

Column {data-width=800}
-------------------------------------

### Dendrogram logovi (3 klastera)
```{r fig.width=18,fig.height=10}
circlize_dendrogram(dend_color_logdata, dend_track_height = 0.8)
```

Column {data-width=100}
-------------------------------------

### Broj studenata u klasterima
```{r}
logovi2_cluster %>% count(klaster)
```

Silhouette {data-navmenu="Klasteriranje po logovima"}
=======================================================================

Row {data-width=500}
-------------------------------------

### Silhouette
```{r}
fviz_silhouette(sil_logovi, print.summary=FALSE)
```

Row {data-width=400}
-------------------------------------

### Silhouette info {data-height=200}
```{r}
summary(sil_logovi)
```

### Preporučeni broj klastera {data-height=400}
```{r}
fviz_nbclust(logovi2, FUN = hcut, method = "silhouette")
```

Tablice studenata {data-navmenu="Klasteriranje po logovima"}
=======================================================================

Column {.tabset}
-------------------------------------

### Svi studenti

```{r}
tablica_logovi %>%
  kbl(caption = "Tablica svih studenata") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

### Studenti u krivom klasteru

```{r}
tablica_logovi %>% filter(sil_width<0) %>%
  kbl(caption = "Tablica studenata u pogrešnom klasteru") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

Vizualizacija klastera (BoxPlot) {data-navmenu="Vizualizacija klastera po logovima"}
=======================================================================

### Vizualizacija aktivnosti po klasterima
```{r fig.width=12, fig.cap='Broj logova po pojedinoj aktivnosti unutar pojedinih klastera'}
ggplot(logoviSVI, aes(x=klaster, y=Vrijednost, group=klaster)) + 
  geom_boxplot() + facet_wrap(vars(Aktivnost), scales="free", ncol=5) + 
  xlab('') + ylab('')
```

Postotak po aktivnosti {data-navmenu="Vizualizacija klastera po logovima"}
=======================================================================

Column {.tabset}
-------------------------------------

### Postotak aktivnosti po klasterima
```{r fig.width=12, fig.cap='Postotak logova po pojedinoj aktivnosti u odnosu na ukupni broj logova unutar samog klastera'}
ggplot(postotak_klasteri, aes(x=Aktivnost, y=postotak, group=Aktivnost)) + 
  geom_bar(stat="identity",fill="#ff2560") + 
  facet_wrap(vars(klaster), ncol=1) +
  geom_text(data=postotak_klasteri, aes(x=Aktivnost, y=postotak, label=sprintf("%0.2f%%",round(postotak*100,2))), vjust=-0.5) +
  scale_y_continuous(labels = scales::percent_format(), limits=c(0,0.6)) + xlab('') + ylab('') + 
  theme(axis.text.x=element_text(size=rel(0.8)))
```

### Postotak aktivnosti po klasterima (sortirano)
```{r fig.width=12, fig.cap='Postotak logova po pojedinoj aktivnosti u odnosu na ukupni broj logova unutar samog klastera'}
ggplot(postotak_klasteri, aes(x=reorder_within(Aktivnost,postotak,klaster), y=postotak, group=Aktivnost)) + 
  geom_bar(stat="identity",fill="#ff2560") + 
  facet_wrap(vars(klaster), ncol=1, scales = "free_x") +
  geom_text(data=postotak_klasteri, aes(x=reorder_within(Aktivnost,postotak,klaster), y=postotak, label=sprintf("%0.2f%%",round(postotak*100,2))), vjust=-0.5) +
  scale_y_continuous(labels = scales::percent_format(), limits=c(0,0.6)) + xlab('') + ylab('') +
  scale_x_reordered() +
  theme(axis.text.x=element_text(size=rel(0.8)))
```

Prosjek logova {data-navmenu="Vizualizacija klastera po logovima"}
=======================================================================

### Prosjek logova po klasterima
```{r fig.width=12, fig.cap='Prosječni broj logova po pojedinoj aktivnosti unutar pojedinog klastera'}
ggplot(logoviSVI, aes(x=klaster, y=Vrijednost, group=klaster, fill=factor(klaster))) + 
  geom_bar(stat="summary", fun=mean) +
  facet_wrap(vars(Aktivnost), scales="free", ncol=5) + 
  scale_fill_manual(values=boje) +
  geom_text(data = avg, aes(x=klaster, y=Vrijednost, label=round(Vrijednost,2)), vjust=-0.25, size=3) + 
  xlab('') + ylab('') + theme(legend.position = "none") +
  scale_y_continuous(limits = c(0, NA), expand = expansion(mult = c(0, 0.2)))
```


Tablica ishoda i logova
=======================================================================

Column {data-width=500}
-------------------------------------

### Sortirano po *ishod* klasterima i ostvarenim bodovima

```{r}
studenti_SVE %>% group_by(cluster.ishod) %>% 
  arrange(desc(Ukupno.ishod), .by_group = TRUE) %>%
  kbl(caption = "Tablica svih studenata s klasteriranjem po ishodima i logovima, sortirano po klasterima po ishodu i ostvarenim bodovima") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```

Column {data-width=500}
-------------------------------------

### Sortirano po *log* klasterima i ukupnim logovima

```{r}
studenti_SVE %>% group_by(cluster.log) %>% 
  arrange(desc(Ukupno.log), .by_group = TRUE) %>%
  kbl(caption = "Tablica svih studenata s klasteriranjem po ishodima i logovima, sortirano po klasterima po logovima i ukupnim logovima") %>%
  kable_classic("hover",full_width = F, html_font = "Cambria")
```