之前写过两篇文章。各自是

1)矩阵分解的综述:scikit-learn:2.5.矩阵因子分解问题

2)关于TruncatedSVD的简介:scikit-learn:通过TruncatedSVD实现LSA(隐含语义分析)

今天发现NMF也是一个非常好非常有用的模型,就简介一下。它也属于scikit-learn:2.5.矩阵因子分解问题的一部分。

NMF是还有一种压缩方法,前提是如果数据矩阵是非负的。

在数据矩阵不包括负值的情况下。 NMF能够取代PCA及他的变形(NMF can
be plugged in instead of PCA or
its variants, in the cases where the data matrix does not contain negative values.)。

他通过把X分解成W和H。并优化下式:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

This norm is an obvious extension of the Euclidean norm to matrices. (Other optimization objectives have been suggested in the NMF literature, in particular Kullback-Leibler divergence, but these are not currently implemented.)

和PCA不同的是。NNMF通过增量式(通过叠加每个子成分而不做相减操作)的方式表示一个向量,这样的增量式模型能有效表示图像和文本。

NNMF实现了非负双神秘值分解( Nonnegative Double Singular Value Decomposition,NNDSVD)。NNDSVD基于两个SVD过程。一个SVD过程用来近似数据矩阵,还有一个SVD过程利用单位秩矩阵的代数性质来近似第一步产生的SVD因子的正值部分。NNDSVD的基本实现能非常好地用于稀疏矩阵分解。

对于非稀疏矩阵,能够使用变形NNDSVDa (in which all zeros are set equal to the mean of all elements of the data)和NNDSVDar (in which the
zeros are set to random perturbations less than the mean of the data divided by 100)

这个样例非常不错哦:

http://scikit-learn.org/stable/auto_examples/applications/topics_extraction_with_nmf.html#example-applications-topics-extraction-with-nmf-py

scikit-learn:通过Non-negative matrix factorization (NMF or NNMF)实现LSA(隐含语义分析)的更多相关文章

  1. Matrix Factorization, Algorithms, Applications, and Avaliable packages

    矩阵分解 来源:http://www.cvchina.info/2011/09/05/matrix-factorization-jungle/ 美帝的有心人士收集了市面上的矩阵分解的差点儿全部算法和应 ...

  2. 关于NMF(Non-negative Matrix Factorization )

    著名的科学杂志<Nature>于1999年刊登了两位科学家D.D.Lee和H.S.Seung对数学中非负矩阵研究的突出成果.该文提出了一种新的矩阵分解思想――非负矩阵分解(Non-nega ...

  3. (原创)(三)机器学习笔记之Scikit Learn的线性回归模型初探

    一.Scikit Learn中使用estimator三部曲 1. 构造estimator 2. 训练模型:fit 3. 利用模型进行预测:predict 二.模型评价 模型训练好后,度量模型拟合效果的 ...

  4. 《Non-Negative Matrix Factorization for Polyphonic Music Transcription》译文

    NMF(非负矩阵分解),由于其分解出的矩阵是非负的,在一些实际问题中具有非常好的解释,因此用途很广.在此,我给大家介绍一下NMF在多声部音乐中的应用.要翻译的论文是利用NMF转录多声部音乐的开山之作, ...

  5. Non-negative Matrix Factorization 非负矩阵分解

    著名的科学杂志<Nature>于1999年刊登了两位科学家D.D.Lee和H.S.Seung对数学中非负矩阵研究的突出成果.该文提出了一种新的矩阵分解思想――非负矩阵分解(Non-nega ...

  6. Understanding matrix factorization for recommendation

    http://nicolas-hug.com/blog/matrix_facto_4 import numpy as np import surprise # run 'pip install sci ...

  7. Matrix Factorization SVD 矩阵分解

    Today we have learned the Matrix Factorization, and I want to record my study notes. Some kownledge ...

  8. scikit learn 模块 调参 pipeline+girdsearch 数据举例:文档分类 (python代码)

    scikit learn 模块 调参 pipeline+girdsearch 数据举例:文档分类数据集 fetch_20newsgroups #-*- coding: UTF-8 -*- import ...

  9. (原创)(四)机器学习笔记之Scikit Learn的Logistic回归初探

    目录 5.3 使用LogisticRegressionCV进行正则化的 Logistic Regression 参数调优 一.Scikit Learn中有关logistics回归函数的介绍 1. 交叉 ...

随机推荐

  1. C++ 由虚基类 虚继承 虚函数 到 虚函数表

    //虚基类:一个类可以在一个类族中既被用作虚基类,也被用作非虚基类. class Base1{ public: Base1(){cout<<"Construct Base1!&q ...

  2. HashMap中capacity、loadFactor、threshold、size等概念的解释

    约定 约定前面的数组结构的每一个格格称为桶 约定桶后面存放的每一个数据称为bin bin这个术语来自于JDK 1.8的HashMap注释. size size表示HashMap中存放KV的数量(为链表 ...

  3. privot函数使用

    语法: table_source PIVOT( 聚合函数(value_column) FOR pivot_column IN(<column_list>) ) 将列转化为行 写个小示例 : ...

  4. 配置Android的NDK开发环境(eclipse)

    ndk下载地址: http://blog.csdn.net/zhanghuoding/article/details/51345256 在eclipse设置ndk位置 右键你的工程,android t ...

  5. centos安装指定mysql

    mysql下载地址:http://repo.mysql.com/ nginx下载地址 我下载是这个 http://nginx.org/packages/centos/7/noarch/RPMS/ngi ...

  6. linu下nginx的安装

    这里用到的环境是nginx-1.8.0,linux用的是CentOS-7-x86_64-DVD-1804.iso版本 1   什么是nginx Nginx ("engine x") ...

  7. pandas.DataFrame.quantile

    pandas.DataFrame.quantile 用于返回数据中的 处于1/5    1/2(中位数)等数据

  8. sysbench_fileio.sh

    当我--file-total-size=30G 并且指定3个文件的时候,结果是产生3个10G的文件,然而--max-time=20被忽视了,虽然指定了20s的限制,实际上是在prepare阶段,--m ...

  9. ZOJ 3180 Number Game(模拟,倒推)

    题目 思路: 先倒推!到最后第二步,然后: 初始状态不一定满足这个状态.所以我们要先从初始状态构造出它出发的三种状态.那这三种状态跟倒推得到的状态比较即可. #include<stdio.h&g ...

  10. Fang Fang HDU - 5455 (思维题)

    Fang Fang says she wants to be remembered. I promise her. We define the sequence FF of strings. F0 = ...