Matt, as always, big thanks for pointing me in the right direction. I figured out a way around the problem.
On Wed, Apr 29, 2015 at 11:48 AM, Matthew Taylor <[email protected]> wrote: > So, I don't think the OPF works they way you want it to work. To do > the type of extension you want, you probably want to use the Network > API directly. The OPF is too high-level and inflexible, and there's no > guarantee that _getSPRegion() is going to do what you think it does > (it is scoped as a private function). > > See: > - https://github.com/numenta/nupic/wiki/NuPIC-Architecture > - http://numenta.org/docs/nupic.core/namespacenta.html > - Examples of Network API usage: > https://github.com/numenta/nupic/tree/master/examples/network > > --------- > Matt Taylor > OS Community Flag-Bearer > Numenta > > > On Tue, Apr 28, 2015 at 5:52 PM, Mateja Putic <[email protected]> wrote: > > I'm not an expert on object oriented Python. Could someone please > explain to > > me how to access a method on a region instance class from the abstract > > class? > > > > I have added a new method to nupic.research.spatial_pooler.SpatialPooler. > > I'm also using an OPF client that instantiates a CLAModel class, and it's > > configured to use a spatial pooler of type 'py'. The CLAModel class has a > > method called _getSPRegion that returns an object of type > > nupic.engine.Region, but I'm not sure how to access my new method from > this > > level. I see that Region has a method called 'executeCommand' and I tried > > passing in the name of my method, but it throws an Exception: Missing > > command method. > > > > What changes do I need to make so my new method is accessible from the > > Region class? > > > > -- > > Mr. Mateja Putic > > Ph.D Candidate > > Department of Electrical and Computer Engineering > > University of Virginia > > (703) 303-2099 > > -- Mr. Mateja Putic Ph.D Candidate Department of Electrical and Computer Engineering University of Virginia (703) 303-2099
