Comments (4)
Thanks for your interest in Cell BLAST and the detailed explanation!
Given the above information, I can think of two potential fixes:
-
One possibility is that the model has not fully converged. You may try increasing epoch number to larger values like 200 or 500. The model will trigger early stop if loss has converged.
-
In Cell BLAST we have a single tunable hyperparameter (denoted as lambda_b in the manuscript) that controls the strength of adversarial batch alignment. Larger values enforce stronger alignment, but also increase the risk of over-alignment. By default, we use lambda_b=0.01, which empirically produces good result in most cases.
In this case, it seems that lambda_b=0.01 is insufficient for aligning datasets this diverse. My recommendation is to try increasing this hyperparameter to values like 0.1 or 1.0. That should produce better dataset mixing.
The hyperparameter can be set like this:
model = cb.directi.fit_DIRECTi(combined_dataset,
genes = var_genes_study,
latent_dim=10, cat_dim=20,
epoch=200, rmbatch_module_kwargs={"lambda_reg": 0.1}, # <- Changed here
batch_effect = ["study","species"],
path = model_dir
)
from cell_blast.
Hi @Jeff1995 , thanks so much for the quick reply! These are all very helpful tips.
I tried setting lambda_reg
to 0.1 and 1 as you suggested, but oddly this seems to have no effect on the results. I don't have a screenshot, but I think these plots are also identical to when I don't specify lambda_reg
at all.
I even named the models differently and set reuse=False
so that I wasn't accidentally plotting old results.
lambda_reg=0.1
lambda_reg=1
Do you have an idea what might be happening here?
Thanks,
Brian
from cell_blast.
Well, that's weird... I have never seen anything like that. Maybe it's something in this data that triggered a bug in the model. Would you mind if you share the dataset you're using so I can have a closer look?
from cell_blast.
Hi @Jeff1995 , sorry for the delay, had some issues finding a way to get my data shareable.
I think this should work now, but let me know if you have any issues.
https://drive.google.com/file/d/1hXXnpXiRp7evl727V3onkx0WmThGFFkx/view?usp=sharing
Thanks again,
Brian
from cell_blast.
Related Issues (20)
- The website certificate of your Cell-Blast tutorial document has expired HOT 1
- Web ERROR while uploading loom/h5ad: 'dict' object has no attribute 'dtype' HOT 3
- reconcile_models() problems HOT 14
- how to read the dataset file HOT 2
- Error in "wasserstein_distance" function HOT 9
- How to use gpu to accelerate train? HOT 3
- KeyError: "Unable to open object (object 'obs' doesn't exist)" HOT 1
- how to use HOT 5
- how to build my own references HOT 1
- The demo dataset to re-run the example HOT 3
- KeyError: "Unable to open object (object 'obs' doesn't exist)"
- blast.save() TypeError: Object of type 'bytes' is not JSON serializable
- The tensorflow showing error with no session attribute HOT 6
- The function of find_variable_genes is lost HOT 2
- Possible wasserstein_distance solution HOT 1
- Tensorflow version 2.0.0 question HOT 1
- snakemake question help HOT 5
- snakemake CPU question HOT 2
- decoder HOT 4
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 cell_blast.