def train_expert(history_context, history_action):
n_round = len(history_context)
history_context = np.array([history_context[t] for t in range(n_round)])
history_action = np.array([history_action[t] for t in range(n_round)])
logreg = OneVsRestClassifier(LogisticRegression())
mnb = OneVsRestClassifier(MultinomialNB())
logreg.fit(history_context, history_action)
mnb.fit(history_context, history_action)
return [logreg, mnb]
评论列表
文章目录