# HTM.Java

**URL:** https://discourse.numenta.org/c/engineering/htm-java/27.md

[Latest](https://discourse.numenta.org/latest.md) · [Categories](https://discourse.numenta.org/categories.md) · [Tags](https://discourse.numenta.org/tags.md)

---

## [About the HTM.Java category](https://discourse.numenta.org/t/about-the-htm-java-category/69)

<div class="topic-metadata">

**Author:** [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Replies:** 0\
**Last updated:** [May 9, 2016, 10:56pm UTC](https://discourse.numenta.org/t/about-the-htm-java-category/69 "2016-05-09T22:56:12Z")

</div>

HTM.Java is a port of NuPIC for the JVM. It includes the complete Network API and is curated by @cogmission.

---

## [Where is the open user activity, HTM projects seem out of date](https://discourse.numenta.org/t/where-is-the-open-user-activity-htm-projects-seem-out-of-date/11204)

<div class="topic-metadata">

**Author:** [@Berlin\_Brown](https://discourse.numenta.org/u/Berlin_Brown)\
**Replies:** 6\
**Last updated:** [February 2, 2024, 9:27pm UTC](https://discourse.numenta.org/t/where-is-the-open-user-activity-htm-projects-seem-out-of-date/11204 "2024-02-02T21:27:00Z")

</div>

I guess I am more a java guy anyway but a lot of the projects seem out of date or didn’t work. I tried htm legacy python and htm java, I see issues there. I went ahead and forked it and I am not a gradle fan so will tr…

---

## [Dependency problem from maven release](https://discourse.numenta.org/t/dependency-problem-from-maven-release/2042)

<div class="topic-metadata">

**Author:** [@kasperjj](https://discourse.numenta.org/u/kasperjj)\
**Replies:** 13\
**Last updated:** [June 28, 2022, 7:30am UTC](https://discourse.numenta.org/t/dependency-problem-from-maven-release/2042 "2022-06-28T07:30:56Z")

</div>

I'm having problems including htm.java in my build due to a dependency problem: Could not resolve all dependencies for configuration ':compile'. \> Could not find algorithmfoundry:algorithmfoundry-shade-culled:1.3. …

---

## [Decoding in HTM](https://discourse.numenta.org/t/decoding-in-htm/9173)

<div class="topic-metadata">

**Author:** [@hodor-cna](https://discourse.numenta.org/u/hodor-cna)\
**Replies:** 1\
**Last updated:** [December 1, 2021, 9:51pm UTC](https://discourse.numenta.org/t/decoding-in-htm/9173 "2021-12-01T21:51:02Z")

</div>

How does HTM decode the SDRS after temporal poolering?

---

## [HTM.java Network Parameters](https://discourse.numenta.org/t/htm-java-network-parameters/7869)

<div class="topic-metadata">

**Author:** [@acdolphin246](https://discourse.numenta.org/u/acdolphin246)\
**Replies:** 0\
**Last updated:** [September 14, 2020, 7:00pm UTC](https://discourse.numenta.org/t/htm-java-network-parameters/7869 "2020-09-14T19:00:40Z")

</div>

Hi all, I’ve been doing a bit of searching to see how parameters can be set when building a Network using HTM.java. Currently I have a model running using createBasicNetwork() from the example repository, but I’m confus…

---

## [HTM.java 's dependency is departed](https://discourse.numenta.org/t/htm-java-s-dependency-is-departed/7599)

<div class="topic-metadata">

**Author:** [@maizeng2008](https://discourse.numenta.org/u/maizeng2008)\
**Replies:** 12\
**Last updated:** [May 29, 2020, 11:28pm UTC](https://discourse.numenta.org/t/htm-java-s-dependency-is-departed/7599 "2020-05-29T23:28:29Z")

</div>

Hi, guys I tried to compile the project HTM.java and found out that one of its dependency: com.github.johnrengelman.shadow is departed. Does anyone meet this same problem before? How do you guys fix that? If anyone c…

---

## [HTM.java documentation not very useful any help?](https://discourse.numenta.org/t/htm-java-documentation-not-very-useful-any-help/7596)

<div class="topic-metadata">

**Author:** [@SirStone](https://discourse.numenta.org/u/SirStone)\
**Replies:** 11\
**Last updated:** [May 29, 2020, 8:26pm UTC](https://discourse.numenta.org/t/htm-java-documentation-not-very-useful-any-help/7596 "2020-05-29T20:26:27Z")

</div>

Hello I’m a computer scientist that has a passion for the machine learning world so in the spare time I find myself looking for materials and the new algorithms, this make me very good in understanding systems but I don…

---

## [Implementing HTM.Java on Apache Spark](https://discourse.numenta.org/t/implementing-htm-java-on-apache-spark/2291)

<div class="topic-metadata">

**Author:** [@papajim](https://discourse.numenta.org/u/papajim)\
**Replies:** 4\
**Last updated:** [February 7, 2020, 4:03pm UTC](https://discourse.numenta.org/t/implementing-htm-java-on-apache-spark/2291 "2020-02-07T16:03:33Z")

</div>

Hello, I'm really intrigued by the HTM theory and I'm thinking of implementing a version of the algorithm on Apache Spark. I'm aware of the Apache Flink and Akka implementations but I would like to get my hands dirty a…

---

## [How can I encode data with large number of categories?](https://discourse.numenta.org/t/how-can-i-encode-data-with-large-number-of-categories/6975)

<div class="topic-metadata">

**Author:** [@flash59](https://discourse.numenta.org/u/flash59)\
**Replies:** 8\
**Last updated:** [January 4, 2020, 3:20pm UTC](https://discourse.numenta.org/t/how-can-i-encode-data-with-large-number-of-categories/6975 "2020-01-04T15:20:58Z")

</div>

Hi, I know I can use CategoryEncoders, but ,I have a big dataset(network logs) to encode, I have to cluster them into some classes,(maybe 1000 classes or more) ,I will give each class a numberic id, so,I can encode each…

---

## [Encoding the hierarchy data](https://discourse.numenta.org/t/encoding-the-hierarchy-data/6982)

<div class="topic-metadata">

**Author:** [@flash59](https://discourse.numenta.org/u/flash59)\
**Replies:** 2\
**Last updated:** [January 2, 2020, 1:27am UTC](https://discourse.numenta.org/t/encoding-the-hierarchy-data/6982 "2020-01-02T01:27:00Z")

</div>

HI, There is a type of data consist of 2 parts: class id(integer) and subId(integer) , I want to encode each record of the data into a SDR with 2048 bits and 20 bits a bucket. The bucket is devided into 2 parts:13bits…

---

## [JAVA example for linking artifacts](https://discourse.numenta.org/t/java-example-for-linking-artifacts/6657)

<div class="topic-metadata">

**Author:** [@ddobric](https://discourse.numenta.org/u/ddobric)\
**Replies:** 11\
**Last updated:** [October 16, 2019, 1:57pm UTC](https://discourse.numenta.org/t/java-example-for-linking-artifacts/6657 "2019-10-16T13:57:41Z")

</div>

Hi all, looking for JAVA example, which does same or similar like this example: network.link(externalInputName, L4ColumnName, "UniformLink", "", srcOutput="dataOut", destInput="basalInput") netwo…

---

## [historicWindowSize parameter in AnomalyLikelyHood of HTM.java](https://discourse.numenta.org/t/historicwindowsize-parameter-in-anomalylikelyhood-of-htm-java/3547)

<div class="topic-metadata">

**Author:** [@Parag\_Goyal](https://discourse.numenta.org/u/Parag_Goyal)\
**Replies:** 0\
**Last updated:** [March 1, 2018, 8:18am UTC](https://discourse.numenta.org/t/historicwindowsize-parameter-in-anomalylikelyhood-of-htm-java/3547 "2018-03-01T08:18:06Z")

</div>

Can someone help me up in setting the historicWindowSize in the AnomalyLikelyHood of the HTM.java since according to the https://www.sciencedirect.com/science/article/pii/S0925231217309864 the W = 8000 and also if we …

---

## [Perform aggregation with HTM.java](https://discourse.numenta.org/t/perform-aggregation-with-htm-java/5076)

<div class="topic-metadata">

**Author:** [@styagi](https://discourse.numenta.org/u/styagi)\
**Replies:** 0\
**Last updated:** [December 17, 2018, 7:06pm UTC](https://discourse.numenta.org/t/perform-aggregation-with-htm-java/5076 "2018-12-17T19:06:32Z")

</div>

Is it possible to perform aggregations on time-series data for anomaly detection with htm.java?

---

## [Using reflections in HTM Java](https://discourse.numenta.org/t/using-reflections-in-htm-java/5875)

<div class="topic-metadata">

**Author:** [@cwidanage](https://discourse.numenta.org/u/cwidanage)\
**Replies:** 0\
**Last updated:** [April 22, 2019, 5:27pm UTC](https://discourse.numenta.org/t/using-reflections-in-htm-java/5875 "2019-04-22T17:27:43Z")

</div>

Hi, Is there any particular reason for using reflections in HTM Java. Specially in class SparseBinaryMatrix, given it’s always going to be an int array. this.backingArray = Array.newInstance(int.class, dimensions); Th…

---

## [Understanding correct terminology](https://discourse.numenta.org/t/understanding-correct-terminology/5814)

<div class="topic-metadata">

**Author:** [@klokare](https://discourse.numenta.org/u/klokare)\
**Replies:** 3\
**Last updated:** [April 12, 2019, 9:24pm UTC](https://discourse.numenta.org/t/understanding-correct-terminology/5814 "2019-04-12T21:24:07Z")

</div>

Reading my way through the HTM Java code and matching it up with my understanding of HTM from the papers and HTM School videos. In doing so I feel that Column is missing from the object hierarchy. From the Papers/Videos: …

---

## [Setting step in a classifier](https://discourse.numenta.org/t/setting-step-in-a-classifier/5213)

<div class="topic-metadata">

**Author:** [@keith.nordstrom](https://discourse.numenta.org/u/keith.nordstrom)\
**Replies:** 7\
**Last updated:** [January 17, 2019, 5:30pm UTC](https://discourse.numenta.org/t/setting-step-in-a-classifier/5213 "2019-01-17T17:30:45Z")

</div>

I’m now sending data through the system in 10 dimensions and getting predictions for my data. After 10000 timesteps at 1 minute using SDRClassifiers and AUTO\_CLASSIFY, I’m seeing roughly 10% of difference between the val…

---

## [Multidimensional encodings using Java API](https://discourse.numenta.org/t/multidimensional-encodings-using-java-api/5162)

<div class="topic-metadata">

**Author:** [@keith.nordstrom](https://discourse.numenta.org/u/keith.nordstrom)\
**Replies:** 34\
**Last updated:** [January 16, 2019, 7:02pm UTC](https://discourse.numenta.org/t/multidimensional-encodings-using-java-api/5162 "2019-01-16T19:02:44Z")

</div>

I’m trying to write a model that works off of up to 10 different input values on a single timestamp. To do this, I’m passing in a vector of input values with a CoordinateEncoder implementation. I am then sending it data …

---

## [First HTM Example](https://discourse.numenta.org/t/first-htm-example/5221)

<div class="topic-metadata">

**Author:** [@artur](https://discourse.numenta.org/u/artur)\
**Replies:** 1\
**Last updated:** [January 16, 2019, 5:10pm UTC](https://discourse.numenta.org/t/first-htm-example/5221 "2019-01-16T17:10:44Z")

</div>

Hello i have a problem with the parameters. I get the htm,java from git with maven and the NetworkDemoHarness from https://github.com/numenta/htm.java-examples/blob/fe8edba0f15868734634520257a3e5324dad4d92/src/main/…

---

## [My first HTM.Java application](https://discourse.numenta.org/t/my-first-htm-java-application/5211)

<div class="topic-metadata">

**Author:** [@artur](https://discourse.numenta.org/u/artur)\
**Replies:** 2\
**Last updated:** [January 15, 2019, 9:45pm UTC](https://discourse.numenta.org/t/my-first-htm-java-application/5211 "2019-01-15T21:45:38Z")

</div>

Hi all! I am new in the forum but also i am a beginner programmer. I want to create a app with Numenta in java. How i can start with it. The application will get data from a ship sensor like position consume of the fuel,…

---

## [Implementing HTM using Kafka Streams](https://discourse.numenta.org/t/implementing-htm-using-kafka-streams/2293)

<div class="topic-metadata">

**Author:** [@phil\_d\_cat](https://discourse.numenta.org/u/phil_d_cat)\
**Replies:** 7\
**Last updated:** [January 10, 2019, 7:23pm UTC](https://discourse.numenta.org/t/implementing-htm-using-kafka-streams/2293 "2019-01-10T19:23:55Z")

</div>

Looking through the samples I see all batch processes. Are there samples of using NuPIC/HTM with a continuous streaming datasource like Kafka? I have keyed / timestamped scalar data for which Im hoping to deploy an anoma…

---

## [SensorFlags set to 'L' in HTM.java](https://discourse.numenta.org/t/sensorflags-set-to-l-in-htm-java/4907)

<div class="topic-metadata">

**Author:** [@styagi](https://discourse.numenta.org/u/styagi)\
**Replies:** 5\
**Last updated:** [November 13, 2018, 8:09pm UTC](https://discourse.numenta.org/t/sensorflags-set-to-l-in-htm-java/4907 "2018-11-13T20:09:47Z")

</div>

PublisherSupplier supplier = PublisherSupplier.builder() .addHeader("timestamp, value") .addHeader("datetime, float") .addHeader("T, B") //see SensorFlags.java for more info .build(); This is a commonly …

---

## [What's happening to htm.Java project?](https://discourse.numenta.org/t/whats-happening-to-htm-java-project/4920)

<div class="topic-metadata">

**Author:** [@Matheus\_Araujo](https://discourse.numenta.org/u/Matheus_Araujo)\
**Replies:** 0\
**Last updated:** [November 9, 2018, 7:39pm UTC](https://discourse.numenta.org/t/whats-happening-to-htm-java-project/4920 "2018-11-09T19:39:25Z")

</div>

Hello Guys, what’s happeining to htm.java that its last closed pull request was on more than one year ago? It is the same for project issues. Do you need some one to help you to maintain that project?

---

## [I present you the chance to beat HTM on a Rock. Paper, Scissors game](https://discourse.numenta.org/t/i-present-you-the-chance-to-beat-htm-on-a-rock-paper-scissors-game/4816)

<div class="topic-metadata">

**Author:** [@Matheus\_Araujo](https://discourse.numenta.org/u/Matheus_Araujo)\
**Replies:** 1\
**Last updated:** [October 25, 2018, 5:08pm UTC](https://discourse.numenta.org/t/i-present-you-the-chance-to-beat-htm-on-a-rock-paper-scissors-game/4816 "2018-10-25T17:08:05Z")

</div>

Hey guys, I’m glad to present you my piece of work in order to contribute to make HTM more popular in the java comunity. Its called Jankenpo HTM. It’s avaiable on my github repository: This is a demo (Netbeans/Java…

---

## [Multi Step Predictions in Java](https://discourse.numenta.org/t/multi-step-predictions-in-java/2484)

<div class="topic-metadata">

**Author:** [@wip\_user](https://discourse.numenta.org/u/wip_user)\
**Replies:** 13\
**Last updated:** [October 16, 2018, 3:25pm UTC](https://discourse.numenta.org/t/multi-step-predictions-in-java/2484 "2018-10-16T15:25:56Z")

</div>

Hi Pls let me know how to configure java code to get future predictions . suppose I want to know next 6 predictions . I found lot of examples in Python not in Java

---

## [Reload stored network using persistence API](https://discourse.numenta.org/t/reload-stored-network-using-persistence-api/4699)

<div class="topic-metadata">

**Author:** [@Matheus\_Araujo](https://discourse.numenta.org/u/Matheus_Araujo)\
**Replies:** 4\
**Last updated:** [October 16, 2018, 2:22pm UTC](https://discourse.numenta.org/t/reload-stored-network-using-persistence-api/4699 "2018-10-16T14:22:33Z")

</div>

I created a network with a file sensor to read data from a input csv file this.temporalMemory = new TemporalMemory(); this.spatialPooler = new SpatialPooler(); this.anomaly = Anomaly.create(); …

---

## [I'm going to use HTM.Java at a NASA Hackaton in my City](https://discourse.numenta.org/t/im-going-to-use-htm-java-at-a-nasa-hackaton-in-my-city/4720)

<div class="topic-metadata">

**Author:** [@Matheus\_Araujo](https://discourse.numenta.org/u/Matheus_Araujo)\
**Replies:** 1\
**Last updated:** [October 15, 2018, 4:18pm UTC](https://discourse.numenta.org/t/im-going-to-use-htm-java-at-a-nasa-hackaton-in-my-city/4720 "2018-10-15T16:18:03Z")

</div>

My city will host a NASA Hackaton this weekend and we will be challenged to create new ideas to solve some global problems using NASA data. I would like to use HTM.Java, if possible, to solve some anomaly detection relat…

---

## [Is HTM right tool for my case? (Online anomaly value detection in data stream)](https://discourse.numenta.org/t/is-htm-right-tool-for-my-case-online-anomaly-value-detection-in-data-stream/4629)

<div class="topic-metadata">

**Author:** [@pszeliga](https://discourse.numenta.org/u/pszeliga)\
**Replies:** 4\
**Last updated:** [September 26, 2018, 5:42pm UTC](https://discourse.numenta.org/t/is-htm-right-tool-for-my-case-online-anomaly-value-detection-in-data-stream/4629 "2018-09-26T17:42:04Z")

</div>

I have a constant stream of events containing some differing value which represent milliseconds of some duration. I also hava another stream of values that need to be compared against the model - detect if they are anoma…

---

## [Decode SDR to Word](https://discourse.numenta.org/t/decode-sdr-to-word/4601)

<div class="topic-metadata">

**Author:** [@Gelo123321](https://discourse.numenta.org/u/Gelo123321)\
**Replies:** 7\
**Last updated:** [September 25, 2018, 11:24am UTC](https://discourse.numenta.org/t/decode-sdr-to-word/4601 "2018-09-25T11:24:38Z")

</div>

Hello guys! I’m trying to create a semantic encoder using HTM and Word2Vec with 50 dimensions. So, i put 50 scalar encoders in multi-encoder and convert dimensions into SDR. Then I get a prediction SDR. The question is: …

---

## [Input source for htm.java other than CSV file](https://discourse.numenta.org/t/input-source-for-htm-java-other-than-csv-file/4465)

<div class="topic-metadata">

**Author:** [@styagi](https://discourse.numenta.org/u/styagi)\
**Replies:** 23\
**Last updated:** [September 25, 2018, 6:28am UTC](https://discourse.numenta.org/t/input-source-for-htm-java-other-than-csv-file/4465 "2018-09-25T06:28:15Z")

</div>

Hello. Just started working on HTM and exploring the htm.java library @cogmission Is there a way to load data into the Network API other than a CSV file (or any other file for that matter). Can I pass entire records as …

---

## [Get anomaly likelihood with multiple inputs](https://discourse.numenta.org/t/get-anomaly-likelihood-with-multiple-inputs/2608)

<div class="topic-metadata">

**Author:** [@Andrea\_Giordano](https://discourse.numenta.org/u/Andrea_Giordano)\
**Replies:** 3\
**Last updated:** [September 20, 2018, 6:12pm UTC](https://discourse.numenta.org/t/get-anomaly-likelihood-with-multiple-inputs/2608 "2018-09-20T18:12:32Z")

</div>

Hi, I successfully obtained anomaly likelihood from an input composed by timestamp + value using the following code: multiInput.put("timestamp", new DateTime(record.getTimestamp())); multiInput.put("consumption", …

[Next page](https://discourse.numenta.org/c/engineering/htm-java/27.md?page=1)
