Implementation of core NuPIC algorithms in C++

Related tags

Algorithmsnupic.core
Overview

NuPIC Logo

NuPIC Core Unix-like Build Status Windows Build Status CircleCI Coverage Status

This repository contains the C++ source code for the Numenta Platform for Intelligent Computing (NuPIC). It will eventually contain all algorithms for NuPIC, but is currently in a transition period. For details on building NuPIC within the python environment, please see http://github.com/numenta/nupic.

Installing from a Release

You can install the nupic.bindings Python package from PyPI:

pip install nupic.bindings

Optionally include --user or other flags to determine where the package is installed.

Note: On Linux this will do a source installation and will require that the prerequisites specified below are installed.

Building from Source

Important notes:

  • $NUPIC_CORE is the current location of the repository that you downloaded from GitHub.
  • Platform specific Readme.md text files exist in some external/ subdirectories
  • See the main wiki for more build notes

Prerequisites

  • Python - We recommend you use the system version where possibly.
    • Version 2.7
  • NumPy - Can be installed through some system package managers or via pip
    • Version 1.12.1
  • pycapnp
    • Version 0.5.8 (Linux and OSX only)
  • CMake

Note: On Windows, Python package dependencies require the following compiler package to be installed: Microsoft Visual C++ Compiler for Python 2.7

The Python dependencies (NumPy and pycapnp) can be installed with pip:

pip install -r bindings/py/requirements.txt

Simple Source Installation (does not support incremental builds)

The easiest way to build from source is as follows. This does not support incremental builds.

python setup.py install

Optionally include --user or other flags to determine where the package is installed.

Testing the Installation

Regardless of how you install nupic.bindings, the nupic-bindings-check command-line script should be installed. Make sure that you include the Python bin installation location in your PATH environment variable and then execute the script:

nupic-bindings-check

Developer Installation

This option is for developers that would like the ability to do incremental builds of the C++ or for those that are using the C++ libraries directly.

Note: The following sub-sections are related to Linux and OSX only. For Windows refer to the external\windows64-gcc\README.md file.

Configure and generate C++ build files:

mkdir -p $NUPIC_CORE/build/scripts
cd $NUPIC_CORE/build/scripts
cmake $NUPIC_CORE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/src/nupic/bindings

Notes:

  • This will generate Release build files. For a debug build, change -DCMAKE_BUILD_TYPE to Debug.
  • To build nupic.core for generating the nupic.bindings python extension, pass -DNUPIC_BUILD_PYEXT_MODULES=ON; it is the default at this time.
  • To build nupic.core as a standalone static library, pass -DNUPIC_BUILD_PYEXT_MODULES=OFF.
  • If you have dependencies precompiled but not in standard system locations then you can specify where to find them with -DCMAKE_PREFIX_PATH (for bin/lib) and -DCMAKE_INCLUDE_PATH (for header files).
  • The -DCMAKE_INSTALL_PREFIX=../release option shown above is optional, and specifies the location where nupic.core should be installed. If omitted, nupic.core will be installed in a system location. Using this option is useful when testing versions of nupic.core language bindings in bindings.
  • Setting -DPY_EXTENSIONS_DIR copies the Python exension files to the specified directory. If the extensions aren't present when the Python build/installation is invoked then the setup.py file will run the cmake/make process to generate them. Make sure to include this flag if you want to do incremental builds of the Python extensions.
  • On OSX with multiple Python installs (e.g. via brew) cmake might erroneously pick various pieces from different installs which will likely produce abort trap at runtime. Remove cmake cache and re-run cmake with -DPYTHON_LIBRARY=/path/to/lib/libpython2.7.dylib and -DPYTHON_INCLUDE_DIR=/path/to/include/python2.7 options to override with desired Python install path.
  • To use Include What You Use during compilation, pass -DNUPIC-IWYU=ON. This requires that IWYU is installed and findable by CMake, with a minimum CMake version of 3.3. IWYU can be installed from https://include-what-you-use.org/ for Windows and Linux, and on OS X using https://github.com/jasonmp85/homebrew-iwyu.
  • If you would like to install all headers, libraries, and executables to the install location for C++ clients when building the nupic.binding python extensions, pass -NUPIC_TOGGLE_INSTALL=ON.

Build:

# While still in $NUPIC_CORE/build/scripts
make -j3

Note: The -j3 option specifies '3' as the maximum number of parallel jobs/threads that Make will use during the build in order to gain speed. However, you can increase this number depending your CPU.

Install:

# While still in $NUPIC_CORE/build/scripts
make install

Run the tests:

cd $NUPIC_CORE/build/release/bin
./cpp_region_test
./unit_tests
...

Install nupic.bindings Python library:

cd $NUPIC_CORE
python setup.py develop

Note: If the extensions haven't been built already then this will call the cmake/make process to generate them.

If you get a gcc exit code 1, you may consider running this instead:

 python setup.py develop --user

If you are installing on Mac OS X, you must add the instruction ARCHFLAGS="-arch x86_64" before the python call:

ARCHFLAGS="-arch x86_64" python setup.py develop

Alternatively, you can use the install command (as opposed to develop) to copy the installation files rather than link to the source location.

python setup.py install

Note: If you get a "permission denied" error when using the setup commands above, you may add the --user flag to install to a location in your home directory, which should resolve any permissions issues. Doing this, you may need to add this location to your PATH and PYTHONPATH.

Once it is installed, you can import NuPIC bindings library to your python script using:

import nupic.bindings

You can run the nupic.bindings tests via setup.py:

python setup.py test

Using graphical interface

Generate the IDE solution:

  • Open CMake executable.
  • Specify the source folder ($NUPIC_CORE/src).
  • Specify the build system folder ($NUPIC_CORE/build/scripts), i.e. where IDE solution will be created.
  • Click Generate.
  • Choose the IDE that interest you (remember that IDE choice is limited to your OS, i.e. Visual Studio is available only on CMake for Windows).

Build:

  • Open nupic_core.*proj solution file generated on $NUPIC_CORE/build/scripts.
  • Run ALL_BUILD project from your IDE.

Run the tests:

  • Run any tests_* project from your IDE (check output panel to see the results).

Build Documentation

Run doxygen, optionally specifying the version as an environment variable:

PROJECT_VERSION=`cat VERSION` doxygen

The results will be written out to the html directory.

