人机协作机器学习入门与不确定性采样
人机协作机器学习起步
在人机协作机器学习中,有一个关键的代码片段用于识别异常值:
while(len(outliers) < number):
top_outlier = []
top_match = float("inf")
for item in unlabeled_data:
textid = item[0]
if textid in already_labeled:
continue
text = item[1]
features = text.split()
total_matches = 1 # start at 1 for slight smoothing
for feature in features:
if feature in total_feature_counts:
total_matches += total_feature_counts[feature]
ave_matches = total_matches / len(features)
if ave_matches < top_match:
top_match = ave_matches
top_outlier = item
# add this outlier to list and update what is 'l
超级会员免费看
订阅专栏 解锁全文
651

被折叠的 条评论
为什么被折叠?



