# Anomaly Score Difference betewen HTM studio and HTM.java

**URL:** <https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559>\
**Category:** HTM.Java\
**Tags:** htm\
**Created:** [July 20, 2017, 1:48am UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559 "2017-07-20T01:48:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wip\_user](https://avatars.discourse-cdn.com/v4/letter/w/848f3c/32.png) [@wip\_user](https://discourse.numenta.org/u/wip_user)\
**Post date:** [July 20, 2017, 1:48am UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559/1 "2017-07-20T01:48:53Z")

</div>

Hi  
I ran rec-center-hourly.csv file through HTM studio and HTM.java ,I got different anomaly scores , what could be the reason ? pls see attached picture of anomaly score

 ![](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/0/0027b5acd86aad486467a3e7c87aec473520f6b0.png)  
I have used **NetworkAPIDemo.java** in htm.java-examples git project.

---

<div class="post-metadata">

**Author:** ![wip\_user](https://avatars.discourse-cdn.com/v4/letter/w/848f3c/32.png) [@wip\_user](https://discourse.numenta.org/u/wip_user)\
**Post date:** [July 20, 2017, 5:07pm UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559/2 "2017-07-20T17:07:01Z")

</div>

@cogmission @rhyolight  
Could you pls comment on this.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [July 20, 2017, 5:30pm UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559/3 "2017-07-20T17:30:11Z")

</div>

HTM Studio uses a post-process call “anomaly likelihood” to help get anomaly indications. HTM.Java does not have this logic. There are also going to be variations in the way random numbers are generated on each system, so the numbers will never be exactly the same. That being said, I don’t think you are doing an “apples to apples” comparison here.

---

<div class="post-metadata">

**Author:** ![wip\_user](https://avatars.discourse-cdn.com/v4/letter/w/848f3c/32.png) [@wip\_user](https://discourse.numenta.org/u/wip_user)\
**Post date:** [July 20, 2017, 7:23pm UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559/4 "2017-07-20T19:23:52Z")

</div>

Thanks Matt , HTM studio results look more realistic . I was under impression that I get same results irrespective of language and tool as these tools/language use same algorithm . which is better to use in production python or Java?

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [July 20, 2017, 7:28pm UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559/5 "2017-07-20T19:28:52Z")

</div>

Well do you like Java or Python?

In NuPIC, you will have access to more tools, like the [OPF](http://nupic.docs.numenta.org/1.0.0/guides/opf.html) and [AnomalyLikelihood](http://nupic.docs.numenta.org/1.0.0/api/algorithms/anomaly-detection.html#module-nupic.algorithms.anomaly_likelihood).

---

<div class="post-metadata">

**Author:** ![wip\_user](https://avatars.discourse-cdn.com/v4/letter/w/848f3c/32.png) [@wip\_user](https://discourse.numenta.org/u/wip_user)\
**Post date:** [July 20, 2017, 8:57pm UTC](https://discourse.numenta.org/t/anomaly-score-difference-betewen-htm-studio-and-htm-java/2559/6 "2017-07-20T20:57:16Z")

</div>

Hi Matt,  
I have good experience in Java, python not much . I think AnomalyLikelihood is already available (@cogmission) in java

```
AnomalyLikelihood anomalyLikelihood =new AnomalyLikelihood(false,0,false ,200,200);
		  double anamolyLikelyhood =AnomalyLikelihood.anomalyProbability(Double.parseDouble(message.getRawValues()[0]),response.getAnomalyScore(),dateTime);

```

If python (NuPIC ) has more features compare , I would like to use python in production .
