ivnban27-ctl commited on
Commit
2a2eeff
·
verified ·
1 Parent(s): e8b4193

fix on only 1 message phase empty context

Browse files
models/ta_models/ta_filter_utils.py CHANGED
@@ -90,7 +90,7 @@ def get_phases_islands_minmax(
90
  # If there is more than one island we want to make sure to root out comparable small islands
91
  # I.e. if there is an island with 10 messages, and island of 1 messages is not useful in that context.
92
  max_len = np.max([len(x) for x in islands])
93
- len_cut = 3 if max_len > 9 else 2 if max_len > 3 else 1
94
  islands = [x for x in islands if len(x) > len_cut]
95
 
96
  islands = [reset.iloc[x] for x in islands]
 
90
  # If there is more than one island we want to make sure to root out comparable small islands
91
  # I.e. if there is an island with 10 messages, and island of 1 messages is not useful in that context.
92
  max_len = np.max([len(x) for x in islands])
93
+ len_cut = 3 if max_len > 9 else 2 if max_len > 3 else 1 if max_len > 1 else 0
94
  islands = [x for x in islands if len(x) > len_cut]
95
 
96
  islands = [reset.iloc[x] for x in islands]