我是并行编程的新手。谁能帮助我让此代码在集群上并行运行?
for mail_name in mails_in_dir:
mail_msg = get_mail_from_file(mail_path + mail_name)
spam_probability = classify(mail_msg, spam_training_set, 0.2)
ham_probability = classify(mail_msg, ham_training_set, 0.8)
if spam_probability > ham_probability:
results[SPAM] += 1
else:
results[HAM] += 1
total_files = results[SPAM] + results[HAM]
spam_fraction = float(results[SPAM]) / total_files
ham_fraction = 1 - spam_fraction