Skip to content

Error using the VFC algorithm for clustering analysis #55

@GabrielBaldissera

Description

@GabrielBaldissera

Hello!

I am trying to use the VFC to obtain clusters. I tried to adapt from the Jupyter notebook but I think I am missing something as I am getting an error.

My code:

G = gt.Graph(mir128_28H, knn=int(top_result['knn']), use_pygsp=True) #Obtain graph with best parameter
G.compute_fourier_basis()
VFC = meld.VertexFrequencyCluster(n_clusters=8, random_state=0)
VFC.fit_transform(G, sample_indicator=mir128_28H.obs['condition'], likelihood=mir128_28H.obs["MT_likelihood"])
VFC_clusters = VFC.predict(n_clusters=8)

My first error is for the VFC object I created:

AttributeError: 'VertexFrequencyCluster' object has no attribute 'random_state'

The second is for the VFC fit transform which I understand could be related to the sample IDs:

TypeError: unsupported operand type(s) for /: 'str' and 'int'

Any suggestions on how to do this?

Thank you for your help!

Best,

Gabriel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions