Nupic-----HTM学习(Spatial Classification)

Nupic—–HTM学习(Spatial Classification)

如果数据集不含有时间序列,则可以让nupic创建“spatial classification”模型。

packaging, height, weight, category  
glass, 6, 16, "salad dressing"  
cardboard, 12, 16, "cereal"  
plastic, 12, 64, "milk"  
plastic, 8, 16, "salad dressing"  
...

在这里, “category” 列是模型在所有其他列中给定数据时应输出的内容。与时态问题相比, 在 N-1 (或 N-2、N-3 等) 时的数据与 N 时的输出没有关系。

用OPF创建spatial classification模型

examples/opf/experiments/spatial_classification这个目录下有一些例子

下面是description.py中的三个重要区别,来区分spatial classification 和temporal prediction:
(见examples/opf/experiments/spatial_classification/base/description.py):

  1. The config[‘modelParams’][‘inferenceType’] will be ‘NontemporalClassification’ (in a temporal prediction experiment it will typically be ‘TemporalMultistep’).
  2. The config[‘modelparams’][‘clParams’][‘steps’] will be ‘0’.
  3. The encoder that encodes the predicted field has ‘classifierOnly’ set to True.
    在一些设置文件中能找到这些参数

inferenceType 设置告诉OPF应该在模型中放入什么算法组件。在当前的实现中, ’ NontemporalClassification ’ 告诉OPF建立一个只包含encoder和一个classifier的模型(没有空间或时间池)。

config中的参数['modelparams']['clParams']['steps'] 告诉classifier将当前输入与预测字段的当前值关联。

predicted field的encoder 的 “classifierOnly” 标志告诉OPF不将此字段放入网络底部。它只会作为分类输入送入classifier。注意: predicted field的名称在control [’ inferenceArgs ‘] [’ predictedField ‘] 的description.py中定义。

还有很多内容并没有翻译
请看原文章:https://discourse.numenta.org/t/spatial-classification/2152

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值