一个基于因子模型的Python数据融合模块。
项目描述
scikit-fusion是一个基于最近集体潜在因子模型的Python数据融合模块。
依赖关系
scikit-fusion在Python 3下进行了测试,可以工作。
构建软件所需的相关依赖项是Numpy >= 1.7,SciPy >= 0.12,PyGraphviz >= 1.3(仅用于绘制数据融合图)和Joblib >= 0.8.4。
安装
此软件包使用distutils,这是安装Python模块的默认方式。要在您的家目录中安装,请使用
python setup.py install --user
在Unix/Linux上为所有用户安装
python setup.py build sudo python setup.py install
开发模式使用
python setup.py develop
用法
让我们生成三个描述不同对象类型的随机数据矩阵
>>> import numpy as np >>> R12 = np.random.rand(50, 100) >>> R13 = np.random.rand(50, 40) >>> R23 = np.random.rand(100, 40)
接下来,我们定义我们的数据融合图
>>> from skfusion import fusion >>> t1 = fusion.ObjectType('Type 1', 10) >>> t2 = fusion.ObjectType('Type 2', 20) >>> t3 = fusion.ObjectType('Type 3', 30) >>> relations = [fusion.Relation(R12, t1, t2), fusion.Relation(R13, t1, t3), fusion.Relation(R23, t2, t3)] >>> fusion_graph = fusion.FusionGraph() >>> fusion_graph.add_relations_from(relations)
然后共同推断潜在数据模型
>>> fuser = fusion.Dfmf() >>> fuser.fuse(fusion_graph) >>> print(fuser.factor(t1).shape) (50, 10)
之后,可能会有新数据到达
>>> new_R12 = np.random.rand(10, 100) >>> new_R13 = np.random.rand(10, 40)
为此,我们定义融合图
>>> new_relations = [fusion.Relation(new_R12, t1, t2), fusion.Relation(new_R13, t1, t3)] >>> new_graph = fusion.FusionGraph(new_relations)
然后将新对象转换为由fuser引起的潜在空间
>>> transformer = fusion.DfmfTransform() >>> transformer.transform(t1, new_graph, fuser) >>> print(transformer.factor(t1).shape) (10, 10)
scikit-fusion附带了一些工作数据融合场景
>>> from skfusion import datasets >>> dicty = datasets.load_dicty() >>> print(dicty) FusionGraph(Object types: 3, Relations: 3) >>> print(dicty.object_types) {ObjectType(GO term), ObjectType(Experimental condition), ObjectType(Gene)} >>> print(dicty.relations) {Relation(ObjectType(Gene), ObjectType(GO term)), Relation(ObjectType(Gene), ObjectType(Gene)), Relation(ObjectType(Gene), ObjectType(Experimental condition))}
相关链接
HTML文档:待定
通过矩阵分解进行数据融合:http://dx.doi.org/10.1109/TPAMI.2014.2343973
通过融合系统级分子数据发现疾病-疾病关联:http://www.nature.com/srep/2013/131115/srep03202/full/srep03202.html
基于矩阵分解的数据融合用于啤酒酵母和粘菌中的基因功能预测:http://www.worldscientific.com/doi/pdf/10.1142/9789814583220_0038
基于矩阵分解的数据融合用于预测药物诱导的肝损伤:http://www.tandfonline.com/doi/abs/10.4161/sysb.29072
通过数据融合进行生存回归:http://www.tandfonline.com/doi/abs/10.1080/21628130.2015.1016702
项目详情
scikit-fusion-0.2.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a1cafbc6d76c5beee35cb7614d27adb7dc5b2876fac85389c310185e8cd384d0 |
|
MD5 | d91236a5fe74cc32c5979b7e2b2646f2 |
|
BLAKE2b-256 | f263479e402be5a7bea25cfc15581604aed650f920922e10a98ca5a2c352b00d |