Giter Site home page Giter Site logo

Interspecies integration about cell_blast HOT 4 OPEN

gao-lab avatar gao-lab commented on June 1, 2024
Interspecies integration

from cell_blast.

Comments (4)

Jeff1995 avatar Jeff1995 commented on June 1, 2024

Thanks for your interest in Cell BLAST and the detailed explanation!

Given the above information, I can think of two potential fixes:

  1. 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.

  2. 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.

bschilder avatar bschilder commented on June 1, 2024

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

Screenshot 2021-04-28 at 09 36 48

lambda_reg=1

Screenshot 2021-04-28 at 10 23 51

Do you have an idea what might be happening here?

Thanks,
Brian

from cell_blast.

Jeff1995 avatar Jeff1995 commented on June 1, 2024

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.

bschilder avatar bschilder commented on June 1, 2024

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)

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.