An K-SVD implementaion written in Python.
pip install ksvd
import numpy as np
from ksvd import ApproximateKSVD
# X ~ gamma.dot(dictionary)
X = np.random.randn(1000, 20)
aksvd = ApproximateKSVD(n_components=128)
dictionary = aksvd.fit(X).components_
gamma = aksvd.transform(X)
- Approximate K-SVD
Licensed under the Apache License 2.0.