Question: Question 4 : Non - negative Matrix Factorization ( NMF ) The non - negative matrix factorization is a dimension reduction technique that is often
Question : Nonnegative Matrix Factorization NMF
The nonnegative matrix factorization is a dimension reduction technique that is often applied to image data. It is similar to PCA except that is only applicable for strictly positive data. We can apply the NMF to vectorized versions of the shot surface. This is useful because we can convert the observed matrix of shot surfaces into:
Bases: Identifying modes of shooting style number of modes is determined by ncomponents argument to NMF function below
Coefficients: How each players shooting style could be expressed as a positive linear combination of these bases
The NMF solves the following problem: given some matrix
is
matrix, NMF computes the following factorization:
where
is
matrix and
is
matrix.
In this homework, we have the following:
The data matrix
is of dimension
number of players and
number of total square bins on the court Each column corresponds to a player, with entries corresponding to a "flattened" or "vectorized" version of the d histograms plotted in part b
Bases matrix:
Columns
contain the shot "bases". First, we will try it with
bins in a and then with
bins in d
Coefficient matrix: H
Each column of
gives a coefficient for each of the bases vectors in
and there are
columns for each player.
The sklearn library is one of the main Python machine learning libraries. It has a built in NMF function for us The function below runs this function and normalizes the basis surfaces to sum to
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
