GithubHelp home page GithubHelp logo

Evaluate joint density about crosscat HOT 6 CLOSED

probcomp avatar probcomp commented on August 29, 2024
Evaluate joint density

from crosscat.

Comments (6)

vkmvkmvkmvkm avatar vkmvkmvkmvkm commented on August 29, 2024

Those tests are probably buggy and should be updated.

On Sat, Oct 10, 2015 at 9:44 PM, F Saad [email protected] wrote:

We need to expose density in the interface. My first idea was to change
simple_predictive_probability which takes a list of disjoint univariate
queries and interpret the input instead as joint. However it appears there
are several tests that invoke simple_predictive_probability which such a
change might break.

The second best option is to create joint_predictive_probability function
in the interface (and invoke this one through bayeslite).


Reply to this email directly or view it on GitHub
#62.

from crosscat.

axch avatar axch commented on August 29, 2024

Just looked at simple_predictive_probability in crosscat version 0.1.35. A few facts appear to hold, which are jointly rather confusing:

  • As @fsaad noted, the interface to simple_predictive_probability itself maps over the query argument.
  • I can't see any performance advantage to mapping over the query argument: all the work is inside the loop anyway, and nothing is cached except by the global cache on create_cluster_model_from_X_L that I introduced recently.
  • simple_predictive_probability_multistate, which is what Bayeslite's crosscat metamodel calls, relies on the answer being a scalar (specifically, a numpy array of size 1, which can be converted to a floating point scalar by float -- unlike numpy arrays of other sizes).

In light of this, and @vkmvkmvkmvkm 's comment above, I suggest redefining simple_predictive_probability to return the joint probability of all the query cells (as a number, not a numpy array) and adjusting the tests to assume that (most of them seem to be crash-only tests anyway?)

I also explicitly suggest dropping the automatic mapping idea from this interface: if the client wants multiple independent queries, let them call the function many times.

from crosscat.

riastradh-probcomp avatar riastradh-probcomp commented on August 29, 2024

@fsaad, have you confirmed that any tests actually break by doing this?

Preference for renaming it joint_predictive_probability; that will help catch and force review of old users too.

from crosscat.

fsaad avatar fsaad commented on August 29, 2024

@riastradh-probcomp for tests that rely on the function in its current form, please see

https://github.com/probcomp/crosscat/blob/master/crosscat/tests/test_pred_prob_and_density.py#L118-L124

https://github.com/probcomp/crosscat/blob/master/crosscat/tests/quality_tests/test_component_model_quality.py#L131

https://github.com/probcomp/crosscat/blob/master/crosscat/tests/quality_test_utils.py#L160-L164

https://github.com/probcomp/crosscat/blob/master/crosscat/cython_code/test_pred_prob_and_density.py#L82-L88

from crosscat.

axch avatar axch commented on August 29, 2024

Decision reached in conversation: simultaneously with changing the semantics, rename to predictive_probability.

from crosscat.

axch avatar axch commented on August 29, 2024

Fixed by 373b884 .

from crosscat.

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.