Dictionary learning implementation in progress - ksd and shapeSpaceUtils not tested and likely unstable.