非负矩阵分解

bignmf的Python项目详细描述


bignmf

Build StatusRead the DocsPyPI versionLicense: MIT

big nmf(大数据nmf)是一个python 3包,用于使用nmf算法进行分析。

NMF简介

NMF(非负矩阵分解)将非负输入矩阵分解为非负因子。该算法具有固有的聚类特性,在生物数据分析等领域得到了广泛的关注。

brunet et al在他们的paper中证明了nmf在聚类leukemia dataset方面比标准的聚类算法(如层次聚类和自组织映射)具有优越的能力。

可用算法

以下是当前可用的算法。如果你想知道更多关于算法的信息,下面的链接会指向他们的原始文件。

安装

这个包在pypi存储库中可用。因此,您可以通过运行以下命令进行安装。

pip3 install bignmf

用法

下面的例子说明了算法的典型用法。

一。单个nmf

frombignmf.datasets.datasetsimportDatasetsfrombignmf.models.snmf.standardimportStandardNmfDatasets.list_all()data=Datasets.read("SimulatedX1")k=3iter=100trials=50model=StandardNmf(data,k)# Runs the modelmodel.run(trials,iter,verbose=0)print(model.error)# Clusters the datamodel.cluster_data()print(model.h_cluster)#Calculates the consensus matricesmodel.calc_consensus_matrices()print(model.consensus_matrix_w)

2.关节nmf

frombignmf.models.jnmf.integrativeimportIntegrativeJnmffrombignmf.datasets.datasetsimportDatasetsDatasets.list_all()data_dict={}data_dict["sim1"]=Datasets.read("SimulatedX1")data_dict["sim2"]=Datasets.read("SimulatedX2")k=3iter=100trials=50lamb=0.1model=IntegrativeJnmf(data_dict,k,lamb)# Runs the modelmodel.run(trials,iter,verbose=0)print(model.error)# Clusters the datamodel.cluster_data()print(model.h_cluster)#Calculates the consensus matricesmodel.calc_consensus_matrices()print(model.consensus_matrix_w)

Here是详细信息的扩展文档。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
swing Java按钮/网格布局   java列出Google日历中的所有事件   java无效:单击API publisher test按钮后连接到后端时出错   带有内部赋值的java While循环导致checkstyle错误   java为什么trimToSize/ensureCapacity方法提供“公共”级访问?   文件输出流的java问题   ListIterator和并发修改异常的java问题   java如何使用两个URL映射   无法识别使用“./../”构造的字符串java相对路径,为什么?   首次写入remotelyclosedsocket不会触发异常,对吗?JAVA   java OneDrive REST API为文件上载提供了400个无效谓词   Java泛型、集合接口和对象类的问题   OpenSSL Java安全提供程序   jmeter java运行jmx禁用操作