All Projects → hiroyuki-kasai → Nmflibrary

hiroyuki-kasai / Nmflibrary

Licence: mit
MATLAB library for non-negative matrix factorization (NMF): Version 1.8.1

Programming Languages

matlab
3953 projects

Projects that are alternatives of or similar to Nmflibrary

SGDLibrary
MATLAB/Octave library for stochastic optimization algorithms: Version 1.0.20
Stars: ✭ 165 (+7.84%)
Mutual labels:  machine-learning-algorithms, optimization-algorithms, online-learning
GDLibrary
Matlab library for gradient descent algorithms: Version 1.0.1
Stars: ✭ 50 (-67.32%)
Mutual labels:  machine-learning-algorithms, gradient-descent, optimization-algorithms
OLSTEC
OnLine Low-rank Subspace tracking by TEnsor CP Decomposition in Matlab: Version 1.0.1
Stars: ✭ 30 (-80.39%)
Mutual labels:  machine-learning-algorithms, matrix-factorization, online-learning
taller SparkR
Taller SparkR para las Jornadas de Usuarios de R
Stars: ✭ 12 (-92.16%)
Mutual labels:  machine-learning-algorithms, bigdata, data-analysis
Solid
🎯 A comprehensive gradient-free optimization framework written in Python
Stars: ✭ 546 (+256.86%)
Mutual labels:  machine-learning-algorithms, optimization-algorithms
Optim
OptimLib: a lightweight C++ library of numerical optimization methods for nonlinear functions
Stars: ✭ 411 (+168.63%)
Mutual labels:  optimization-algorithms, gradient-descent
Spring2017 proffosterprovost
Introduction to Data Science
Stars: ✭ 18 (-88.24%)
Mutual labels:  data-analysis, machine-learning-algorithms
Optimus
🚚 Agile Data Preparation Workflows made easy with dask, cudf, dask_cudf and pyspark
Stars: ✭ 986 (+544.44%)
Mutual labels:  data-analysis, bigdata
leaflet heatmap
简单的可视化湖州通话数据 假设数据量很大,没法用浏览器直接绘制热力图,把绘制热力图这一步骤放到线下计算分析。使用Apache Spark并行计算数据之后,再使用Apache Spark绘制热力图,然后用leafletjs加载OpenStreetMap图层和热力图图层,以达到良好的交互效果。现在使用Apache Spark实现绘制,可能是Apache Spark不擅长这方面的计算或者是我没有设计好算法,并行计算的速度比不上单机计算。Apache Spark绘制热力图和计算代码在这 https://github.com/yuanzhaokang/ParallelizeHeatmap.git .
Stars: ✭ 13 (-91.5%)
Mutual labels:  bigdata, data-analysis
Model Describer
model-describer : Making machine learning interpretable to humans
Stars: ✭ 22 (-85.62%)
Mutual labels:  data-analysis, machine-learning-algorithms
Countly Sdk Cordova
Countly Product Analytics SDK for Cordova, Icenium and Phonegap
Stars: ✭ 69 (-54.9%)
Mutual labels:  data-analysis, bigdata
Onedal
oneAPI Data Analytics Library (oneDAL)
Stars: ✭ 382 (+149.67%)
Mutual labels:  data-analysis, machine-learning-algorithms
Articles
A repository for the source code, notebooks, data, files, and other assets used in the data science and machine learning articles on LearnDataSci
Stars: ✭ 350 (+128.76%)
Mutual labels:  data-analysis, machine-learning-algorithms
Cppnumericalsolvers
a lightweight C++17 library of numerical optimization methods for nonlinear functions (Including L-BFGS-B for TensorFlow)
Stars: ✭ 638 (+316.99%)
Mutual labels:  optimization-algorithms, gradient-descent
Data-Analysis
Different types of data analytics projects : EDA, PDA, DDA, TSA and much more.....
Stars: ✭ 22 (-85.62%)
Mutual labels:  machine-learning-algorithms, data-analysis
Mindseye
Neural Networks in Java 8 with CuDNN and Aparapi
Stars: ✭ 8 (-94.77%)
Mutual labels:  optimization-algorithms, gradient-descent
Tennis Crystal Ball
Ultimate Tennis Statistics and Tennis Crystal Ball - Tennis Big Data Analysis and Prediction
Stars: ✭ 107 (-30.07%)
Mutual labels:  data-analysis, bigdata
Spark Py Notebooks
Apache Spark & Python (pySpark) tutorials for Big Data Analysis and Machine Learning as IPython / Jupyter notebooks
Stars: ✭ 1,338 (+774.51%)
Mutual labels:  data-analysis, bigdata
Spark R Notebooks
R on Apache Spark (SparkR) tutorials for Big Data analysis and Machine Learning as IPython / Jupyter notebooks
Stars: ✭ 109 (-28.76%)
Mutual labels:  data-analysis, bigdata
Loandefault Prediction
Lending Club Loan data analysis
Stars: ✭ 113 (-26.14%)
Mutual labels:  data-analysis, machine-learning-algorithms

