Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
cfs-data committed Dec 7, 2023
1 parent 64f1322 commit 8a2134e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions telcell/models/simplemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from telcell.data.models import Track
from telcell.models import Model
from telcell.utils.transform import get_switches, select_colocated_pairs, generate_all_pairs, \
from telcell.utils.transform import get_switches, get_colocation_switches, generate_all_pairs, \
sort_pairs_based_on_rarest_location


Expand All @@ -23,7 +23,7 @@ class MeasurementPairClassifier(Model):

def __init__(self, colocated_training_data: List[Track]):
self.training_data = colocated_training_data
self.colocated_training_pairs = select_colocated_pairs(self.training_data)
self.colocated_training_pairs = get_colocation_switches(self.training_data)

def predict_lr(self, track_a: Track, track_b: Track, **kwargs) -> Tuple[float, Optional[Mapping]]:
pairs = get_switches(track_a, track_b)
Expand Down
4 changes: 2 additions & 2 deletions telcell/utils/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def sort_key(element):
return sorted_pairs


def select_colocated_pairs(tracks: List[Track],
max_delay: timedelta = timedelta(seconds=120)) \
def get_colocation_switches(tracks: List[Track],
max_delay: timedelta = timedelta(seconds=120)) \
-> List[MeasurementPair]:
"""
For a list of tracks, find pairs of measurements that are colocated, i.e.
Expand Down

0 comments on commit 8a2134e

Please sign in to comment.