a2.py 文件源码

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

项目:assignments 作者: iit-cs579 项目源码 文件源码
def cross_validation_accuracy(clf, X, labels, k):
    """
    Compute the average testing accuracy over k folds of cross-validation. You
    can use sklearn's KFold class here (no random seed, and no shuffling
    needed).

    Params:
      clf......A LogisticRegression classifier.
      X........A csr_matrix of features.
      labels...The true labels for each instance in X
      k........The number of cross-validation folds.

    Returns:
      The average testing accuracy of the classifier
      over each fold of cross-validation.
    """
    ###TODO
    pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号