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

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

Issue 2625073003: [Predator] Add MetaWeight and MetaFeatureValue to group multiple weights and features together. (Closed)
Patch Set: Rebase. Created 3 years, 11 months 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/training_test.py
diff --git a/appengine/findit/crash/loglinear/test/training_test.py b/appengine/findit/crash/loglinear/test/training_test.py
index f645b4cf581d251d9cf355f5ad9ddd9052a12423..12ee464d020fbb2279faceb36bc5a8ae659a7d94 100644
--- a/appengine/findit/crash/loglinear/test/training_test.py
+++ b/appengine/findit/crash/loglinear/test/training_test.py
@@ -16,7 +16,7 @@ class TrainableLogLinearModelTest(LoglinearTestCase):
# is just a test; if it doesn't work now, it'll never work.
training_data = [(x, x == 7) for x in self._X]
self._model = TrainableLogLinearModel(
- self._Y, training_data, self._feature_function, self._weights)
+ self._Y, training_data, self._meta_feature, self._meta_weight)
def testNpWeightsSetterNotAnNdarray(self):
def _NpWeightSettingExpression():
@@ -30,7 +30,7 @@ class TrainableLogLinearModelTest(LoglinearTestCase):
we want to check is actually a statement it can't be in a lambda
but rather must be in a def.
"""
- self._model.np_weights = 'this is not an np.ndarray'
+ self._model.np_weight = 'this is not an np.ndarray'
self.assertRaises(TypeError, _NpWeightSettingExpression)
@@ -39,7 +39,7 @@ class TrainableLogLinearModelTest(LoglinearTestCase):
def _WeightSettingExpression():
"""Wrap the ``self._model.weights = stuff`` expression."""
# This np.ndarray has the wrong shape.
- self._model.np_weights = np.array([[1,2], [3,4]])
+ self._model.np_weight = np.array([[1,2], [3,4]])
self.assertRaises(TypeError, _WeightSettingExpression)
« no previous file with comments | « appengine/findit/crash/loglinear/test/model_test.py ('k') | appengine/findit/crash/loglinear/test/weight_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698