Comments (3)
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.
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.
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)
- TypeError: 'int' object is not iterable in ZscoreSustain HOT 8
- multiple sclerosis HOT 3
- Fixing controls in GMM HOT 2
- `use_parallel_startpoints` fails on numpy 1.21 HOT 6
- Fix for "rare" divide by zero problem HOT 6
- Idea: SusStaIn constraint with longitudinal measures HOT 6
- Adding a colourbar to PVD plots HOT 6
- IndexError while running the SuStaIn Workshop file HOT 2
- Data Preparation Pipeline/Code HOT 5
- How to interpret the Positional Variance Diagram HOT 1
- Question on Using pySuStaIn on ADNI HOT 3
- Parallel CV doesn't work (aka "Why do all my CV jobs run for fold 0 only???") HOT 1
- Ordinal Sustain Notebook HOT 3
- Mislabelled subtype numbers in PVDs HOT 9
- Parallelization fails -- TypeError: cannot pickle '_abc._abc_data' object HOT 4
- Allow for complete model reloading HOT 2
- minor installation issue with sklearn HOT 1
- [Question] Can we discover subtypes in a training test, and use the discovered subtypes to subtype subjects of a test set? HOT 1
- ValueError in AbstractSuStaIn HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysustain.