# Please review my HTM implementation in Rust

**URL:** <https://discourse.numenta.org/t/please-review-my-htm-implementation-in-rust/5709>\
**Category:** Implementations\
**Tags:** htm-implementations, help-wanted\
**Created:** [March 31, 2019, 10:35am UTC](https://discourse.numenta.org/t/please-review-my-htm-implementation-in-rust/5709 "2019-03-31T10:35:03Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![brev](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/brev/32/5548_2.png) [@brev](https://discourse.numenta.org/u/brev)\
**Post date:** [April 5, 2019, 9:38pm UTC](https://discourse.numenta.org/t/please-review-my-htm-implementation-in-rust/5709/16 "2019-04-05T21:38:54Z")

</div>

> [@sherif7810](#):
>
> May you explain this line?  
> There’s may be broadcasting, since `newInput` and `dutyCycles` have different sizes?

Hi @sherif7810, I went into some details on that function here:

> [@Spatial pooler boosting and duty cycles](https://discourse.numenta.org/t/spatial-pooler-boosting-and-duty-cycles/1571/10):
>
> I’m currently building my first Spatial Pooler, and am working on duty cycles now. I haven’t seen the calculation details documented anywhere, so just in case it’s helpful for other newbs in the future: In NuPIC, the calculation is a “running moving average”, which allows you to average with only the previous value, and the new value. The actual NuPIC calculation itself is here, and is used for all the different kinds of duty cycles: As noted previously, these dutyCycle values are fl…

In case it helps!

---

_[View the full topic](https://discourse.numenta.org/t/please-review-my-htm-implementation-in-rust/5709)._
