Skip to content

xinchoubiology/SNFtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Similarity Network Fusion method By Python --- nmeth

Example


import SDFtools

K = 20

alpha = 0.5

t = 20

SNFmodel = SNFtools.OriginData(K, alpha, t)

SNFmodel.set_network('Data1.dat', 'Data2.dat')

import SNFtools.affinityMatrix as affinityMatrix

dist2_dat = affinityMatrix.euclidDist(SNFmodel.origin_dat) # calculate out sample-sample distance

Walls = [ affinityMatrix.affinityMatrix(Diff, SNFmodel) for Diff in dist2_dat ]

import SNFtools.matrixOperate as matrixOperate

import SNFtools.displayClusters as dispCluster

import SNFtools.SNF as SNF

P = SNF.SNF(Walls, SNFmodel)

disp_W, index, cluster, eigDiscrete = dispCluster.displayClusters(P, 2, 2)

imshow(P)


#Install

python setup.py build

python setup.py install

About

Similarity networks fusion package on python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages