MCPcopy Create free account
hub / github.com/Hello-SimpleAI/chatgpt-comparison-detection / predict_lr_classifier

Function predict_lr_classifier

detect/ml_train.py:265–270  ·  view source on GitHub ↗
(model, x, y)

Source from the content-addressed store, hash-verified

263
264
265def predict_lr_classifier(model, x, y):
266 # borrowed from https://github.com/jmpu/DeepfakeTextDetection
267 y_pred = model.predict(x)
268 y_prob = model.predict_proba(x)
269 metrics = compute_metrics(y_pred, y, y_prob[:,1])
270 printf(json.dumps(metrics, indent=2))
271
272
273def main(args: argparse.Namespace, seed=42):

Callers 1

mainFunction · 0.85

Calls 2

compute_metricsFunction · 0.70
printfFunction · 0.70

Tested by

no test coverage detected