def metrics_equal():
dataset_path = dpu.generate_equal_dataset()
dataset = dpu.load(dataset_path)
mm = SGDCModelManager()
mm.x_train, mm.x_test, mm.y_train, mm.y_test = train_test_split(dataset['inputs'], dataset['outputs'], random_state=42)
mm.train()
predicts = mm.predict(mm.x_test)
report = classification_report(mm.y_test, predicts)
return jsonify(status=200, message=report)
评论列表
文章目录