Practical NMF/NTF with beta divergence

State-of-the-art algorithms in NMF/NTF using any beta-divergence in an easy to use class
1,2K Descargas
Actualizado 11 mar 2015

Ver licencia

You should prefer the file
http://fr.mathworks.com/matlabcentral/fileexchange/38109-simple-to-use-nmf-ntf-with-beta-divergence
for a practical NMF/NTF implementation. I leave this submission because of its use in some other scripts.

----------------------------------
Class name : NMF
----------------------------------
Implements NMF with any beta divergence, works on data with arbitrary number of channels.
It can work alone, but can also be practical when used with the Signal class (other submission)

Features include :
* Any beta-divergence for cost function. Particular cases of interest are :
beta=2 => Euclidean distance
beta=1 => Generalized KL divergence
beta=0 => Itakura Saito distance

* Any number of components
* Any number of channels (DOA model)
* simulated annealing : it is allowed to provide a cooling scheme for the optimization, through a starting and ending beta for the beta-divergence. This is done by setting beta as a two-elements vector.See A TEMPERING APPROACH FOR ITAKURA-SAITO NON-NEGATIVE MATRIX FACTORIZATION. WITH APPLICATION TO MUSIC TRANSCRIPTION, by Nancy Bertin ICASSP2009

* Divergence weighting : it is possible to take the divergence into account differently, depending of the time-frequency bin. Such an approch was introduced in "Combining Pitch-Based Inference and Non-Negative Spectrogram Factorization in Separating Vocals from Polyphonic Music" by Virtanen, SAPA 2008

* Correlation penalization between rows of H, columns of W, or non-correlation penalization between columns of H. This is done setting the corrHTemporal, corrW and corrHPattern to
positive values. This is inspired from unpublished work by Romain Hennequin.

* Implements exponent stepsize convergence for non convex beta-divergences

* Simple rendering functions, designed to work with the class Signal. Can also work directly on matrices

Typical usage is:
* Along with Signal (for wavfiles manipulations):

s = Signal('linktomy.wav');
n = NMF(s);

* Using matrices directly, let V be a FxTxC matrix
n = NMF(V);

[optional] Now the number of components can be changed:
n.nComponents = 20;

[optional]The beta divergence can be changed:
n.beta = 0; %itakura saito, adequate for spectra

n.beta = 1; % Kullback Leibler, adequate for histograms

n.beta = 2; % Euclidean, adequate for data with gaussian noise

%or, for tempering as suggested by Bertin:
n.beta = [1 0]; %switching from KL to IS during optimization

[optional] If a matrix of weights to apply on the divergence is available, say P (same size as the data):

n.divergenceWeights = P;

[optional] A penalizing factor can be set to the correlations between
* the rows of H:
n.corrHTemporal = 1.5

* the columns of H:
n.corrHPattern = 1.5
* the columns of W:
n.corrW = 1

[optional] The current model can be displayed at each iteration
n.display = 1;

now, performing optimization with, say, 100 iterations:

n.optim(100);

now, n.W, n.H and n.Q are the NMF parameters. For convienence, functions are available to get the model for a given set of components:

model1=n.getModel(1:10); %for components 1:10

totalModel = n.getModel(); %for all components

Citar como

Antoine Liutkus (2024). Practical NMF/NTF with beta divergence (https://www.mathworks.com/matlabcentral/fileexchange/33452-practical-nmf-ntf-with-beta-divergence), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Statistics and Machine Learning Toolbox en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versión Publicado Notas de la versión
1.2.0.0

Made clear that support for this contribution is discontinued and replaced by
http://fr.mathworks.com/matlabcentral/fileexchange/38109-simple-to-use-nmf-ntf-with-beta-divergence

1.1.0.0

changed picture !

1.0.0.0