NMFLibrary

MATLAB library for non-negative matrix factorization (NMF)

Authors: Hiroyuki Kasai

Last page update: Oct. 14, 2020

Latest library version: 1.8.1 (see Release notes for more info)


Introduction

The NMFLibrary is a pure-Matlab library of a collection of algorithms of non-negative matrix factorization (NMF).


List of the algorithms available in NMFLibrary


Algorithm configurations

Category Name in example codes function options.alg other options
Base MU-EUC nmf_mu mu metric='EUC'
MU-KL nmf_mu mu metric='KL'
MU-ALPHA nmf_mu mu metric='ALPHA-D'
MU-BETA nmf_mu mu metric='BETA-D'
Modified MU nmf_mu mod_mu
Acceralated MU nmf_mu acc_mu
PGD nmf_pgd pgd
Direct PGD nmf_pgd direct_pgd
ALS nmf_als als
Hierarchical ALS nmf_als hals_mu
Acceralated hierarchical ALS nmf_als acc_hals_mu
ASGROUP nmf_anls anls_asgroup
ASGIVENS nmf_anls anls_asgivens
BPP nmf_anls anls_bpp
Variant Semi-NMF semi_nmf
NeNMF nenmf
GNMF GNMF
SDNMF SDNMF
Sparse sparseMU-EUC nmf_sparse_mu metric='EUC'
sparseMU-KL nmf_sparse_mu metric='KL'
sparseNMF sparse_nmf
NMFsc nmf_sc
nsNMF ns_nmf
fnsNMF ns_nmf metric='EUC', update_alg='apg'
Orthogonal DTPP nmf_dtpp
orthMU nmf_orth_mu
OrthNMF
NMF-HALS-SO
Symmetric SymmANLS symm_anls
SymmHALS symm_halsacc
SymmNewton symm_newton
Online INMF inmf
ONMF onmf
Acceralated ONMF omf_acc
SPG spg_nmf
RONMF ronmf
SAGA-MU-NMF asag_mu_nmf
SMU smu_nmf
SVRMU svrmu_nmf
Probabilistic PNMF-VB pnmf_vb
PNMF-GIBBS pnmf_gibbs

Folders and files

./                      - Top directory.
./README.md             - This readme file.
./run_me_first.m        - The scipt that you need to run first.
./demo.m                - Demonstration script to check and understand this package easily. 
./demo_face.m           - Demonstration script to check and understand this package easily. 
|plotter/               - Contains plotting tools to show convergence results and various plots.
|auxiliary/             - Some auxiliary tools for this project.
|solver/                - Contains various optimization algorithms.
    |--- base/          - Basic NMF solvers.
    |--- online/        - Online/stochstic NMF solvers.
    |--- sparse/        - Sparse NMF solvers.
    |--- robust/        - Robust NMF solvers.
    |--- orthogonal/    - Orthogonal NMF solvers.
    |--- symm/          - Symmetric NMF solvers.
    |--- nenmf/         - Nesterov's accelerated NMF solver.
    |--- probabilistic/ - Probabilistic NMF solvers.
    |--- 3rd_party/     - Solvers provided by 3rd_party.

First to do

Run run_me_first for path configurations.

%% First run the setup script
run_me_first; 

Simplest usage example: 4 steps!

Just execute demo for the simplest demonstration of this package. .

%% Execute the demonstration script
demo; 

The "demo.m" file contains below.

%% generate synthetic data non-negative matrix V size of (mxn)
m = 500;
n = 100;
V = rand(m,n);
    
%% Initialize rank to be factorized
rank = 5;

%% perform factroization
% MU
options.alg = 'mu';
[w_nmf_mu, infos_nmf_mu] = nmf_mu(V, rank, options);
% Hierarchical ALS
options.alg = 'hals';
[w_nmf_hals, infos_nmf_hals] = nmf_als(V, rank, options);        
    
%% plot
display_graph('epoch','cost', {'MU', 'HALS'}, {w_nmf_mu, w_nmf_hals}, {infos_nmf_mu, infos_nmf_hals});


