Oblynx / HierarchicalTemporalMemory.jl

A simple, high-level Julia implementation of Numenta HTM algorithms
https://oblynx.github.io/HierarchicalTemporalMemory.jl
MIT License
21 stars 3 forks source link

SparseSynapses for the SP? #6

Closed Oblynx closed 5 years ago

Oblynx commented 5 years ago

The sparsity for proximal synapses with topology sits now at 15%. Marginal benefit from sparse matrix possible. Sparsity is determined by params.input_potentialRadius and input size; constant for SP size.

Oblynx commented 5 years ago

Breakeven point of SparseSynapses with DenseSynapses without further optimization of the permanence update (which is the sparse bottleneck) is at only 1.5% sparsity. Benchmark at https://github.com/Oblynx/htm.jl/issues/7#issuecomment-488766543

Oblynx commented 5 years ago

Matrix of connected synapses ( W == proximalSynapses.connected ) remains in Dense format, even though it's even sparser than the Synapses matrix, because the overlap calculation becomes very inefficient otherwise.

@pitsianis Is there an efficient way to calculate z' * W where z:: dense vector, W:: SparseMatrixCSC, or is dense vector x sparse matrix CSC fundamentally inefficient?

Oblynx commented 5 years ago

Solved by #11 Opening new issue for VSpM multiplication.