Git Product home page Git Product logo

Comments (4)

canergen avatar canergen commented on July 18, 2024

Hi, thank you for reporting it. First question: I assume correctly that you don’t get incorrect values but you get a ValueError as you have a shape mismatch. This is happening during construction of the pandas.DataFrame. Can you copy the exact error message? It should happen for raw_normalized_mean but also the two other means in the function (or are your size factors zero?)

from scvi-tools.

raozuming avatar raozuming commented on July 18, 2024

RuntimeWarning: divide by zero encountered in divide
scaling_factor = 1 / np.asarray(data.sum(axis=1)).ravel().reshape(-1, 1)

I think np.divide(np.asarray(data.sum(axis=1)).ravel().reshape(-1, 1), 1) should be used to replace 1 / np.asarray(data.sum(axis=1 )).ravel().reshape(-1, 1) to avoid this error

from scvi-tools.

canergen avatar canergen commented on July 18, 2024

This means that your data contains cells without any count. Is it meaningful for your model to input cells without counts (I assume it’s due to your highly variable gene selection)? I would highly recommend to filter to min_counts before training the model as otherwise training might be unstable.
@martinkim0 We could add a check and print a warning when setting up a model if cells contain less than let’s say 30 counts.

from scvi-tools.

raozuming avatar raozuming commented on July 18, 2024

Thanks

from scvi-tools.

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.