Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Comments and variable names fixed
  • Loading branch information
humbleOldSage committed Sep 14, 2023
1 parent 1c0526b commit 21305df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions emission/tests/modellingTests/TestGreedySimilarityBinning.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def testBinning(self):
model = eamtg.GreedySimilarityBinning(model_config)
model.fit(trips)
#check each bins for no of trips
at_least_one_large_bin = any(map(lambda b: len(b['feature_rows']) == m, model.bins.values()))
one_large_bin = any(map(lambda b: len(b['feature_rows']) == m, model.bins.values()))
#Since 5 trips were sampled within the threshold, there should be one bin with 5 trips
self.assertTrue(at_least_one_large_bin, "at least one bin should have at least 5 features in it")
self.assertTrue(one_large_bin, "one bin should have 5 features in it")

def testPrediction(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion emission/tests/modellingTests/modellingTestAssets.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def generate_nearby_random_points(ref_coords,threshold):
theta=random.uniform(0,2*math.pi)
dx = radius * math.cos(theta)
dy = radius * math.sin (theta)
#This basically gives a way to sample a point from within a square of length thresholdInWGS84
#This basically gives a way to sample a point from within a circle of radius thresholdInWGS84/2
# around the ref. point.
return [ref_coords[0] + dy , ref_coords[1] + dx]

Expand Down

0 comments on commit 21305df

Please sign in to comment.