features.py 文件源码

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

项目:AutoML-Challenge 作者: postech-mlg-exbrain 项目源码 文件源码
def _calculate(self, X, y, categorical, metafeatures, helpers):
        occurrences = helpers.get_value("ClassOccurrences")

        min_value = np.iinfo(np.int64).max
        if len(y.shape) == 2:
            for i in range(y.shape[1]):
                for num_occurrences in occurrences[i].values():
                    if num_occurrences < min_value:
                        min_value = num_occurrences
        else:
            for num_occurrences in occurrences.values():
                if num_occurrences < min_value:
                    min_value = num_occurrences
        return float(min_value) / float(y.shape[0])


# aka default accuracy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号