Skip to content

Conversation

@m-miedema
Copy link

As an example relevant to #43, this is a very simple implementation that would give access to silhouette scores. I think this is more informative than simply returning the mean silhouette score, although it would probably be helpful to give a simple plotting example in a demo notebook.

m-miedema added 8 commits July 4, 2025 10:18
I added a new function (nifti2arraywmask) that allows the use of the 3-D mask file to extract BOLD signals. I also modified the main data loader function (nifti2timeseries) to support its use - at least for single subject/single session data :)
This reverts commit f8cdbd9, reversing
changes made to c58fbba.
@m-miedema
Copy link
Author

I'm a bit tangled in the weeds of previous commits upstream here - let's discuss and then I can rebase this PR appropriately :)

@mtorabi59
Copy link
Collaborator

Hi @m-miedema , thank you so much for implementing this! I think overall this can be useful for PydFC.
Maybe we could discuss about the way it is implemented. For something similar to the current version, maybe it could've been easier if the user was calculating the silhouette score outside CAP and without having it inside CAP implementation, for instance:

measure = CAP(**params_methods)
measure.estimate_FCS(time_series=BOLD_multi)
silhouette_score = silhouette_samples(time_series.data.T.astype(np.float32), measure.Z)

Unless we want to implement a function or method of CAP class that searches for best number of states on its own.
What do you think?

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

Successfully merging this pull request may close these issues.

2 participants