Update src/DetectLM.py
Browse files- 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()
|
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]
|
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)
|