@@ -270,7 +270,7 @@ def utils_to_probs(
270270 return probs
271271
272272
273- # todo : check state, add type annotations, check new-world tracing, etc.
273+ # TODO-EET : check state, add type annotations, check new-world tracing, etc.
274274def add_ev1_random (state : workflow .State , df : pd .DataFrame ):
275275 nest_utils_for_choice = df .copy ()
276276 nest_utils_for_choice += state .get_rn_generator ().gumbel_for_df (nest_utils_for_choice , n = df .shape [1 ])
@@ -289,7 +289,7 @@ def choose_from_tree(nest_utils, all_alternatives, logit_nest_groups, nest_alter
289289 raise ValueError ("This should never happen - no alternative found" )
290290
291291
292- # TODO [janzill Jun2022]: make everything in nested and here numpy from beginning to make choices consistent with
292+ # TODO-EET [janzill Jun2022]: make everything in nested and here numpy from beginning to make choices consistent with
293293# previous impl (want column index and not alternative name)
294294# Note: this is relatively slow due to the apply.
295295# It could *maybe* be sped up by using the fact that the nesting structure is the same for all rows: Add ev1(0,1) to
@@ -322,7 +322,7 @@ def make_choices_explicit_error_term_nl(state, nested_utilities, alt_order_array
322322def make_choices_explicit_error_term_mnl (state , utilities ):
323323 utilities_incl_unobs = add_ev1_random (state , utilities )
324324 choices = np .argmax (utilities_incl_unobs .to_numpy (), axis = 1 )
325- # TODO: reporting like for zero probs
325+ # TODO-EET : reporting like for zero probs
326326 assert not np .isnan (choices ).any (), "No choice for XXX - implement reporting"
327327 choices = pd .Series (choices , index = utilities_incl_unobs .index )
328328 return choices
@@ -337,7 +337,7 @@ def make_choices_explicit_error_term(state, utilities, alt_order_array, nest_spe
337337 return choices
338338
339339
340- # TODO: memory usage
340+ # TODO-EET : memory usage
341341def make_choices_utility_based (
342342 state : workflow .State ,
343343 utilities : pd .DataFrame ,
@@ -351,10 +351,10 @@ def make_choices_utility_based(
351351) -> tuple [pd .Series , pd .Series ]:
352352 trace_label = tracing .extend_trace_label (trace_label , 'make_choices_utility_based' )
353353
354- # TODO: index of choices for nested utilities is different than unnested - this needs to be consistent for
354+ # TODO-EET : index of choices for nested utilities is different than unnested - this needs to be consistent for
355355 # turning indexes into alternative names to keep code changes to minimum for now
356356 choices = make_choices_explicit_error_term (state , utilities , name_mapping , nest_spec , trace_label )
357- # TODO: rands - log all zeros for now
357+ # TODO-EET : rands - log all zeros for now
358358 rands = pd .Series (np .zeros_like (utilities .index .values ), index = utilities .index )
359359 return choices , rands
360360
@@ -663,7 +663,7 @@ def each_nest(nest_spec: dict | LogitNestSpec, type=None, post_order=False):
663663 yield nest
664664
665665
666- # TODO: do I need to implement this for LogitNestSpec?
666+ # TODO-EET : do I need to implement this for LogitNestSpec?
667667def count_nests (nest_spec ):
668668 """
669669 count the nests in nest_spec, return 0 if nest_spec is none
0 commit comments