(model, x, y)
| 263 | |
| 264 | |
| 265 | def 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 | |
| 273 | def main(args: argparse.Namespace, seed=42): |
no test coverage detected