Brilliant!
Thank you Scott.

On Tue, Apr 12, 2016, 5:10 PM Scott Purdy <[email protected]> wrote:

> Short answer:
>
> yourRegionOutput = network["regionName"].getOutputData("outputName")
>
>
> The network actually contains Region instances[1] that contain an instance
> of a RegionImpl[2] subclass. The Region has the getOutputData method[3].
> But you were interacting with the Python region, which is contained within
> the PyRegion C++ class[4] (subclass of RegionImpl) in the network.
>
> This may sound like complicated internals but it is designed to support
> region implementations in multiple languages in the same network and to
> give more control over the RegionImpl subclasses by isolating the shared
> functions in the containing Region instance.
>
> [1]
> https://github.com/numenta/nupic.core/blob/4e9d0904dce71883dddd93bd27b15a5b19513487/src/nupic/engine/Region.hpp#L72
> [2]
> https://github.com/numenta/nupic.core/blob/4e9d0904dce71883dddd93bd27b15a5b19513487/src/nupic/engine/Region.hpp#L777
> [3]
> https://github.com/numenta/nupic.core/blob/4e9d0904dce71883dddd93bd27b15a5b19513487/src/nupic/engine/RegionImpl.hpp#L59
> [4]
> https://github.com/numenta/nupic.core/blob/4e9d0904dce71883dddd93bd27b15a5b19513487/src/nupic/regions/PyRegion.hpp#L43
>
> On Tue, Apr 12, 2016 at 8:39 AM, nasser alshammari <
> [email protected]> wrote:
>
>> Hey Matt,
>>
>> I actually did see that video :) and it, unfortunately, doesn't answer my
>> question. A tutorial on the network API would be something great.
>>
>> Best regards,
>> Nasser
>>
>> On Tue, Apr 12, 2016, 4:24 PM Matthew Taylor <[email protected]> wrote:
>>
>>> Nasser,
>>>
>>> Sorry it took me so long to get back to you. Have you seen this video?
>>> https://www.youtube.com/watch?v=g9yS9zFt3dM I'm not sure if it helps or
>>> not... we don't have a complete Network API tutorial yet, something I've
>>> been wanting to work on.
>>>
>>>
>>> ---------
>>> Matt Taylor
>>> OS Community Flag-Bearer
>>> Numenta
>>>
>>> On Thu, Apr 7, 2016 at 1:59 PM, nasser alshammari <
>>> [email protected]> wrote:
>>>
>>>> Dear all,
>>>>
>>>> I was playing around with the Network API and I would like to know if
>>>> there
>>>> is a general way (that applies for any regions) to read/view the output
>>>> of
>>>> a region. For example, I know that I can get the output from a
>>>> `py.AnomalyRegion` region by calling `getOutputData()` but that
>>>> function is
>>>> missing from the `py.SPRegion`.
>>>>
>>>> So, is this functionality region-specific or is there a network-level
>>>> way
>>>> of doing that operation.
>>>>
>>>> Many thanks for this awesome project,
>>>> ~ Nasser
>>>>
>>>
>>>
>

Reply via email to