This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Set; | |
public class Example { | |
public static void main(final String[] args) { | |
final ParamMap<Param.ICE> map = (ParamMap<ICE>) new DummyParamMap(); | |
final Price VWAP = map.get(ICE.SESSION_VWAP); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dylan Wilson asked this question: | |
> Also, I wanted to bring up a larger question about what our goals with the Java version is. For | |
> example, the variable names in the ScalarEncoder are pretty bad... w is described as "width" but | |
> getWidth returns n. Are we trying to maintain some connection to the Python code or are we free to | |
> fix these kinds of things ? | |
Good question. Yes we should maintain a definite connection with the Python code, and if we detect | |
"issues" with it, we should also correct the Python version and keep them in lock step. The main goal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.numenta.nupic.encoders; | |
public class AdaptiveScalarEncoder extends ScalarEncoder { | |
/* | |
* This is an implementation of the scalar encoder that adapts the min and | |
* max of the scalar encoder dynamically. This is essential to the streaming | |
* model of the online prediction framework. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void initEncoder(double resolution, int w, int n, Double offset, | |
long seed) { | |
// MersenneTwister says it is better to pass an int seed even though it | |
// accepts long?? | |
rng = seed == -1 ? new MersenneTwister() : new MersenneTwister(seed); | |
initializeBucketMap(getMaxBuckets(), getOffset()); | |
if (getName() == null || getName().isEmpty()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.numenta.nupic.research.sdrs; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.stream.IntStream; | |
import org.roaringbitmap.RoaringBitmap; | |
public class SDR implements Iterable<Integer> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Feb 8, 2015 | |
@author: David Ray | |
''' | |
import numpy as np | |
from nupic.encoders.scalar import ScalarEncoder as ScalarEncoder | |
from nupic.algorithms.CLAClassifier import CLAClassifier as CLAClassifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.numenta.nupic.network; | |
import rx.observers.TestObserver; | |
/** | |
* Base class for tests which use the Observable framework to test | |
* their methods. Contains useful methods to | |
* @author cogmission | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* --------------------------------------------------------------------- | |
* Numenta Platform for Intelligent Computing (NuPIC) | |
* Copyright (C) 2016, Numenta, Inc. Unless you have an agreement | |
* with Numenta, Inc., for a separate license for this software code, the | |
* following terms and conditions apply: | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License version 3 as | |
* published by the Free Software Foundation. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* --------------------------------------------------------------------- | |
* Numenta Platform for Intelligent Computing (NuPIC) | |
* Copyright (C) 2016, Numenta, Inc. Unless you have an agreement | |
* with Numenta, Inc., for a separate license for this software code, the | |
* following terms and conditions apply: | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero Public License version 3 as | |
* published by the Free Software Foundation. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* --------------------------------------------------------------------- | |
* Numenta Platform for Intelligent Computing (NuPIC) | |
* Copyright (C) 2016, Numenta, Inc. Unless you have an agreement | |
* with Numenta, Inc., for a separate license for this software code, the | |
* following terms and conditions apply: | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero Public License version 3 as | |
* published by the Free Software Foundation. | |
* |
OlderNewer