本文整理汇总了Python中shogun.Features.CombinedFeatures.append_features方法的典型用法代码示例。如果您正苦于以下问题:Python CombinedFeatures.append_features方法的具体用法?Python CombinedFeatures.append_features怎么用?Python CombinedFeatures.append_features使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shogun.Features.CombinedFeatures
的用法示例。
在下文中一共展示了CombinedFeatures.append_features方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_combined_spectrum_features
# 需要导入模块: from shogun.Features import CombinedFeatures [as 别名]
# 或者: from shogun.Features.CombinedFeatures import append_features [as 别名]
def create_combined_spectrum_features(instances, feat_type):
"""
creates a combined spectrum feature object
"""
num_features = len(instances[0])
# contruct combined features
feat = CombinedFeatures()
for idx in range(num_features):
# cut column idx
data = [instance[idx] for instance in instances]
tmp_feat = get_spectrum_features(data, feat_type)
feat.append_features(tmp_feat)
return feat