Let's take a closer look at the code above bit by bit. The procedure has only 4 steps!

Step 1: Generate data

First, we generate synthetic data of V of size (mxn).

m = 500;
n = 100;
V = rand(m,n);

Step 2: Define rank

We set the rank value.

rank = 5;

Step 3: Perform solver

Now, you can perform optimization solvers, e.g., MU and Hierarchical ALS (HALS), calling solver functions, i.e., nmf_mu() function and nmf_als() function after setting some optimization options.

% MU
options.alg = 'mu';
[w_nmf_mu, infos_nmf_mu] = nmf_mu(V, rank, options);
% Hierarchical ALS
options.alg = 'hals';
[w_nmf_hals, infos_nmf_hals] = nmf_als(V, rank, options); 

They return the final solutions of w and the statistics information that include the histories of epoch numbers, cost values, norms of gradient, the number of gradient evaluations and so on.

Step 4: Show result

Finally, display_graph() provides output results of decreasing behavior of the cost values in terms of the number of iterrations (epochs) and time [sec].

display_graph('epoch','cost', {'MU', 'HALS'}, {w_nmf_mu, w_nmf_hals}, {infos_nmf_mu, infos_nmf_hals});
display_graph('time','cost', {'MU', 'HALS'}, {w_nmf_mu, w_nmf_hals}, {infos_nmf_mu, infos_nmf_hals});

That's it!


More plots

"demo_face.m" illustrates the learned basis (dictrionary) in case of CBCL face datasets.

The dataset is first loaded into V instead of generating synthetic data in Step 1.

V = importdata('./data/CBCL_face.mat');

Then, we can display basis elements (W: dictionary) obtained with different algorithms additionally in Step 4.

plot_dictionnary(w_nmf_mu.W, [], [7 7]); 
plot_dictionnary(w_nmf_hals.W, [], [7 7]); 

License

  • The NMFLibrary is free, non-commercial and open source.
  • The code provided iin NMFLibrary should only be used for academic/research purposes.
  • Third party files are included.
    • For ANLS algorithms: nnlsm_activeset.m, nnls1_asgivens.m, nnlsm_blockpivot.m, and normalEqComb.m written by Jingu Kim.
    • For PGD algorithm: nlssubprob.m.
    • For GNMF algorithm: GNMF.m, GNMF_Multi.m, constructW.m and litekmeans.m writtnen by Deng Cai.
    • For SDNMF algorithm: SDNMF.m, and SDNMF_Multi.m writtnen by Wei Qian.
    • For symmetric algorithms writtnen by D.Kang et al. and Z. Zhu et al.
    • For acceleration sub-routines in nmf_mu.m and nmf_als.m for MU and HALS from Nicolas Gillis.
    • For dictionaly visualization: plot_dictionnary.m, rescale.m, and getoptions.m.

Acknowledge

  • Thank you for big contributions to this library to
    • Haonan Huang

Problems or questions

If you have any problems or questions, please contact the author: Hiroyuki Kasai (email: hiroyuki dot kasai at waseda dot jp)


Release notes

  • Version 1.8.1 (Oct. 14, 2020)
    • Bug fixed in nmf_sc.m and semi_nmf, and added the LPinitSemiNMF algorithm into generate_init_factors.m (Thanks to Haonan Huang).
  • Version 1.7.0 (June 27, 2019)
    • Symmetic solvers are added.
    • Clustering quality measurements are integrated into store_nmf_infos.m.
  • Version 1.7.0 (May 21, 2019)
    • PNMF-VB and NeNMF are added.
    • Fixed some bugs.
  • Version 1.6.0 (May 16, 2019)
    • DTPP is added.
  • Version 1.5.1 (Apr. 22, 2019)
    • Some solvers are modified to fix bugs.
  • Version 1.5.0 (Jul. 30, 2018)
    • fnsNMF and NMF-HALS-SO are added.
  • Version 1.4.0 (Jul. 24, 2018)
    • sparseMU and orthMU are added.
    • MU with Kullback-Leibler divergence (KL), Amari alpha divergence, and beta divergenceare added.
  • Version 1.3.0 (Jul. 23, 2018)
    • NMFsc, scNMF and csNMF are added.
  • Version 1.2.0 (Jul. 21, 2018)
    • GNMF, Semi-NMF and SDNMF are added.
  • Version 1.1.0 (Apr. 17, 2018)
    • Online/stochastic solvers are added.
  • Version 1.0.0 (Apr. 04, 2017)
    • Initial version.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].