0% found this document useful (0 votes)
3 views6 pages

AML Unit-4 (Part-2)

The document discusses feature extraction using PCA and NMF, highlighting the importance of selecting a balanced dataset to avoid bias in feature extraction. It explains how NMF decomposes a non-negative matrix into two non-negative matrices to identify patterns within the data. NMF is particularly useful for separating sources in a signal, providing insights into the underlying structure of the data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

AML Unit-4 (Part-2)

The document discusses feature extraction using PCA and NMF, highlighting the importance of selecting a balanced dataset to avoid bias in feature extraction. It explains how NMF decomposes a non-negative matrix into two non-negative matrices to identify patterns within the data. NMF is particularly useful for separating sources in a signal, providing insights into the underlying structure of the data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

unit-4

1. Feature extraction by PCA.

Following code is the part of the Feature extraction by PCA.

What is the following code does: To make the data less skewed, it takes up to 50 images of each person
(otherwise, the feature extraction would be overwhelmed by the likelihood of George W Bush from
the dataset considered in the previous topic,):

Explanation of Above Code:


Overall, the code selects a subset of samples and their corresponding target labels based on the first
50 instances for each unique target value. Then it normalizes the grayscale values of the selected
samples.

2. Non-Negative Matrix Factorization (NMF)


Non-Negative Matrix Factorization (NMF) is a dimensionality reduction technique
that decomposes a non-negative matrix into two non-negative matrices. It has
gained popularity in various fields, including signal processing, image processing,
text mining, and recommendation systems. NMF aims to find a low-rank
approximation of the original matrix, where the factors are non-negative and
provide a parts-based representation of the data.

Mathematically, given a non-negative matrix X of size m x n, NMF factorizes it into


two non-negative matrices, W and H, such that X ≈ WH. Here, W represents the
basis vectors or components, and H represents the coefficients or weights.

Working Principle of NMF:


Following code shows the how to implementation of NMF for better
understanding.
Use case 1.
Consider a signal as a combination of three different sources, apply Non-Negative
Matrix Factorization(NMF) and justify NMF is used for Finding interesting patterns
within the data.
In summary, NMF is used for finding interesting patterns within the data, especially
when the data can be decomposed into non-negative additive components. By
applying NMF to a signal composed of multiple sources, we can separate the sources
and identify their respective patterns, leading to a better understanding of the data
and its underlying structure.

You might also like