Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There maybe something wrong? #8

Open
tb1over opened this issue Apr 17, 2023 · 2 comments
Open

There maybe something wrong? #8

tb1over opened this issue Apr 17, 2023 · 2 comments

Comments

@tb1over
Copy link

tb1over commented Apr 17, 2023

The element of Mk[i_] greater than elemet of Is elment ?

@ZigaSajovic
Copy link
Owner

Please provide a minimal reproducible example, so I can make sense of your issue.

@tb1over
Copy link
Author

tb1over commented Apr 17, 2023

Thank you for your reply, i uploaded the dataset here.
The usage code like this:

`
import os
import os.path as osp
import pandas as pd
from sklearn.cluster import KMeans

import warnings
warnings.filterwarnings('ignore')

from concensusClustering import *

current_path = osp.dirname(os.getcwd())
dataset = 'dataset/breast/TCGA-BRCA.mirna.flt.tsv.gz'

def main():
mirna = pd.read_csv(osp.join(current_path, dataset), sep='\t', header=0, index_col=0).T
print(mirna.shape)

consensusCluster = ConsensusCluster(KMeans, 3, 10, 50, resample_proportion=0.8)
consensusCluster.fit(mirna.values, verbose=True)
consensus_res = consensusCluster.predict()

res = consensusCluster.predict_data(mirna.values)
print(res)

if name == 'main':
main()
`

i set some breakpoints the observe the Mk[i_] and Is matrix, print the fist 5 elemet of two matrix.
Mk[i_,0:5,0:5] array([[ 0., 1., 2., 21., 0.], [ 1., 0., 15., 0., 0.], [ 1., 22., 0., 0., 0.], [15., 0., 0., 0., 1.], [ 0., 0., 0., 0., 0.]])
Mk[i_, 0, 3] is 21, the Is[0, 3] is 20

Is[0:5,0:5] array([[ 0., 18., 15., 20., 15.], [20., 0., 15., 13., 15.], [22., 22., 0., 20., 15.], [18., 25., 15., 0., 19.], [18., 19., 18., 16., 0.]])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants