idkash1 commited on
Commit
73bcc92
·
verified ·
1 Parent(s): f781451

Update src/DetectLM.py

Browse files
Files changed (1) hide show
  1. src/DetectLM.py +2 -3
src/DetectLM.py CHANGED
@@ -206,7 +206,7 @@ class DetectLM(object):
206
  if dashboard:
207
  mt.hc_dashboard(gamma=self.gamma)
208
 
209
- dc = dict(sentences=df, HC=hc, fisher=fisher[0], fisher_pvalue=fisher[1], minP=mt.minp(), bonf=mt.bonfferoni())
210
  return dc
211
 
212
  def from_responses(self, responses: list, lengths: list, dashboard=False) -> dict:
@@ -235,11 +235,10 @@ class DetectLM(object):
235
  else:
236
  hc, hct = mt.hc(gamma=self.gamma)
237
  fisher = mt.fisher()
238
- bonferroni = mt.bonfferoni()
239
  df['mask'] = df['pvalue'] <= hct
240
  if dashboard:
241
  mt.hc_dashboard(gamma=self.gamma)
242
- return dict(sentences=df, HC=hc, fisher=fisher[0], fisher_pvalue=fisher[1], bonf=bonferroni)
243
 
244
  def __call__(self, lo_chunks: list, lo_contexts: list, dashboard=False) -> dict:
245
  return self.test_chunked_doc(lo_chunks, lo_contexts, dashboard=dashboard)
 
206
  if dashboard:
207
  mt.hc_dashboard(gamma=self.gamma)
208
 
209
+ dc = dict(sentences=df, HC=hc, fisher=fisher[0], fisher_pvalue=fisher[1], minP=mt.minp())
210
  return dc
211
 
212
  def from_responses(self, responses: list, lengths: list, dashboard=False) -> dict:
 
235
  else:
236
  hc, hct = mt.hc(gamma=self.gamma)
237
  fisher = mt.fisher()
 
238
  df['mask'] = df['pvalue'] <= hct
239
  if dashboard:
240
  mt.hc_dashboard(gamma=self.gamma)
241
+ return dict(sentences=df, HC=hc, fisher=fisher[0], fisher_pvalue=fisher[1])
242
 
243
  def __call__(self, lo_chunks: list, lo_contexts: list, dashboard=False) -> dict:
244
  return self.test_chunked_doc(lo_chunks, lo_contexts, dashboard=dashboard)