Skip to content

Commit

Permalink
Respond to probcomp#81.
Browse files Browse the repository at this point in the history
  • Loading branch information
F Saad committed Oct 24, 2015
1 parent 8b9b7dd commit 4545e29
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/metamodels/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class implementing `IBayesDBForeignPreidctor` as @classmethods. For
assert hasattr(builder, 'deserialize')
assert hasattr(builder, 'name')
# Check for duplicates.
if builder.name() in self.predictor_builder:
if casefold(builder.name()) in self.predictor_builder:
raise ValueError('A foreign predictor with name "{}" has already '
'been registered. Currently registered: {}'.format(
builder.name(), self.predictor_builder))
Expand Down Expand Up @@ -212,7 +212,6 @@ def create_generator(self, bdb, table, schema, instantiate):
# this generator name, with a _cc suffix.
SUFFIX = '_cc'
cc_name = bayeslite.core.bayesdb_generator_name(bdb, genid) + SUFFIX
# cc_name = 'satcc'
# Create strings for crosscat schema.
cc_cols = ','.join(['{} {}'.format(c, columns[c]) for c in lcols])
cc_dep = []
Expand Down Expand Up @@ -511,7 +510,7 @@ def _joint_logpdf(self, bdb, genid, modelno, Q, Y, n_samples=None):
ignore.add(cq)
else:
return -float('inf')
Q = [q for q in Q if q not in ignore]
Q = [c for c,_ in Q if c not in ignore]
# (Q,Y) marginal joint density.
_, QY_weights = self._weighted_sample(bdb, genid, modelno, Q+Y,
n_samples=n_samples)
Expand Down

0 comments on commit 4545e29

Please sign in to comment.