Comments
  • Independent Build Process

    Independent Build Process

    This commit includes the compilation of the dynamic/static libraries that compose nupic.core. They are generated by default on nupic.core/build/release folder, however any user could change its destination using cmake -DPROJECT_BUILD_RELEASE_DIR=… or cmake -DPROJECT_BUILD_TEMP_DIR=… command line. Thought this option, Travis at nupic repo will compile the static libraries and put them on /externalfolder.

    The output of this library is a static library called nupic.core (I linked with HtmTest, TesteEverything, and all is ok.. :-) ). I'm also trying make CMake generate a dynamic library, but without success (problems with dynamic linking).

    Note that neither HtmTest not TestEverything were included, they still are hybrid and Python tests need be removed from them.

    This PR replaces this: https://github.com/numenta/nupic.core/pull/32

    fixes #4

    type:build type:cleanup 
    opened by david-ragazzi 78
  • Windows Build Implementation

    Windows Build Implementation

    The continuation of https://github.com/utensil/nupic.core/pull/23

    Reference issues

    • Investigate AppVeyor CI build for Windows https://github.com/numenta/nupic.core/issues/134
    • Windows build support https://github.com/numenta/nupic.core/issues/103

    To-Do

    • [x] Need to replace tabs with 2-spaces and general tidy up to learn code layout
    • [x] Eliminate unistd.h
    • [x] Look at eliminating external dependencies (zconf.h wont work in current state with Windows builds, HAVE_UNISTD_H defined)
    • [x] Adhere to chosen directory layouts
    • [x] Make sure all OS related stuff in appropriate place and add more platform specific tests
    • [x] Further work to improve the Cmake for cross-compilation
    • [x] Deal with test output formatting
    • [x] Suppress info warning and deal with depreciation
    • [x] Check for exclusion commands in appveyor.yml (false errors, etc.) - Rewrote NTA_THROW
    • [x] C++11 on? - Yes, on by default All seemed to work durinf GCC tests
    • [x] Work out why NuPIC barfs on generate_dynamic_library - Params
    • [x] Try this feature branch with NuPIC - SWIG and NUMPY work arounds
    • [x] Sort out static library prefixes
    • [x] Archive static libraries, and update CMakeList
    • [x] Transfer AppVeyor Web UI settings to appveyor.yml
    • [x] Stick with Travis (MinGW) or AppVeyor (with .Net), or other?
    • [x] How to skip test cases (eg. testCases_["NTA_BasicType_Int32, size -10"])
    • [x] diff clang, gcc, osx, and win build listings - Look identical
    • [x] Build for Visual Studio 2012 (v110 test of C+11 feature set) - Passed
    • [x] Work out how to find oldnames.lib
    • [x] Use NTA_INTERNAL to determine CI in use? hence change behavior of NTA_THROW
    • [x] Alternative to PCRE and NTA Regex? (C++11 only?)
    • [x] Addition of a lint solution (cpplint.py in bin dir?) - Skip this PR
    • [x] x64 prebuilt libraries
    • [x] Will Windows SDK 7.1(2) allow this to build in an Express (free) version of the IDE?
      • Compare compiler version through all VS and SDK packages to see support level of C++11
    • [x] Dynamic library options, CMake update, testing and packaging (dirs & files)
      • Ahmed's DLL branch, ready to merge but would like some tidy up and a couple of changes first
    • [x] NuGet deployment? - Works https://www.nuget.org/packages/nupic.core/
      • Ensure third party library copyright is handled.
      • Numenta copyright/license changes to NuGET information
    • [x] Apply legal notices to library properties (package metadata, see root LICENSE.txt)
      • And check third party licenses. Although we do use the same externals, and one additional (PCRE)
    • [x] Versions? - Example in algorithms\Version.hpp
      • Will do for the moment, Need to tie into main core when implemented
      • Remove my version file, adopt official way
    • [x] Why use separate Apr includes? linux32 1.4.8, Win32 1.5.1, Linux64 1.5.2, Darwin64 1.4.8
      • Which version is best for Win32?
      • Need for different version, stick with current one?
    • [x] Try more recent Boost library (removes Unknown compiler version warnings) - Stick with warning
    • [x] Create new branch to only contain source changes
      • https://github.com/rcrowder/nupic.core/compare/numenta:master...103-windows-build-src
      • Announce to ML
    • [x] Investigate using PiP instead of Nuget
      • With NuGet working, may be the best way of obtaining a Win version of core
      • Can't see a case for Windows version on apt, yum, etc.
    • [ ] Document build process (Readmes' and Wiki)
    • [ ] Windows build support, for cygwin and mingw https://github.com/numenta/nupic.core/issues/103
      • Some CMake trickery is required for GCC under Windows.
      • http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
      • cmake -DCMAKE_INSTALL_PREFIX=../release -DCMAKE_TOOLCHAIN_FILE=../../src/travis-mingw32.cmake -G "Unix makefiles" ../../src (or "MSYS Makefiles" as the generator).
    • [ ] Handle lack of inline asm support for x64 builds
      • Extract all inline ASM to separate files for Assembler
      • Or convert inline assembler to intrinsics and cope with missing functionality (e.g. jne)
      • Does the optimizer do a good enough job?
    • [ ] Side by side debug of helloregion.exe with VS IDE and Docker VM (which?) OS IDE
      • Or get this PR working with NuPIC
      • Or port NuPIC Studio to Windows - This one, now build process has been changed
    • [ ] Create a new, or transfer Ahmed's existing, NuGet account
    type:build 
    opened by rcrowder 58
  • Must provide nupic core release directory. --nupic-core-dir

    Must provide nupic core release directory. --nupic-core-dir

    Originally reported as https://github.com/numenta/nupic/issues/2570 and https://github.com/numenta/nupic/issues/2543 but now failing with a different error that seems to be internal to nupic.core.

    Just to clarify, the command pip install https://s3-us-west-2.amazonaws.com/artifacts.numenta.org/numenta/nupic.core/releases/nupic.bindings/nupic.bindings-0.2-cp27-none-linux_x86_64.whl seems to work fine, but the subsequent pip install nupic then throws the following error.

    CC @breznak @felippemr

    (nupic_lab)nupic_lab$ pip uninstall nupic nupic.bindings -y
    Cannot uninstall requirement nupic, not installed
    Storing debug log for failure in /Users/felippe.gestec/.pip/pip.log
    (nupic_lab)nupic_lab$ pip freeze
    numpy==1.9.2
    wsgiref==0.1.2
    (nupic_lab)nupic_lab$ pip install nupic
    Downloading/unpacking nupic
      Downloading nupic-0.3.1-py2-none-any.whl (5.3MB): 5.3MB downloaded
    Downloading/unpacking PyMySQL==0.6.2 (from nupic)
      Downloading PyMySQL-0.6.2-py2.py3-none-any.whl (63kB): 63kB downloaded
    Requirement already satisfied (use --upgrade to upgrade): numpy==1.9.2 in /Users/felippe.gestec/.virtualenvs/nupic_lab/lib/python2.7/site-packages (from nupic)
    Downloading/unpacking nupic.bindings==0.2 (from nupic)
      Downloading nupic.bindings-0.2.tar.gz (593kB): 593kB downloaded
      Running setup.py (path:/Users/felippe.gestec/.virtualenvs/nupic_lab/build/nupic.bindings/setup.py) egg_info for package nupic.bindings
        Python Bindings directory: /Users/felippe.gestec/.virtualenvs/nupic_lab/build/nupic.bindings
        NUMPY VERSION: 1.9.2
        Traceback (most recent call last):
          File "<string>", line 17, in <module>
          File "/Users/felippe.gestec/.virtualenvs/nupic_lab/build/nupic.bindings/setup.py", line 534, in <module>
            raise Exception("Must provide nupic core release directory. --nupic-core-dir")
        Exception: Must provide nupic core release directory. --nupic-core-dir
        Complete output from command python setup.py egg_info:
        Python Bindings directory: /Users/felippe.gestec/.virtualenvs/nupic_lab/build/nupic.bindings
    
    NUMPY VERSION: 1.9.2
    
    Traceback (most recent call last):
    
      File "<string>", line 17, in <module>
    
      File "/Users/felippe.gestec/.virtualenvs/nupic_lab/build/nupic.bindings/setup.py", line 534, in <module>
    
        raise Exception("Must provide nupic core release directory. --nupic-core-dir")
    
    Exception: Must provide nupic core release directory. --nupic-core-dir
    
    ----------------------------------------
    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in /Users/felippe.gestec/.virtualenvs/nupic_lab/build/nupic.bindings
    Storing debug log for failure in /Users/felippe.gestec/.pip/pip.log
    (nupic_lab)nupic_lab$ pip uninstall nupic nupic.bindings -y
    Cannot uninstall requirement nupic, not installed
    Storing debug log for failure in /Users/felippe.gestec/.pip/pip.log
    
    
    type:bug duplicate type:build priority:2 
    opened by rhyolight 57
  • Integrate Google Test and port all tests in `testeverything`

    Integrate Google Test and port all tests in `testeverything`

    This PR is the work on #10 as per discussed at https://github.com/numenta/nupic.core/issues/10#issuecomment-53845038 (@rhyolight , @scottpurdy , @chetan51), using the Google Test framework . Replaces #150 .

    This PR completed the following tasks:

    • [x] generate JUnit-style report for nupic.tools to consume as the original #10 requests
    • [x] porting original tests in testeverything with minimal modification
    • [x] silent gcov so it will not generate long outputs to console
    • [x] add tests for the re-implemented Tester

    Decision TODOs:

    • decide a goal name for unit test, for now I'm using tests_unit
    • decide where the tests go, for now I've moved from src/test/testeverything to src/test/unit
    type:tests 
    opened by utensil 53
  • low level anomaly detection example

    low level anomaly detection example

    calls the Encoder, SpatialPooler, TemporalPooler and Anomaly classes to show a full chain C++ demo. Adds some helper utils for working with CSV and vectors.

    Fixes: #889 Blocked by: ~~#869~~ ~~#904~~ #902

    TODO:

    • [x] wait for Anomaly merged (blocked)
    • [x] switch to TM instead of TP
    • [x] consider creating "utils" from some of the helper methods
      • [x] VectorHelpers (?)
      • [x] CSVHelpers
      • [x] ~~tests~~
    • [x] use as a C++ example
      • [x] bring Timer from HelloSP_TP
      • [x] ~~remove Hello_SP_TP~~
      • [ ] update Readme
    • [x] change to class with initialize() and compute() methods
    • [x] fix build on Win
    • [x] optimize speed (params?) of TM (currently slower than TP)
    • [x] fix coding style
    • [x] allow testing of all TP/TM/extendedTM (ETM) implementations
    status:ready 
    opened by breznak 52
  • Windows Build Support

    Windows Build Support

    This is an issue logging what seems to be missing for a successful windows build of nupic.core:

    @rcrowder and @kandeel 's work

    • [ ] #184 and https://github.com/numenta/nupic.core/pull/184#commitcomment-7475075

    Compiler support

    • [ ] current cmake instruction generates solution for VC by default, not MinGW or Cygwin, needs to doc how to generate makefiles for them

    VC build issues

    • [x] CMakeLists.txt seems to be adding gcc/clang-specific compiler options to all compilers, see variable NTA_CXXFLAGS_BASE
    • [x] due to similar reasons(the usage of -isystem), VC failed to find all headers and libraries in external, should be fixed by using include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)

    MSYS gcc build issue

    By using cmake $NUPIC_CORE/src -G "MSYS Makefiles", make files for gcc under MSYS can be generated, but fails the build:

    • [x] an typo #TODO in ArrayAlgo.hpp
    • [x] VC-specific asm code in ArrayAlgo.hpp and SvmT.hpp
    • [ ] something wrong with DLL and COM loading code:
    [ 10%] Building CXX object CMakeFiles/nupic_core.dir/main/engine/RegionImplFactory.cpp.obj
    w:/workspace/nupic.core/master/src/main/engine/RegionImplFactory.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
    In file included from c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/objbase.h:153:0,
                     from c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/ole2.h:16,
    
    [ 10%] Building CXX object CMakeFiles/nupic_core.dir/main/engine/RegionImplFactory.cpp.obj
    w:/workspace/nupic.core/master/src/main/engine/RegionImplFactory.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
    In file included from c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/objbase.h:153:0,
                     from c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/ole2.h:16,
                     from c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/Windows.h:94,
                     from w:/workspace/nupic.core/master/build/release/include/nta/os/DynamicLibrary.hpp:32,
                     from w:/workspace/nupic.core/master/src/main/engine/RegionImplFactory.cpp:29:
    c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/unknwn.h: In member function 'HRESULT IUnknown::QueryInterface(Q**)':
    c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/unknwn.h:70:82: error: '*' cannot appear in a constant-expression
    c:\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/unknwn.h:70:82: error: a function call cannot appear in a constant-expression
    make[2]: *** [CMakeFiles/nupic_core.dir/main/engine/RegionImplFactory.cpp.obj] Error 1
    make[1]: *** [CMakeFiles/nupic_core.dir/all] Error 2
    make: *** [all] Error 2
    

    Personally I'm interested in making nupic.core work under Windows, but I guess a PR is not going to be created that soon. Just log an issue here for follow up.

    UPDATE: See https://github.com/numenta/nupic.core/issues/103#issuecomment-58133631 for latest prgress .

    type:build priority:3 windows 
    opened by utensil 52
  • ARMv7l  installation from source - compiling external libraries

    ARMv7l installation from source - compiling external libraries

    I'm following instructions: https://gist.github.com/rhyolight/15b8454780424f690d00 . I trying to install nupic from the source on raspberry pi (32bit), because I could not find an image for running on 64 bit. Platform: armv7l-unknown-linux-gnueabihf. I know this build is not officially supported.

    I do have files in: /home/ubuntu/nupic.core/external/linux32armv7/bin/libapr-1.a /home/ubuntu/nupic.core/external/linux32armv7/libapr-1.a /usr/local/apr/lib/libapr-1.a

    cmake -DLIB_STATIC_APR1_LOC="/usr/local/apr/lib/libapr-1.a" made no difference

    It fails on installing APR. Command "make j1". make[1]: *** [external/CMakeFiles/Apr1StaticLib.dir/all] Error 2

    config.log:

    configure:5381: gcc -V >&5
    gcc: error: unrecognized command line option '-V'
    gcc: fatal error: no input files
    compilation terminated.
    
    gcc: error: unrecognized argument in option '-mtune=generic'
    gcc: error: unrecognized command line option '-m32'
    ...
    
    type:enhancement type:build priority:3 type:platform triage 
    opened by codedhard 48
  • Port python TM to C++, using C++ Connections data structure

    Port python TM to C++, using C++ Connections data structure

    The python temporal memory implementation is located here, and a subclass of it that uses the C++ Connections data structure is located here. Unit tests are located here.

    This task is to port the above implementation to C++, so that we have a pure C++ version that uses the Connections data structure.


    type:enhancement subject:algorithms status:in progress priority:2 super under-review 
    opened by rhyolight 41
  • C++11 standard transform

    C++11 standard transform

    1/ set -std=c++11 flag 2/ verify in travis env 3/ transform code with clang-modernize EDIT: base compilers (for C++11 feature support) are gcc 4.8, clang-3.4 (used in OSX build CI) tested to run with nupic (python) TODO: 4/ workaround coveralls gcc 4.6 vs 4.8 issue 5/ fix c++11 problems with stdc++ on OSX

    Fixes #178.

    type:build status:help wanted 
    opened by breznak 41
  • Port Networks tests to Catch and document how to

    Port Networks tests to Catch and document how to

    This PR is to track the work on #10 , using the Catch test framework . Replaces #145 based on merged #147.

    Catch stands for C++ Automated Test Cases in Headers, is a modern, C++-native, header-only, framework for unit-tests, TDD and BDD, see https://github.com/philsquared/Catch .

    Catch:

    • is header-only, thus little hassle to add it to nupic.core, unlike gtest
    • provides all gtest functionalities including JUnit-style xml output as needed by #10
    • provides BDD-style assertion macros, which is tempting to me who was influenced by ruby's cucumber

    This PR intends to complete the following tasks:

    • [x] make catch generate xUnit style reports as the original #10 requests
    • [x] porting original tests of class Network in testeverything
    • [x] generate JUnit-style report for nupic.tools to consume
    • [x] document how to port the tests based on catch's tutorial about BDD-style assertion macros , so @rhyolight can create a series of newbie tasks as discussed here

    Nice-to-have TODOs:

    • decide a goal name for unit test, for now I'm using tests_unit
    • make test cases not built for nupic.core release and nupic pip package

    This PR is not ready to merge yet.

    status:ready type:tests 
    opened by utensil 35
  • remove ASM code with no benefits

    remove ASM code with no benefits

    During my experiments I figured the hand-tuned ASM code (in ArrayAlgo.hpp, ...) actually has no benefit over pure c++ code, as

    • compilers progressed over the time
    • we use compiler optimizations now

    the benefits of this change are:

    • speed ~0%
    • portability++
    • clean code++

    Reference: #236 #382

    I tested my on:

    • gcc 4.8 + LTO + O3, clang 3.5, gcc 4.8 defaults
    • with/without ASM code (-DNTA_ASM)
    • simple TP.compute() loop, CLA model with SP+TP+anomaly detection on ~20k records

    Results:

    LINUX:

    full : https://gist.github.com/breznak/4eb73459b05c03ebbc1c

    • gcc 4.8, optimized (-O3, -flto):
      • * ASM: 20000 191.310 0.010 191.310 0.010 {_algorithms.Cells4_compute}
      • * NO ASM: 20000 200.184 0.010 200.184 0.010 {_algorithms.Cells4_compute}
    • clang 3.5 (-O3):
      • * ASM: 20000 225.019 0.011 225.019 0.011 {_algorithms.Cells4_compute}
      • * NO ASM: 20000 222.895 0.011 222.895 0.011 {_algorithms.Cells4_compute}
    • gcc 4.8 (defaults, -O2, used for binary releases):
      • * ASM: 20000 232.067 0.012 232.067 0.012 {_algorithms.Cells4_compute}
      • * NO ASM: 20000 226.108 0.011 226.108 0.011 {_algorithms.Cells4_compute}

    OSX

    (on OS X 10.10 by @rhyolight :+1: )

    results of python -m cProfile --sort cumtime tp_large.py

    2nd test: SP+TP+anomaly model on 20k records (note: different model and data than I used on linux, see discussion. But that does not matter.)

    Windows

    (tested on Win7, 64bit by @rcrowder :+1: )

    • sp_tp_profile branch code took 16.754 seconds
    • remove_asm branch code took 16.6329 seconds
    type:cleanup type:optimization 
    opened by breznak 33
  • Bump numpy from 1.12.1 to 1.22.0 in /bindings/py

    Bump numpy from 1.12.1 to 1.22.0 in /bindings/py

    Bumps numpy from 1.12.1 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Build fails on arm64 Linux

    Build fails on arm64 Linux

    Building for the arm64 architecture on Linux fails with the following error:

    src/nupic/math/ArrayAlgo.hpp:3539:11: error: impossible constraint in 'asm'

    opened by paulscode 2
  • Fix failed test SimpleTwoRegionNetworkIntrospection on 32 bit Linux

    Fix failed test SimpleTwoRegionNetworkIntrospection on 32 bit Linux

    This solves issue #1437. New to swig, so may not be the best solution. Should at least highlight the source of the failure. Please share any ideas for solving the problem differently.

    opened by paulscode 12
  • nupic.bindings failed test SimpleTwoRegionNetworkIntrospection on 32 bit Linux

    nupic.bindings failed test SimpleTwoRegionNetworkIntrospection on 32 bit Linux

    When building NuPIC Core from source on 32 bit Linux, the SimpleTwoRegionNetworkIntrospection test case for nupic.bindings fails:

    _____________ NetworkTest.testSimpleTwoRegionNetworkIntrospection ______________
    
    self = <tests.network_test.NetworkTest testMethod=testSimpleTwoRegionNetworkIntrospection>
    
        def testSimpleTwoRegionNetworkIntrospection(self):
          # Create Network instance
          network = engine.Network()
        
          # Add two TestNode regions to network
          network.addRegion("region1", "TestNode", "")
          network.addRegion("region2", "TestNode", "")
        
          # Set dimensions on first region
          region1 = network.getRegions().getByName("region1")
    >     region1.setDimensions(engine.Dimensions([1, 1]))
    
    network_test.py:89: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <nupic.bindings.engine_internal.Dimensions;  >, args = ([1, 1],)
    
        def __init__(self, *args):
            """
                __init__(self) -> Dimensions
                __init__(self, v) -> Dimensions
                __init__(self, x) -> Dimensions
                __init__(self, x, y) -> Dimensions
                __init__(self, x, y, z) -> Dimensions
                """
    >       this = _engine_internal.new_Dimensions(*args)
    E       NotImplementedError: Wrong number or type of arguments for overloaded function 'new_Dimensions'.
    E         Possible C/C++ prototypes are:
    E           nupic::Dimensions::Dimensions()
    E           nupic::Dimensions::Dimensions(std::vector< size_t,std::allocator< size_t > >)
    E           nupic::Dimensions::Dimensions(size_t)
    E           nupic::Dimensions::Dimensions(size_t,size_t)
    E           nupic::Dimensions::Dimensions(size_t,size_t,size_t)
    
    ../src/nupic/bindings/engine_internal.py:613: NotImplementedError
    
    opened by paulscode 0
