Non Negative Matrix Factorization Algorithm implemented FROM SCRATCH in Fortran. The overarching goal is to implement this algorithm in tangent to k-means clustering as a method of dimensionality reduction using novel techniques.
The reason it was implemented in Fortran was to practice and using a lower level programming language. Fortran typically runs faster than python and thus this made sense. Further more writing in Fortran allows it to be executed on large scale computing systems to process signals.
Below is a quick animation of one of my tests with a picture of the milky way. Notice the second image getting recreated to clear and clear clarity. This is done through multiplicative gradient approach to training the matrices of W and H to converge on creating the original product.
The decomposed matrices will serve as the features of the original matrix. The key is that by shortening the rank value we can compress the representation of the data by varying degrees. K rank will determine the factor of compression. Factor of WH/(WK+HK) compression!