GithubHelp home page GithubHelp logo

Comments (3)

noxtoby avatar noxtoby commented on July 18, 2024 1

I don't know how you modify your code to produce a control sample from the same data. Putting that aside...

A singular matrix error often implies that the mixture modelling is labelling everyone (cases and controls) to be in one component (pre-event/post-event, a.k.a., normal/abnormal).

This can happen when your cases and controls histograms overlap too much for any feature. Such a feature doesn't have useful "disease signal" and should probably be excluded from your feature set (and shouldn't be called a biomarker).

Another possibility is that you have input an incorrect "disease direction" while also "fixing" controls to not swap labels, i.e., to stay as pre-event/normal.

from pysustain.

noxtoby avatar noxtoby commented on July 18, 2024

Sorry, but you do need controls to fit a KDE mixture model. This then generates the event likelihoods that are input to the clustering part of SuStaIn.

If you want to run SuStaIn in the absence of controls, you’ll need to create a bespoke model for these event likelihoods.

Good luck.

from pysustain.

aratzan avatar aratzan commented on July 18, 2024

Thanks so much for your helpful response, this makes sense. My team has modified our code to now have a control sample and patient sample. We have been able to run the code up until generating an instance of the SuStaIn model and have actually been able to create an instance with mixture_GMM. However, we are still receiving the below error for the mixture_KDE version, which is more suited to our data.

LinAlgError                               Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_21144\1720235003.py in <module>
----> 1 main(hc_data, patient_data, sustainType)

~\AppData\Local\Temp\ipykernel_21144\1919658236.py in main(hc_data, patient_data, sustain_Type)
    116             mixtures = fit_all_gmm_models(full_data, full_data_labels)
    117         elif sustainType == "mixture_KDE":
--> 118             mixtures = fit_all_kde_models(full_data, full_data_labels)
    119 
    120         print(mixtures)
...
...
LinAlgError: Singular matrix

I'd be happy to provide the full error if that would be helpful. Please advise on how to progress.

Thanks

from pysustain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.