# Asymmetric confidence when predicting a symmetric signal

**URL:** <https://discourse.numenta.org/t/asymmetric-confidence-when-predicting-a-symmetric-signal/5640>\
**Category:** Numenta Theory\
**Created:** [March 18, 2019, 7:18pm UTC](https://discourse.numenta.org/t/asymmetric-confidence-when-predicting-a-symmetric-signal/5640 "2019-03-18T19:18:08Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![pulinagrawal](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/pulinagrawal/32/3121_2.png) [@pulinagrawal](https://discourse.numenta.org/u/pulinagrawal)\
**Post date:** [May 2, 2019, 10:55pm UTC](https://discourse.numenta.org/t/asymmetric-confidence-when-predicting-a-symmetric-signal/5640/28 "2019-05-02T22:55:13Z")

</div>

So I observed from some debugging that the `actualValues` (and possibly `probabilities`), obtained as a consequence of running the code at [http://nupic.docs.numenta.org/1.0.5/quick-start/network.html#getting-predictions](http://nupic.docs.numenta.org/1.0.5/quick-start/network.html#getting-predictions) (quoted below), **do not produce correct values.**

```
def getPredictionResults(network, clRegionName):
  """Helper function to extract results for all prediction steps."""

  classifierRegion = network.regions[clRegionName]
  actualValues = classifierRegion.getOutputData("actualValues")
  probabilities = classifierRegion.getOutputData("probabilities")
  steps = classifierRegion.getSelf().stepsList

  N = classifierRegion.getSelf().maxCategoryCount
  results = {step: {} for step in steps}
  for i in range(len(steps)):
    # stepProbabilities are probabilities for this prediction step only.
    stepProbabilities = probabilities[i * N:(i + 1) * N - 1]
    mostLikelyCategoryIdx = stepProbabilities.argmax()
    predictedValue = actualValues[mostLikelyCategoryIdx]
    predictionConfidence = stepProbabilities[mostLikelyCategoryIdx]
    results[steps[i]]["predictedValue"] = predictedValue
    results[steps[i]]["predictionConfidence"] = predictionConfidence
  return results

```

`actualValues` is supposed to be a map from bucket index to an estimate of the actual input value that encoder will see in that bucket and `probabilities` is supposed to be a map from bucket index to probability.

Let me show you the output `actualValues` and `probabilities` for first couple of values.

first input is 0.5 (corresponds to a bucket index of ‘89’)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/1/179a2d4db61e2a2495c84586bf9cc21de8702734.jpeg)

second input is 0.53270155 (corresponding to a bucket index of ‘94’)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/6/66de5a7c9fd24168d43fc61c06e10fd830b982f7.jpeg)

A more detailed view of `actualValues` shows that all the values till index 88 are 0.53270155 and 89th value is 0.5 and rest are 0.0. Similarly, `probabilities` are all 0.011111 till index 89 and rest are 0.0.

It seems that any bucket that is not yet seen is filled by the most recent value in `actualValues`. I am not sure about the exact calculations of probabilities but if the same kind of problem is going on with `probabilities` then it will cause problems with the “predictionConfidence”

---

_[View the full topic](https://discourse.numenta.org/t/asymmetric-confidence-when-predicting-a-symmetric-signal/5640)._
