功能应该是跟随
def count_ans():
count=0 for m in range(0,4): if quiz_dict[q_nos[m]]==ans_list[m]: ##### Square bracket was missing count += 1 return count #### Return was outside the function
我认为你不需要为xgboost、random forest和mlp做任何额外的事情。对于svc,您可以使用onevsrestClassifier(linearsvc()),然后您只需使用您提到的算法进行培训,并根据预测值对其进行调整,以获得最佳结果。