simulation_exp4p.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:striatum 作者: ntucllab 项目源码 文件源码
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]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号