Comments (5)
I got the same error.
These are versions of my models.
mofapy2 = v0.7.0
pandas = 1.5.3
numpy = 1.26.0
from mofapy2.
When I downgraded mofapy2 to 0.6.7, I got different error message below:
IndexError Traceback (most recent call last)
Cell In[76], line 1
----> 1 mu.tl.mofa(mdata, n_factors=20, gpu_mode=True)
File ~/mambaforge/envs/multiome/lib/python3.9/site-packages/muon/_core/tools.py:642, in mofa(data, groups_label, use_raw, use_layer, use_var, use_obs, likelihoods, n_factors, scale_views, scale_groups, center_groups, ard_weights, ard_factors, spikeslab_weights, spikeslab_factors, n_iterations, convergence_mode, use_float32, gpu_mode, gpu_device, svi_mode, svi_batch_size, svi_learning_rate, svi_forgetting_rate, svi_start_stochastic, smooth_covariate, smooth_warping, smooth_kwargs, save_parameters, save_data, save_metadata, seed, outfile, expectations, save_interrupted, verbose, quiet, copy)
639 if use_var:
640 # Set the weights of features that were not used to zero
641 data.varm["LFs"] = np.zeros(shape=(data.n_vars, w.shape[1]))
--> 642 data.varm["LFs"][data.var[use_var]] = w
643 else:
644 data.varm["LFs"] = w
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
mofapy2 : v0.6.7
numpy : v1.22.4
pandas : v1.5.3
from mofapy2.
I was able to run through the entire Jupyter notebook named getting_started_python.ipynb
, which could be downloaded from the mofapy2 GitHub without any errors. However, the error was triggered by another Jupyter notebook and a sample data file downloaded from the muon-tutorials."
But the Mu data has a new embedding X_mofa
.
And the iteration stopped at 13 with the message 'Converged!'. While I believe this number of iterations is too low, can I still use the X_mofa in mdata for downstream analysis in this situation?
from mofapy2.
just tried using the data.frame option following the mofapy2, it worked fine so there should be something wrong wit the MOUN mu.tl.mofa
wrapper. @jjuhyunkim maybe we could open another issue under the moun github page
from mofapy2.
Yes, you are right,
I was able to resolve the error by executing the following line of code before running MOFA to integrate my data
mdata.var['highly_variable']=mdata.var['highly_variable'].to_list()
Thank you for your comments
from mofapy2.
Related Issues (14)
- Model with one latent factor less than specified HOT 2
- Prediction on held-out data HOT 3
- MEFISTO with Poisson likelihood- numerical problems
- Change default GPU device HOT 1
- AnnData version 0.9
- Faulty construction of ThetaZ node HOT 5
- Memory skyrockets
- Crash depending on normalization
- `AttributeError: Module 'scipy' has no attribute 'shape'` HOT 8
- How to load the saved model after running the "mu.tl.mofa"?
- AttributeError: 'BayesNet' object has no attribute 'train_stats'
- Module 'scipy' has no attribute 'where'
- Model fails to train with nongaussian likelihood
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 mofapy2.