Hi Nicholas, With htm.java I use "getStats()" which returns the an array of probabilities for each input bucket. I don't know offhand what the equivalent method is in Python, but they should nearly the same. How this works:
If your inputs are "[Monday, Tuesday, Wednesday, Thursday, Friday]" and the most recent input was Wednesday, getStats() should return: "[0.0, 0.0, 0.0, 0.80, 0.0]" <-- which points to a high probability that the next predicted input should be Thursday Keep in mind also that this is a "one" step prediction. If you are using more "steps" then the highest probability in the stats will be the input - that many steps ahead of the current input. I believe the "steps" parameter is specified when constructing the classifier. Hope this helps, David On Wed, Jan 28, 2015 at 8:54 AM, Nicholas Mitri <[email protected]> wrote: > Hey all, > > The CLA classifier is passed the bucket index when its compute() is > called. How can I get that index? > I’ve been doing the following: > > results = self.classifier.compute(recordNum=record_num, > patternNZ=active_idx, > > classification={'bucketIdx': self.encoder.getBucketIndices(raw_inp)[0], > > 'actValue': raw_inp}, learn=True, infer=True) > > After reading the code more thoroughly, it seems like the > getBucketIndices() function returns the index of the first bit of the > bucket and not the actual bucket index which means that the predictions > I’ve been getting might very well be completely off. > > So my question is, if this not how the indices are queried for, what > function can I use to get them? > Also, does the record number need to be reset when a sequence ends and > another begins OR does it keep incrementing as long as we’re feeding the > network data? > > best, > Nick > -- *We find it hard to hear what another is saying because of how loudly "who one is", speaks...*
