hossam 0.3.19__py3-none-any.whl → 0.3.20__py3-none-any.whl
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.
- hossam/hs_classroom.py +21 -6
- {hossam-0.3.19.dist-info → hossam-0.3.20.dist-info}/METADATA +1 -1
- {hossam-0.3.19.dist-info → hossam-0.3.20.dist-info}/RECORD +7 -7
- {hossam-0.3.19.dist-info → hossam-0.3.20.dist-info}/WHEEL +0 -0
- {hossam-0.3.19.dist-info → hossam-0.3.20.dist-info}/entry_points.txt +0 -0
- {hossam-0.3.19.dist-info → hossam-0.3.20.dist-info}/licenses/LICENSE +0 -0
- {hossam-0.3.19.dist-info → hossam-0.3.20.dist-info}/top_level.txt +0 -0
hossam/hs_classroom.py
CHANGED
|
@@ -89,6 +89,11 @@ def cluster_students(
|
|
|
89
89
|
|
|
90
90
|
# ===== 1단계: 점수 기반 처리 =====
|
|
91
91
|
if score_cols is not None:
|
|
92
|
+
# 결측치는 0점으로 대체
|
|
93
|
+
for s in score_cols:
|
|
94
|
+
df[s] = df[s].fillna(0)
|
|
95
|
+
print(df)
|
|
96
|
+
|
|
92
97
|
# 총점/평균점수 계산
|
|
93
98
|
df['총점'] = df[score_cols].sum(axis=1)
|
|
94
99
|
df['평균점수'] = df[score_cols].mean(axis=1)
|
|
@@ -97,12 +102,22 @@ def cluster_students(
|
|
|
97
102
|
metric_col = '총점' if (score_metric or '').lower() != 'average' else '평균점수'
|
|
98
103
|
|
|
99
104
|
# 성적사분위 분류 (선택한 기준 사용)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
quantiles = [0, 0.25, 0.50, 0.75, 1.0]
|
|
106
|
+
n_bins = len(quantiles) - 1
|
|
107
|
+
labels = [f"Q{i+1}" for i in range(n_bins)]
|
|
108
|
+
try:
|
|
109
|
+
df['성적사분위'] = qcut(
|
|
110
|
+
df[metric_col],
|
|
111
|
+
q=quantiles,
|
|
112
|
+
labels=labels,
|
|
113
|
+
duplicates='drop' # 중복된 값 처리
|
|
114
|
+
)
|
|
115
|
+
except ValueError:
|
|
116
|
+
# 구간이 줄어든 경우, bins 개수에 맞게 labels 재생성
|
|
117
|
+
import pandas as pd
|
|
118
|
+
bins = pd.qcut(df[metric_col], q=quantiles, duplicates='drop').cat.categories
|
|
119
|
+
labels = [f"Q{i+1}" for i in range(len(bins))]
|
|
120
|
+
df['성적사분위'] = pd.qcut(df[metric_col], q=quantiles, labels=labels, duplicates='drop')
|
|
106
121
|
|
|
107
122
|
# 성적그룹 매핑
|
|
108
123
|
df['성적그룹'] = df['성적사분위'].map({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
hossam/NotoSansKR-Regular.ttf,sha256=0SCufUQwcVWrWTu75j4Lt_V2bgBJIBXl1p8iAJJYkVY,6185516
|
|
2
2
|
hossam/__init__.py,sha256=OHMVqGLMSbqM06zdwND9FITToVDG_fhzMYxreVzWEG8,2801
|
|
3
3
|
hossam/data_loader.py,sha256=UpC_gn-xUWij0s-MO51qrzJNz3b5-RCz1N6esQMZUJM,6320
|
|
4
|
-
hossam/hs_classroom.py,sha256=
|
|
4
|
+
hossam/hs_classroom.py,sha256=GxdrLermlJYcIgZ-6Y6ZE7DmVWyl8xe2mWfmsUbl9kw,26817
|
|
5
5
|
hossam/hs_gis.py,sha256=9ER8gXG2Or0DZ1fpbJR84WsNVPcxu788FsNtR6LsEgo,11379
|
|
6
6
|
hossam/hs_plot.py,sha256=7cngzrEeVeBvANyReI9kd3yHZGMOFZjvgBbBGA7rT2E,78467
|
|
7
7
|
hossam/hs_prep.py,sha256=RMeM6QPR-dsk3X_crJity8Tva8xY-mOXlcG3L7W-qjg,36220
|
|
@@ -19,9 +19,9 @@ hossam/mcp/hs_timeserise.py,sha256=Uc5ZKLv_sBe1tUdSZ0pmBuAFOQ_yX2MH8Me3DVeBp7c,7
|
|
|
19
19
|
hossam/mcp/hs_util.py,sha256=XsjOb9K5PUeAStgne-BluVUGyt0QEzN5wmFX77-yYGk,1237
|
|
20
20
|
hossam/mcp/loader.py,sha256=Ib11QUG8gV1V0TkMUz1g5kGsFJCApiwiwQ9N1cCy7bA,857
|
|
21
21
|
hossam/mcp/server.py,sha256=4B6ri8xwX22sA6OlNOWC4wN7Uwfgtt4gQ_HvROMNINo,21270
|
|
22
|
-
hossam-0.3.
|
|
23
|
-
hossam-0.3.
|
|
24
|
-
hossam-0.3.
|
|
25
|
-
hossam-0.3.
|
|
26
|
-
hossam-0.3.
|
|
27
|
-
hossam-0.3.
|
|
22
|
+
hossam-0.3.20.dist-info/licenses/LICENSE,sha256=nIqzhlcFY_2D6QtFsYjwU7BWkafo-rUJOQpDZ-DsauI,941
|
|
23
|
+
hossam-0.3.20.dist-info/METADATA,sha256=Q8pNH5Ioj9Xw-Z9agrr2ambybQwA-zjy4C5oWdMH0yc,5678
|
|
24
|
+
hossam-0.3.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
hossam-0.3.20.dist-info/entry_points.txt,sha256=0y7c7g_swXFS6See69i-4q_shcwUs-wIalfuvuYiA9I,53
|
|
26
|
+
hossam-0.3.20.dist-info/top_level.txt,sha256=_-7bwjhthHplWhywEaHIJX2yL11CQCaLjCNSBlk6wiQ,7
|
|
27
|
+
hossam-0.3.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|