Skip to content

If you want to learn how to decompose a matrix into smaller matrices, you might want to check out this GitHub repository. It has the implementation of non-negative matrix factorization (NMF) from the basics, using Python and its libraries such as PyTorch, NumPy et al.

License

JanmayHem/Non-Negative-Matrix-Factorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Non-Negative-Matrix-Factorization

Non-negative matrix factorization (NMF) is a technique to decompose a matrix of non-negative values into two smaller matrices, also with non-negative values. It can be used for dimensionality reduction, feature extraction, clustering, and other applications. This GitHub repository contains the implementation of NMF from scratch, using various optimization algorithms such as gradient descent, multiplicative update, and alternating least squares. The code is written in Python and uses NumPy for matrix operations. The repository also includes some examples of applying NMF to image and text data, as well as a comparison of the performance and accuracy of different algorithms. If you are interested in learning more about NMF and how to implement it, this repository is for you.

In this repository we look at a simple application of NMF to find out facial features and then reconstruct those face images using our updated Feature and Weight matrices.

Links

Dataset

The Olivetti faces dataset is a collection of 400 grayscale images of 40 different human faces. The images were taken between April 1992 and April 1994 at AT&T Laboratories Cambridge1. The dataset was used for face recognition research and is available from scikit-learn, a Python library for machine learning2.

The images have a resolution of 64x64 pixels and are normalized to have the same lighting, background, and pose. The faces show different expressions, such as smiling or not smiling, and some have glasses or no glasses. The dataset has a label for each image, indicating the identity of the person in the range of 0 to 392.

The Olivetti faces dataset is a classic benchmark for face recognition algorithms and can be used for unsupervised or semi-supervised learning tasks. Some examples of using the dataset are online learning of a dictionary of parts of faces3, pixel importances with a parallel forest of trees4, face completion5, and face clustering6.

About

If you want to learn how to decompose a matrix into smaller matrices, you might want to check out this GitHub repository. It has the implementation of non-negative matrix factorization (NMF) from the basics, using Python and its libraries such as PyTorch, NumPy et al.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published