Releases(1.0.6)
  • 1.0.6(Aug 23, 2018)

    58754cf7 NUP-2519: Upgrade pycapnp to 0.6.3 64fb803e DEVOPS-383: Move deploy to S3 job to circleci workflow 16dbf534 DEVOPS-383: Migrate CircleCI builds from 1.0 to 2.0 ec14f2f5 pip install --use-wheel" was deprecated. See https://pip.pypa.io/en/stable/news/#deprecations-and-removals c2d31a95 ignore YCM configuration f7b86e0f "pip install --use-wheel" was deprecated. See https://pip.pypa.io/en/stable/news/#deprecations-and-removals 42df6caa NUP-2504: fix clang link optimization issue on private template function f5bc76b6 NUP-2504: Add unit test to softmax overflow 203493ed NUP-2506: Add missing state fields to serialization 5f1ddcbb NUP-2514: fix traversal limit 7e33ca44 NUP-2506: Add missing operator '==' to classes used in tests e5e48c8e fix accumulate b3513853 add softmax function 0032fbf5 Fix softmax overflow

    Source code(tar.gz)
    Source code(zip)
  • 1.0.4(Apr 10, 2018)

    34b2a84e5a1eecb6ee10681abec892e7ab0d010d : update swig to 3.0.12 f0d2fa357ed37672063da601fabb3846aa0e01e3 : swig: add fix for 3.0.12 where SWIG_LIB is incorrect on MinGW/Windows dabd7f87e89c59c13e67a744e7bc59713805ceb4 : NUP-2491: Validate global inhibition parameters 70d43da172f268fb52fd54c6793bf6bc2c3ed238 : NUP-2492: Add constructor vs initialize test regarding Issue #1386 a6c186ae9707e4292cabdb4070167bc92d111fec : reformat code using clang-format f069c31009e3bdf95ec728e916fa99274a616a26 : Add missing include required for NTA_ASSERT 5aca46708be14972420a4bb87a1d4be55b0d565c : ignore build, installation and IDE artifacts c9377d528d6d6e7f9dcd3dbfca734cccb11b2b3c : Fix cmake version and project name 1e486fde14993ec9332c0d60f53b1f27ae0564a1 : DEVOPS-353: Allow element count to be smaller than buffer size de88baaacd9a9a4194b69a6fc9656c001e45297a : DEVOPS-353: Add 'isSparse' attribute to input/output 9ae6155d0525d6aecc4c6524181cf8d70e840f32 : DEVOPS-353: Implement sparse links 4e800a64160f74f5d8c6f7900e6663fc63e780ff : DEVOPS-353: Fix tests to run with nupic.core directly instead of nupic 8a1d5eeb146d1f1af2c27fb3846aa06d40b33e50 : NUP-2475: Make sure Network API links use the same dtype at both ends 7ae0d64f9ca18c8d0240eea2a140a079a3154d9d : NUP-2495: Check style using clang-format 3071b8a50899d50648b5a50c9c1fd2f8b4422acf : DEVOPS-353: Update "setSparseOutput" documentation ee591f8d08250529699d84b0386db7b995b1887f : DEVOPS-353: Remove unecessary "sizeof" 380c10c4db307e83c93ab65705c1c93d13a91fe2 : DEVOPS-353: Fix exception message a8fd7d2627b16959dc4f422faf8af3bd5c87bf81 : Merge pull request #1401 from lscheinkman/NUP-2495 bfe6ed18a2d27950da3b75c060002fd651662ddf : NUP-2495: Fix bamboo style check d72f0effecb2c19f124256684986c4bf5e747c4d : Merge pull request #1403 from lscheinkman/NUP-2495 9a36517f9d0c3a82917daecbb1d1e38274029a11 : DEVOPS-353: Update docstring after review fb596b5d8c86cfeba5919f9773536fc13549c31a : NUP-2475: Fix includes 2f027a7b757d57b431a42766b9e699151ed6f60b : NUP-2475: Add sparse link validation de567a4ee6da779055a7a8a56c9470f6f68db2e2 : NUP-2495: Update clang-format instructions 6a580c0611de59f0a45808db6e5414b88e20db21 : Fix not include ClassifierResult.hpp error 9f10533d531a69fef6683a8f66eb9019cdb38d99 : Revert swig version back to 3.0.2 and add test checking network parameters ac43320f2f358f2a1d0f72630aa9557e545963a1 : NUP-2505: Remove win32 build from CI 31ee2be49dca59d268176f6c336d838932772324 : Fix include position 860459cf4b318f497eeb59dbf2df805d45fdbf3a : NUP-2506: Add operator '==' to classes used in tests e10b2cb28db1d0ee92b108c5078645acacecf8d6 : Merge pull request #1411 from rhyolight/release-1.0.4 7e33ca44128d15d226fb2dab47201d04e00bb597 : NUP-2506: Add missing operator '==' to classes used in tests 5f1ddcbbe3368479881da2f235c24cb4f4f5e03d : NUP-2514: fix traversal limit 203493ed26060af36b44d7b354b264cd95e5c02f : NUP-2506: Add missing state fields to serialization

    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Jan 16, 2018)

  • 1.0.2(Nov 1, 2017)

  • 1.0.0(Jul 6, 2017)

    • Convert getProtoType to getSchema to be consistent with Python interface in nupic
    • Add Circle badge to README
    • Make --user optional since manylinux doens't use it
    • Remove build tools setup for Linux CI jobs since new base image already provides these tools
    • NUP-2341: Expose capnp serialization to SVM swig interface
    • NUP-2341: Add missing 'getSchema'
    • update boost to 1.64.0 stable release
    • Add a "checkInputs" param to the TemporalMemory
    Source code(tar.gz)
    Source code(zip)
  • 0.7.2(Jun 16, 2017)

  • 0.7.1(Jun 16, 2017)

    • SP optimization using minmax_element (#1326)
    • Add capnp serialization to Cells4, Cell, Segment, SegmentUpdates, CState, etc. (#1346)
    • Fix missing actValue in SDR classifier SWIG interface (#1348)
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Jun 8, 2017)

    • Give clear exception when clients attempt to reuse ClassifierResult instance with SDRClassifier (PR #1342)
    • Remove FastClaClassifier (PR #1341)
    • Allow SDR classifier to handle multiple category (PR #1339)
    • Add Cap'n Proto serialization to SVM (PR #1338)
    Source code(tar.gz)
    Source code(zip)
  • 0.6.3(Jun 2, 2017)

    • Change the Connections to stop doing automatic segment / synapse cleanup
    • Revamp the TemporalMemory proto so that it captures all information
    • For numpy, use a single PyArray_API symbol per binary rather than one per cpp file
    • Use numpy 1.12.1
    • Use pycapnp 0.5.12
    • Use latest pytest 3.0.7, pytest-cov 2.5.0, pytest-xdist 1.16.0
    Source code(tar.gz)
    Source code(zip)
  • 0.6.2(May 19, 2017)

    • Updated Circle CI configuration and switch to that for OS X builds (instead of Travis CI)
    • Documentation updates: PyRegion
    • IWYU documentation update
    • Fixed C++ boolean ref counting bug that caused segfaults when running Python projects
    • Update pytest and pycapnp dependency versions
    • Implemented byte buffer passing as alternative Python<->C++ strategy for capnp serialization logic. This has some memory/speed overhead but avoids ABI issues that could cause crashes
    • Fixed prototest to get meaningful comparison numbers
    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Apr 5, 2017)

    • Eliminate installation of unnecessary header files when building nupic.bindings. Install Version.hpp unconditionally for the sake of the deployment usage in .travis.yaml
    • Fixed servicing of delayed links such that the circular buffers of all links within a network are refreshed at the end of each time step; and 0-delay links copy data directly from src to dest, bypassing the circular buffer altogether.
    • Add a nNonZerosPerRowOnCols SparseMatrix method
    • Fix up some out of date SWIG interface code
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Mar 21, 2017)

    • NUP-2366 Remove no-longer-relevent test code
    • NUP-2366 Do not pass arguments in initialize, remove conflicting docstring
    • Add a unit test for mapSegmentsToCells
    • Change segments to UInt32 to speed up the bindings
    • Fix up fetch_remote script to properly poll until the build is complete.
    • Updates to tests moved over from nupic
    • removed shebangs
    • Changed all copyright headers on all files to AGPL.
    • Tests folder refactored
    • Reads version from VERSION for doc output
    • Fixing travis-ci unit tests
    • Doxygen only creates XML, used by Breathe to create docs.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.3(Mar 8, 2017)

    • Added comment explaining the nuance of the static variables in Cells4::adaptSegment
    • Improved explanation of containers in Cells4::adaptSegment implementation.
    • Regenerate SWIG bindings C++ files if any headers change.
    • Enable -D_LIBCPP_DEBUG=0 for debug-lite in Clang builds (e.g., OS X). NOTE: Clan't debug mode is not mature, and anything above level 0 appears to require de bug build of libc++ during linking, which it not present by default on OS X.* Fixed deletion of wrong synapses and index-out-of-bounds in Cells4::adaptSegment/Segment::freeNSynapses.
    • corrected typo in CHANGELOG.md (boostingStrength -> boostStrength)
    • Remove ExtendedTemporalMemory proto
    • Fix bug in unit test, make TM catch this bug in DEBUG builds
    • Perf: Densify prevActiveCells rather than binary searching
    • Get POC of OS X build on circle.ci up and running.
    • Bump version to prerelease.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jan 23, 2017)

    • Improved network API introspection
    • Fix bug with region dimensions inference in network API. fixes #1212
    • Updates to info in RELEASE.md
    • Fixup import favoring native unittest
    • Use xcode6.4 image per documentation at https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
    • NUP-2316 Fixed OS X build failure on xcode 8 caused by included some files in static library that shouldn't have been included.
    • Misc. changes for sparse matrices and using them in Connections. Moving loops to C++.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Jan 13, 2017)

    • Link: Implemented delayed links. NOTE: this is not backwards compatible with CLAModel class, so Nupic will be updated as well.
    • SparseMatrix: Stop copying input vectors
    • Drop the declare_namespace call - Issue #1072
    • SparseMatrix: Add option to specify rows in nNonZerosPerRow
    • SparseMatrix: setRandomZerosOnOuter with list of counts
    • SparseMatrix: rightVecSumAtNZ cleanup
    • SparseMatrix: Put cols in dense array even when not necessary
    • Removes experimental code that will now live in nupic.research.core.
    • Removed unused, obsolete NetworkFactory class.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.16(Dec 12, 2016)

    • SpatialPooler: Stop rounding the boost factors
    • SpatialPooler: Rename "maxBoost" to "boostingStrength"
    • SpatialPooler: Remove minActiveDutyCycles and minPctActiveDutyCycles
    Source code(tar.gz)
    Source code(zip)
  • 0.4.15(Dec 8, 2016)

  • 0.4.14(Dec 5, 2016)

    • SpatialPooler: New boosting algorithm
    • SpatialPooler: Stop putting tie-break info into the overlaps. getBoostedOverlaps() return values are now more correct.
    • SpatialPooler: Use an EPSILON when comparing permanences to a threshold to avoid floating point differences.
    • SpatialPooler: Round the boost factors to two decimal places to avoid floating point differences.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.13(Nov 28, 2016)

    • Use VERSION file when generating docs.
    • 64-bit gcc on Windows build error
    • New: setZerosOnOuter, increaseRowNonZeroCountsOnOuterTo
    • Remove a nupic.math test that should stay in nupic
    • Use unittest, not unittest2, to match the nupic.core CI config
    • Add C++ unit tests for the new SparseMatrix methods
    • Finish moving nupic.bindings math tests to nupic.core
    • s/AboveAndBelow/BelowAndAbove
    • Moves some tests for SWIG bindings from nupic to nupic.core
    • Better method names: s/AboveAndBelow/BelowAndAbove
    • Four new SparseMatrix methods, enabling batch synapse learning
    • Expose the nrows,ncols SparseBinaryMatrix ctor in the bindings
    Source code(tar.gz)
    Source code(zip)
  • 0.4.12(Nov 3, 2016)

  • 0.4.10(Oct 12, 2016)

    • Removes version as part of iterative artifact name
    • Deleted linux ci scripts for travis.
    • Removed calls to linux ci scripts, forced platform=darwin
    • Remove gcc builds from matrix.
    • Using image w/ same version of xcode as last passing master build
    • Remove some executables from test list that we don't want to run every build.
    • Complete test coverage for region registration.
    • Reduce build times by removing some executables from build.
    • Update py_region_test for new behavior and make sure the test is run in CI.
    • Fixes #1108 by only throwing exception when registering region with class name that is already registered if the new region is from a different module than the original.
    • Remove unused vagrant configuration
    • Remove default values for vectors because GCC can't handle it
    • gcc error: checking whether a UInt is positive
    • "depolarizeCells", "reinforceCandidates", "growthCandidates"
    Source code(tar.gz)
    Source code(zip)
  • 0.4.9(Sep 23, 2016)

    • Obey wrapAround paramater for columns, not just inputs
    • Make sure exceptions are properly exposed when parsing dataType in region spec.
    • Network API: allow Bools to be used as creation params
    • DEVOPS-157 Remove now-unused RESULT_KEY env var from the build-and-test-nupic-bindings.sh interface.
    • Handle new synapsesForSegment behavior in Connections perf test
    Source code(tar.gz)
    Source code(zip)
  • 0.4.8(Sep 16, 2016)

    • Add missing argument to Set-PsDebug -Trace
    • Issue1075 fix py_region_test failure on windows (#1082)
    • Perf: Walk neighborhoods via iterators.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.7(Sep 14, 2016)

    • Check that TM input is sorted indices in Release builds
    • Update inhibition comments and docstrings.
    • Use C arrays in TemporalMemory. Allows numpy array reuse.
    • Added that -DNUPIC_BUILD_PYEXT_MODULES=ON is the default at this time.
    • Added information about usage of the NUPIC_BUILD_PYEXT_MODULES cmake property.
    • Describe flatIdx in Connections docstring
    • Consistent param ordering between implementations.
    • Store "numActivePotentialSynapses". No more "SegmentOverlap".
    Source code(tar.gz)
    Source code(zip)
  • 0.4.6(Sep 1, 2016)

    • Templates: Stop inferring const unnecessarily
    • Build error sometimes in clang -- need copy constructor
    • Check that minThreshold <= activationThreshold
    • Split compute into activateCells and activateDendrites
    • TM and ETM cleanup
    • ETM: Grow synapses on active segments, not just matching segments
    • Removal of MSVC TP compilation flag
    • Also do the learnOnOneCell serializaton check in ::save
    • Implement learnOnOneCell in the ETM
    Source code(tar.gz)
    Source code(zip)
  • 0.4.5(Aug 17, 2016)

    • Removed no longer used pre-built Swig executables for various flavors of Linux; nupic.core automatically builds Swig from embedded sources on non-Windows platforms.
    • DEVOPS-141 Apply an export map to OS X, Linux, and MINGW builds of nupic.bindings shared objects.
    • Refactor extension build steps into a function shared by algorithms, math, engine_internal, etc. in preparation for adding export maps.
    • Work around issue in cmake 2.8.7: have external project AprUtil1StaticLib depend directly on external project Apr1StaticLib instead of its library wrapper ${APR1_STATIC_LIB_TARGET}; the latter was incorrectly interperting the dependency as another external project instead of library; but worked correctly on cmake 2.8.12.
    • Completed wrapping of external static libs in add_library targets
    • Represent external build of capnproto as single static library with target name ${CAPNP_STATIC_LIB_TARGET} and containing all capnproto library objects.
    • No need for custom target in CREATE_CAPNPC_COMMAND function, since nupic_core_solo is the only consumer of the custom command's outputs.
    • Try building nupic_core_solo intermediate static library without specifying system libraries. It's a static library and shouldn't need additional linking information.
    • Removed nupic_core_solo from installed targets, since it's only an intermediate artifact and not intended to be an output product.
    • issue-1034 Reorganized build to link nupic_core static library tests against the "combined" nupic_core static library, which is considered an output artifact, instead of nupic_core_solo static lib, which is only an intermediate step.
    • Use library utils to correctly combine multiple static libraries into a single one.
    • DEVOPS-135 Implement a hacky work-around by preloading pycapnp's exteions DLL in RTLD_GLOBAL mode, which enables resultion of capnproto references when nupic.bidnings extensions are loaded.
    • Consider EPSILON while finding minPermanenceSynapse
    • Refactor to make GCC stop finding false positives
    • New implementation of GCC_UNINITIALIZED_VAR
    • DEVOPS-135 Remove capnproto from python extensions shared libs in order to avoid conflict with capnproto methods compiled into pycapnp, possibly compiled with a different compiler/version and with different compiler/linker flags. Instead, we rely on dynamic linking of the necessary symbols from capnproto in pycapnp.
    • Avoid clang error "unknown warning option '-Wno-maybe-uninitialized'"
    • Store EPSILON as a static const Permanence
    • Disable GCC's maybe-uninitialized warnings. Too many false positives.
    • Fixes nupic.core github issue #1031: rename EXTERNAL_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED_STR to EXTERNAL_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED and turn it into a list.
    • fixes floating point comparison bug
    • Use group_by in TemporalMemory. No more ExcitedColumns.
    • Work around another GCC maybe-uninitialized faulty error
    • Build error when including <GroupBy.hpp> without
    • a fresh look at ExcitedColumns: it's just a group_by
    • Fixed indexing bug in serialization
    • Fix the unsigned int underflow bug in the ETM
    • Workaround for a mingwpy issue
    • DEVOPS_116 Add stock Numenta file headers and improve some comments in manylinux wheel build scripts.
    • Fixed version bug in SDR classifier deserialization
    • Updated bindings to handle SDR classifier
    • Fix bug in TemporalMemory save / load
    • Make getLeastUsedCell non-allocating
    • Put ExcitedColumns in a namespace to avoid collisions
    • Add apical dendrites to ExtendedTemporalMemory
    • DEVOPS-116 Implement prototype manylinux wheel build using docker image numenta/manylinux1_x86_64:centos6.8
    • Stop implying pycapnp is in requirements.txt
    • Updated SDRClassifier to match header file on getters/setters
    • Fixed memory error (off-by-one in weight matrix creation)
    • Fixed include bug in SDRClassifier
    • Stable implementation of save/load for SDRClassifier
    • Ignore installed version of pip.
    • Make sure pip gets installed and that we get console output for everything.
    • DEVOPS-84 Add support for building nupic.bindings for OS X in bamboo
    • change heap allocation to stack allocation of Network
    • Merged upstream changes and backed out the disabling of link time optimizations since it now appears to work on the ARM.
    • Add a "formInternalConnections" parameter
    • Add new "experimental" SWIG module
    • Move ETM to "experimental" namespace
    • Support "external active cells" in the ETM
    • Use std::move to keep the previous active cells
    • Untangle the pieces that calculate segment excitation
    • Get rid of the Cell struct
    • Initial version of ExtendedTemporalMemory: copy-pasted TM
    • added blurps for CMAKE_AR and CMAKE_RANLIB
    • CMakeLists.txt cleaned up, vars renamed, docs updated
    • Updates pycapnp to 0.5.8.
    • network-factory adds missing newline to test file
    • network-factory updates test to ensure created network is unregistered.
    • deprecate-spec-vars moves documentation from Spec to PyRegion
    • network-factory adds a test to show that creating a network without any regions or links works
    • network-factory expose functions to bindings and extend functionality to accept a yaml string
    • network-factory cleans up includes and makes createNetworkFromYaml public
    • updated conditional cmake_args, fixes #981
    • network-factory passes yaml parser instead of path
    • network-factory ensure Network destructor is called on error
    • deprecate-spec-vars set defaults for regionLevel and requireSplitterMap and make them optional
    • Removed the duplicate conditional addition of the NTA_ASM compiler flag from src/CMakeLists.txt. The original remains in CommonCompilerConfig.
    • Removed check for Wreturn-type compatibility
    • CMake warning if total memory is less than 1GB
    • Added back the -O2 flag and the -Wno-return-type flag
    • GCC Bitness handling
    • Remove NTA_ASM flag
    • Removed the inversion of the NTA_ASM logic made by @codedhard
      1. Added CMake flag to make arm specific changes to the build 2. Used new CMake flag to disable inline assembly in build 3. Added NTA_ASM conditional to parts of ArrayAlgo.hpp that didn't use it to enable inline assembly
    • Add visualization event handlers to Connections class
    Source code(tar.gz)
    Source code(zip)
  • 0.4.3(May 16, 2016)

    • Adds include-what-you-use option in CMake configuration.
    • Use the supported mingwpy toolchain from pypi.anaconda.org/carlkl/simple
    • Define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS for nupic.core source build in attempt to make build work with official mingwpy toolchain
    • Protect all public member variables (except connections)
    • Move algorithm details out of the compute method
    • Split bamboo linux build into debug and release.
    • Move common environment setup for Bamboo into separate script.
    • Update SWIG to use local tarfile rather than download from sourceforge.
    • Store the new lastUsedIteration, don't just increment old one
    • Unit test: destroyed synapse + segment reuse
    • Bugfix: Keep the destroyed synapses count in sync.
    • Walk the columns and segments via ExcitedColumns iterator
    • Fail loudly when Python regions reassign an output
    • Disable asserts in release builds
    • De-duplicate a loop.
    • Removes 'long double', NTA_QUAD_PRECISION, and Real128 references from our code.
    • Add Proto for SDR Classifier
    • TemporalMemory: replace phases with "columnSegmentWalk". Much faster.
    • MovingAverage.compute() returns updated value
    Source code(tar.gz)
    Source code(zip)
  • 0.4.2(Apr 15, 2016)

    • Define and use environment variables containing compiler and linker flags specifically for 3rd-party source code.
    • Revert to installing mingwpy toolchains from https://bitbucket.org/carlkl/mingw-w64-for-python/downloads.
    • Better rand() approach, won't ever be greater than 1
    • Stop computing overlaps twice per timestep. 4% faster.
    • Stop storing segment overlap counts in a map. Now 56% faster.
    • Enable errors for windows32 build in the matrix.
    • Use proper float comparisons to avoid issues on 32 vs 64 bit machines.
    • Perf: When using sets, use std::set::find, not std::find
    • Swig needs -include cmath when building with mingw toolchain.
    • Initialize swig_generated_file_compile_flags directly from COMMON_CXX_FLAGS_OPTIMIZED to avoid -Werror.
    • Comment out header and binary install targets in CapnProto.cmake, since this is a duplicate of the exact same steps in srce/CMakeLists.txt, which installs other externals as well.
    • Attempt to fix execution of helloregion test from Travis build by modifying .travis.yml to change directory to build/release/bin just as instructed by nupic.core/README.md.
    • Added a comment about nupic.core's swig wraps relying on the macro CAPNP_LITE to have a value.
    • Fix windows build of nupic.core's Swig wraps that expects CAPNP_LITE not only to be defined (capnp recommends just defining it), but to actually have a value (non-zero).
    • Invoke additional nupic.core tests in Travis to make sure that things get tested and tests don't get broken again unnoticed: connections_performance_test helloregion hello_sp_tp prototest
    • Refactored CommonCompilerConfig.cmake to exposed optimized and unoptimized flag sets. Fixed linux GCC build of CapnProto components by changing its configuration to use unoptimized versions of common flags. Cleaned up use of local variables in src/CMakeFiles.txt. nupic.core/CmakeLists.txt is now the only place that defines REPOSITORY_DIR for use by other modules. Fixed dependency in add_custom_command function inside CREATE_CAPNPC_COMMAND to use passed-in arg SPEC_FILES instead of a property from src/CMakeLists.txt.
    • Add BITNESS to Swig.cmake
    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Mar 28, 2016)

    • Cast arg to UInt32 to avoid call resolution ambiguity on the value.write() method on Win32 platform.
    • Finish adding support for the Bool type
    • Expose encoder's 'n' so other regions' inputWidth is calculable from the outside
    • Remove reference to deleted Linear.cpp.
    • Run nupic.core encoders via boilerplate Sensor wrapper
    • Removes Linear.hpp, Linear.cpp, and reference in algorithms.i since it doesn't appear to be used anywhere.
    • Support Debug builds in Clang, put them in README
    • Add a NTA_BasicType_Bool so that we can parse bools in YAML
    • FloatEncoder base, no more common Encoder, new signature
    • Prepends BINDINGS_VERSION plus dot separater to wheel filename
    • Fix integer division bug, add tests that would catch this bug
    • Don't divide by a constant. Multiply. Dodges divide-by-0.
    • Explicitly mark all derived virtual methods as virtual.
    • Fix gcc build issue
    • C++ Encoder base + ScalarEncoder + ported unit tests
    Source code(tar.gz)
    Source code(zip)
Owner
Numenta
Biologically inspired machine intelligence
Numenta
FPE - Format Preserving Encryption with FF3 in Python

ff3 - Format Preserving Encryption in Python An implementation of the NIST approved FF3 and FF3-1 Format Preserving Encryption (FPE) algorithms in Pyt

Privacy Logistics 42 Dec 16, 2022
Benchmark for Robustness Tests of Control Alrogithms

A gym-like classical control benchmark for evaluating the robustnesses of control and reinforcement learning algorithms.

Kim Taekyung 4 Jan 18, 2022
A python implementation of the Basic Photometric Stereo Algorithm

Photometric-Stereo A python implementation of the Basic Photometric Stereo Algorithm Result Usage run Photometric_Stereo.py Code Tree |data #原始数据,tga格

20 Dec 19, 2022
Algorithms and utilities for SAR sensors

WARNING: THIS CODE IS NOT READY FOR USE Sarsen Algorithms and utilities for SAR sensors Objectives Be faster and simpler than ESA SNAP and cloud nativ

B-Open 201 Dec 27, 2022
Optimal skincare partition finder using graph theory

Pigment The problem of partitioning up a skincare regime into parts such that each part does not interfere with itself is equivalent to the minimal cl

Jason Nguyen 1 Nov 22, 2021
It is a platform that implements some path planning algorithms.

PathPlanningAlgorithms It is a platform that implements some path planning algorithms. Main dependence: python3.7, opencv4.1.1.26 (for image show) Tip

5 Feb 24, 2022
Implementation for Evolution of Strategies for Cooperation

Moraliser Implementation for Evolution of Strategies for Cooperation Dependencies You will need a python3 (= 3.8) environment to run the code. Before

1 Dec 21, 2021
Data Model built using Logistic Regression Algorithm on Python.

Logistic-Regression Problem Statement: Your client is a retail banking institution. Term deposits are a major source of income for a bank. A term depo

Hemanth Babu Muthineni 0 Dec 25, 2021
iAWE is a wonderful dataset for those of us who work on Non-Intrusive Load Monitoring (NILM) algorithms.

iAWE is a wonderful dataset for those of us who work on Non-Intrusive Load Monitoring (NILM) algorithms. You can find its main page and description via this link. If you are familiar with NILM-TK API

Mozaffar Etezadifar 3 Mar 19, 2022
So far implements A* will add more later

Pathfinding_Visualization Finds the shortest path between two nodes. The light blue path is the shortest path. The black nodes are barriers. Created i

Lukas DeLoach 1 Jan 18, 2022
Repository for Comparison based sorting algorithms in python

Repository for Comparison based sorting algorithms in python. This was implemented for project one submission for ITCS 6114 Data Structures and Algorithms under the guidance of Dr. Dewan at the Unive

Devashri Khagesh Gadgil 1 Dec 20, 2021
CLI Eight Puzzle mini-game featuring BFS, DFS, Greedy and A* searches as solver algorithms.

🕹 Eight Puzzle CLI Jogo do quebra-cabeças de 8 peças em linha de comando desenvolvido para a disciplina de Inteligência Artificial. Escrito em python

Lucas Nakahara 1 Jun 30, 2021
This is an Airport Scheduling Time table implemented using Genetic Algorithm

This is an Airport Scheduling Time table implemented using Genetic Algorithm In this The scheduling is performed on the basisi of that no two Air planes are arriving or departing at the same runway a

1 Jan 06, 2022
QDax is a tool to accelerate Quality-Diveristy (QD) algorithms through hardware accelerators and massive parallelism

QDax: Accelerated Quality-Diversity QDax is a tool to accelerate Quality-Diveristy (QD) algorithms through hardware accelerators and massive paralleli

Adaptive and Intelligent Robotics Lab 183 Dec 30, 2022
Parameterising Simulated Annealing for the Travelling Salesman Problem

Parameterising Simulated Annealing for the Travelling Salesman Problem Abstract The Travelling Salesman Problem is a well known NP-Hard problem. Given

Gary Sun 55 Jun 15, 2022
Repository for data structure and algorithms in Python for coding interviews

Python Data Structures and Algorithms This repository contains questions requiring implementation of data structures and algorithms concepts. It is us

Prabhu Pant 1.9k Jan 01, 2023
BCI datasets and algorithms

Brainda Welcome! First and foremost, Welcome! Thank you for visiting the Brainda repository which was initially released at this repo and reorganized

52 Jan 04, 2023
This is the code repository for 40 Algorithms Every Programmer Should Know , published by Packt.

40 Algorithms Every Programmer Should Know, published by Packt

Packt 721 Jan 02, 2023
Algorithms and data structures for educational, demonstrational and experimental purposes.

Algorithms and Data Structures (ands) Introduction This project was created for personal use mostly while studying for an exam (starting in the month

50 Dec 06, 2022
My own Unicode compression algorithm

Zee Code ZCode is a custom compression algorithm I originally developed for a competition held for the Spring 2019 Datastructures and Algorithms cours

Vahid Zehtab 2 Oct 20, 2021