等级改为6

This commit is contained in:
沈健
2025-04-17 15:36:50 +08:00
parent 916804115b
commit bc43c1457f
@@ -82,11 +82,11 @@ def calc_estate_charge_rating(community_summary_df):
actions = list()
count = 0
if len(df) < 5:
if len(df) < 6:
# 对于样本低于5的直接排名
df[target] = df['estate_charge'].rank(method='dense', ascending=False).astype(int)
else:
df = gmm_train(5, df, source, target)
df = gmm_train(6, df, source, target)
# 批量更新
for index, item in df.iterrows():
row = dict()