diff --git a/.classpath b/.classpath
index edc67233..29eadc40 100644
--- a/.classpath
+++ b/.classpath
@@ -3,23 +3,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Dockerfile b/Dockerfile
index b711f63d..78e9d0e7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,9 @@
FROM java:8
-RUN wget -q https://services.gradle.org/distributions/gradle-2.12-bin.zip \
+ENV http_proxy http://192.168.99.1:53128
+ENV https_proxy http://192.168.99.1:53128
+
+RUN wget https://services.gradle.org/distributions/gradle-2.12-bin.zip \
&& unzip -q gradle-2.12-bin.zip -d /opt \
&& rm gradle-2.12-bin.zip
diff --git a/examples/hotgym/NAPI-Hotgym-Demo-v0.6.12-alpha.jar b/examples/hotgym/NAPI-Hotgym-Demo-v0.6.12-alpha.jar
new file mode 100644
index 00000000..b0d84416
Binary files /dev/null and b/examples/hotgym/NAPI-Hotgym-Demo-v0.6.12-alpha.jar differ
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 00000000..a3684007
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,17 @@
+## Proxy setup
+systemProp.proxySet="true"
+systemProp.http.keepAlive="true"
+systemProp.http.proxyHost=192.168.99.1
+systemProp.http.proxyPort=53128
+#systemProp.http.proxyUser=y2gh
+#systemProp.http.proxyPassword=password
+#systemProp.http.nonProxyHosts=local.net|some.host.com
+
+systemProp.https.keepAlive="true"
+systemProp.https.proxyHost=192.168.99.1
+systemProp.https.proxyPort=53128
+#systemProp.https.proxyUser=username
+#systemProp.https.proxyPassword=password
+#systemProp.https.nonProxyHosts=local.net|some.host.com
+## end of proxy setup
+
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 602728c9..ab227fb8 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -4,3 +4,21 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip
+
+## Proxy setup
+systemProp.proxySet="true"
+systemProp.http.keepAlive="true"
+systemProp.http.proxyHost=127.0.0.1
+systemProp.http.proxyPort=53128
+#systemProp.http.proxyUser=y2gh
+#systemProp.http.proxyPassword=password
+#systemProp.http.nonProxyHosts=local.net|some.host.com
+
+systemProp.https.keepAlive="true"
+systemProp.https.proxyHost=127.0.0.1
+systemProp.https.proxyPort=53128
+#systemProp.https.proxyUser=username
+#systemProp.https.proxyPassword=password
+#systemProp.https.nonProxyHosts=local.net|some.host.com
+## end of proxy setup
+
diff --git a/nb-configuration.xml b/nb-configuration.xml
new file mode 100644
index 00000000..a65c4514
--- /dev/null
+++ b/nb-configuration.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+ JDK_1.8
+
+
diff --git a/pom.xml b/pom.xml
index f72cef9e..4e6ab41d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,15 +30,17 @@
-5
-
-
+
+
repo
htm.java
http://metaware.us/maven3
-
+
+
+
scm:git:git://github.com/numenta/htm.java.git
scm:git:git://github.com/numenta/htm.java.git
diff --git a/src/main/java/org/numenta/nupic/FieldMetaType.java b/src/main/java/org/numenta/nupic/FieldMetaType.java
index b6b6f3ff..96298b01 100644
--- a/src/main/java/org/numenta/nupic/FieldMetaType.java
+++ b/src/main/java/org/numenta/nupic/FieldMetaType.java
@@ -97,7 +97,13 @@ public T decodeType(String input, Encoder> enc) {
case STRING : return (T)input;
case DATETIME : return (T)((DateEncoder)enc).parse(input);
case BOOLEAN : return (T)(Boolean.valueOf(input) == true ? new Double(1) : new Double(0));
- case COORD :
+ case COORD :{
+ String[] parts = input.split("[\\s]*\\;[\\s]*");
+ int[] coord =new int[2];
+ coord[0]=Integer.parseInt(parts[0]);
+ coord[1]=Integer.parseInt(parts[1]);
+ return (T)new Tuple(coord, Double.parseDouble(parts[2]));
+ }
case GEO : {
String[] parts = input.split("[\\s]*\\;[\\s]*");
return (T)new Tuple(Double.parseDouble(parts[0]), Double.parseDouble(parts[1]), Double.parseDouble(parts[2]));
diff --git a/src/main/java/org/numenta/nupic/Parameters.java b/src/main/java/org/numenta/nupic/Parameters.java
index 9e54b285..0c8638c8 100644
--- a/src/main/java/org/numenta/nupic/Parameters.java
+++ b/src/main/java/org/numenta/nupic/Parameters.java
@@ -138,6 +138,7 @@ public class Parameters implements Persistable {
defaultEncoderParams.put(KEY.ENCODER, "ScalarEncoder");
defaultEncoderParams.put(KEY.FIELD_ENCODING_MAP, Collections.emptyMap());
defaultEncoderParams.put(KEY.AUTO_CLASSIFY, Boolean.FALSE);
+ defaultEncoderParams.put(KEY.INFERRED_STEPS, new int[]{1});
DEFAULTS_ENCODER = Collections.unmodifiableMap(defaultEncoderParams);
defaultParams.putAll(DEFAULTS_ENCODER);
@@ -421,6 +422,9 @@ public static enum KEY {
/** Maps encoder input field name to type of classifier to be used for them */
INFERRED_FIELDS("inferredFields", Map.class), // Map
+
+ /** Sets the inference steps */
+ INFERRED_STEPS("inferenceSteps", int[].class),
// How many bits to use if encoding the respective date fields.
// e.g. Tuple(bits to use:int, radius:double)
diff --git a/src/main/java/org/numenta/nupic/encoders/CoordinateEncoder.java b/src/main/java/org/numenta/nupic/encoders/CoordinateEncoder.java
index 2dac700f..bc41e314 100644
--- a/src/main/java/org/numenta/nupic/encoders/CoordinateEncoder.java
+++ b/src/main/java/org/numenta/nupic/encoders/CoordinateEncoder.java
@@ -164,7 +164,7 @@ public static int bitForCoordinate(int[] coordinate, int n) {
*/
@Override
public void encodeIntoArray(Tuple inputData, int[] output) {
- List neighs = neighbors((int[])inputData.get(0), (double)inputData.get(1));
+ List neighs = neighbors((int[])inputData.get(0), Math.max((double)inputData.get(1), w));
int[][] neighbors = new int[neighs.size()][];
for(int i = 0;i < neighs.size();i++) neighbors[i] = neighs.get(i);
diff --git a/src/main/java/org/numenta/nupic/network/Layer.java b/src/main/java/org/numenta/nupic/network/Layer.java
index aa6aeddd..20202ae4 100644
--- a/src/main/java/org/numenta/nupic/network/Layer.java
+++ b/src/main/java/org/numenta/nupic/network/Layer.java
@@ -21,6 +21,7 @@
*/
package org.numenta.nupic.network;
+import gnu.trove.list.array.TIntArrayList;
import java.lang.Thread.UncaughtExceptionHandler;
import java.math.BigDecimal;
import java.math.MathContext;
@@ -1922,6 +1923,7 @@ private void clearSubscriberObserverLists() {
@SuppressWarnings("unchecked")
NamedTuple makeClassifiers(MultiEncoder encoder) {
Map> inferredFields = (Map>) params.get(KEY.INFERRED_FIELDS);
+ int[] steps = (int[]) params.get(KEY.INFERRED_STEPS);
if(inferredFields == null || inferredFields.entrySet().size() == 0) {
throw new IllegalStateException(
"KEY.AUTO_CLASSIFY has been set to \"true\", but KEY.INFERRED_FIELDS is null or\n\t" +
@@ -1930,6 +1932,7 @@ NamedTuple makeClassifiers(MultiEncoder encoder) {
"value in Parameters)."
);
}
+
String[] names = new String[encoder.getEncoders(encoder).size()];
Classifier[] ca = new Classifier[names.length];
int i = 0;
@@ -1940,12 +1943,12 @@ NamedTuple makeClassifiers(MultiEncoder encoder) {
LOGGER.info("Not classifying \"" + et.getName() + "\" input field");
}
else if(CLAClassifier.class.isAssignableFrom(fieldClassifier)) {
- LOGGER.info("Classifying \"" + et.getName() + "\" input field with CLAClassifier");
- ca[i] = new CLAClassifier();
+ LOGGER.info("Classifying \"" + et.getName() + "\" input field with CLAClassifier");
+ ca[i] = new CLAClassifier(new TIntArrayList(steps), 0.001, 0.3, 0);
}
else if(SDRClassifier.class.isAssignableFrom(fieldClassifier)) {
LOGGER.info("Classifying \"" + et.getName() + "\" input field with SDRClassifier");
- ca[i] = new SDRClassifier();
+ ca[i] = new SDRClassifier(new TIntArrayList(steps), 0.001, 0.3, 0);
}
else {
throw new IllegalStateException(