Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: appengine/findit/crash/loglinear/test/model_test.py

Issue 2595263003: [Predator] Making the Y sets conditional for loglinear models (Closed)
Patch Set: minor clarification in crash/suspect.py Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/crash/loglinear/test/model_test.py
diff --git a/appengine/findit/crash/loglinear/test/model_test.py b/appengine/findit/crash/loglinear/test/model_test.py
index e80031c26ed449376fbdac8237b4282eb87e985b..17d8e6e4b85a3b0a2cf9bb9e235042f119b6f750 100644
--- a/appengine/findit/crash/loglinear/test/model_test.py
+++ b/appengine/findit/crash/loglinear/test/model_test.py
@@ -15,7 +15,7 @@ class LoglinearTest(LoglinearTestCase):
def testToFeatureFunction(self):
"""Test that ``ToFeatureFunction`` obeys the equality its docstring says."""
for x in self._X:
- for y in self._Y:
+ for y in self._Y(x):
for i in xrange(self._qty_features):
self.assertEqual(self._feature_list[i](x)(y),
self._feature_function(x)(y)[i])
@@ -43,7 +43,7 @@ class LoglinearTest(LoglinearTestCase):
for x in self._X:
self.assertEqual(math.exp(model.LogZ(x)), model.Z(x))
model.Expectation(x, lambda y: np.array([1.0]))
- for y in self._Y:
+ for y in self._Y(x):
model.Features(x)(y)
model.Score(x)(y)
self.assertEqual(
« no previous file with comments | « appengine/findit/crash/loglinear/test/loglinear_testcase.py ('k') | appengine/findit/crash/loglinear/training.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698