当前位置: 首页>>代码示例>>Python>>正文


Python SonicScrewdriver.appendtodict方法代码示例

本文整理汇总了Python中SonicScrewdriver.appendtodict方法的典型用法代码示例。如果您正苦于以下问题:Python SonicScrewdriver.appendtodict方法的具体用法?Python SonicScrewdriver.appendtodict怎么用?Python SonicScrewdriver.appendtodict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SonicScrewdriver的用法示例。


在下文中一共展示了SonicScrewdriver.appendtodict方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: import SonicScrewdriver [as 别名]
# 或者: from SonicScrewdriver import appendtodict [as 别名]
    poetryFNs.append(poetryFN)

    fictionTPs.append(fictionTP)
    fictionFPs.append(fictionFP)
    fictionTNs.append(fictionTN)
    fictionFNs.append(fictionFN)

    dramaTPs.append(dramaTP)
    dramaFPs.append(dramaFP)
    dramaTNs.append(dramaTN)
    dramaFNs.append(dramaFN)

    for genre in genrestocheck:
        precision = predicted.genreaccuracy(genre, correctgenres)
        if precision <= 1:
            utils.appendtodict(genre, predicted.genrefeatures(genre), genrefeatures)
            utils.appendtodict(genre, precision, genreprecisions)
            utils.appendtodict(genre, True, modeledvols)
        else:
            utils.appendtodict(genre, False, modeledvols)
            # Precision > 1 is a signal that we actually have no true or false
            # positives in the volume for this genre. In that circumstance, we're
            # not going to use the volume to train a metamodel for the genre, because
            # it won't usefully guide what we want to guide -- assessment of the
            # accuracy of our positive predictions for this genre.
            #
            # So we don't append the genre features or precision to the arrays
            # that are going to be used to create a genre-specific metamodel.
            #
            # On the other hand, there could be false negatives in the volume, and
            # we want to acknowledge that when calculating overall recall.
开发者ID:deepfriedrabbit,项目名称:genre,代码行数:33,代码来源:logisticconfidence.py


注:本文中的SonicScrewdriver.appendtodict方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。