from sklearn import metrics
metrics.adjusted_rand_score(df.pre_type,df.pre_type_2)
image.png
计算两列一致性
df['bool'] = np.where(df['pre_type'] == df['pre_type_2'], 1, 0)
print(df['bool'].sum())
image.png
from sklearn import metrics
metrics.adjusted_rand_score(df.pre_type,df.pre_type_2)
image.png
计算两列一致性
df['bool'] = np.where(df['pre_type'] == df['pre_type_2'], 1, 0)
print(df['bool'].sum())
image.png
本文标题:ARI指标计算
本文链接:https://www.haomeiwen.com/subject/sjfajrtx.html
网友评论