dataClassifier.py 文件源码

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

项目:AI-PacMan-Projects 作者: deepeshmittal 项目源码 文件源码
def enhancedFeatureExtractorDigit(datum):
    """
    Your feature extraction playground.

    You should return a util.Counter() of features
    for this datum (datum is of type samples.Datum).

    ## DESCRIBE YOUR ENHANCED FEATURES HERE...

    ##
    """
    features =  basicFeatureExtractorDigit(datum)

    for x in range(DIGIT_DATUM_WIDTH):
        for y in range(DIGIT_DATUM_HEIGHT):
            if (datum.getPixel(x, y) > datum.getPixel(x, y - 1) ):
                features[(x, y, 0)] = 1
            else:
                features[(x, y, 0)] = 0
    return features
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号