GithubHelp home page GithubHelp logo

Comments (2)

fsaad avatar fsaad commented on August 29, 2024

Looking into this issue. Thoughts:

Adjusting the CRP probabilities

  • For ENSURE DEPENDENT: the CRP probabilities associated with each view should be based on the number of constrained "column cliques" in the view, and not the raw number of columns. One can formalize this choice by considering each column clique to e a single "multivariate" column, which receives a single table assignment in the CRP prior

  • or ENSURE INDEPENDENT: the CRP prior is not longer exchangeable, and bad things start to happen using the vanilla CRP probabilities, zeroing-out any tables with a customer that violates an independence constraint, and then making sure the table probabilities are normalized.

Consider the following example with three customer c1, c2, and c3 with the constraint ensure independent (c1,c2):

Scenario A: sample in the order (c1, c2, c3)

Pr[c1=1] = 1
sample -> [[c1 =1]]

Pr[c2=1 | c1] = 0 (by independence constraint)
Pr[c2=2 | c1] = 1 (probabilities are normalized)
sample --> [[c2=2]]

Pr[c3=1 | c1,c2] = 1/(2+a)
Pr[c3=2 | c1,c2] = 1/(2+a)
Pr[c3=3 | c1, c2] = a/(2+a)
sample --> [[c3=3]]

==> Implies that the probability all customers are on separate tables is a/(2+a).

Scenario B: sample in the order (c3, c1, c2)

Pr[c3=1] = 1
sample --> [[c3=1]]

Pr[c2=1 | c3] = 1/(1+a)
Pr[c2=2 | c3] = a/(1+a)
sample --> [[c2=2]]

Pr[c1=1 | c2, c3] \propto 1
Pr[c1=2 | c2, c3] = 0 (by independence constraint)
Pr[c1=3 | c2, c3] \propto a
sample --> [[c1=3]]

==> Implies the probability all customers on separate tables = a/(1+a) * a/(1+a)

Someone interested in modeling can develop a ``constrained CRP'' model which tries to formalize independence constraints, but for the time being (and due to the title of this ticket) it makes sense to worry about the ENSURE DEPENDENT case which has a straightforward resolution.

Patching the inference kernel for block proposals

The heavy lifting will happen in State.cpp.

double State::transition_feature_gibbs(int feature_idx,
const vector<double>& feature_data) {
double score_delta = 0;
View *p_singleton_view;
score_delta += remove_feature(feature_idx, feature_data, p_singleton_view);
View &singleton_view = *p_singleton_view;
score_delta += sample_insert_feature(feature_idx, feature_data, singleton_view);
return score_delta;
}

from crosscat.

fsaad avatar fsaad commented on August 29, 2024

Resolved by 3873eee

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.