Repair coupled binary-classifier ROC and precision-recall plotting for preprocessing-style estimators.
harbor run -t mimo-v2.6-rl/candidate-2713-ml-inferenceharbor download mimo-v2.6-rl/candidate-2713-ml-inferenceYou are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
The workspace contains a small, frozen slice of a mature Python ML library. Repair the two public plotting entry points under vendor/project/sklearn/metrics/_plot/ so they work correctly with fitted binary estimators that expose a response method through a preprocessing-style wrapper.
Use the existing response-method helper and metric functions. The repaired workflow must:
predict_proba and decision_function response methods, including the automatic fallback;sample_weight and ROC drop_intermediate through unchanged;Run the repository's evaluation driver after repairing the source. It must create /app/output.json with schema version ml-evaluation.v1, containing the ROC and precision-recall arrays and their summary metrics.
Repair the frozen scikit-learn source tree in /app/vendor/project so its ROC
and precision-recall plotting helpers work with fitted preprocessing-style
classifiers.
You must modify both existing modules:
/app/vendor/project/sklearn/metrics/_plot/roc_curve.py/app/vendor/project/sklearn/metrics/_plot/precision_recall_curve.pyThe repaired helpers must satisfy all of the following:
classes_ and its response
method to a final estimator. Raw feature inputs must be passed to that
response method without an eager fitted-state rejection at the plotting
entry point.sample_weight, ROC drop_intermediate, display names, plotting keyword
arguments, numerical display fields, and axes/line metadata remain intact.Do not replace the modules, bypass the public plotting helpers, modify
/app/run_evaluation.py, or edit unrelated vendored source and upstream test
assets. Run the offline integration workflow and leave its result at exactly
/app/output.json.
The output JSON contract is output_schema_version = "ml-evaluation.v1" and
contains exactly these top-level keys:
output_schema_version, case_id, roc, precision_recall, display, metadata
roc contains fpr, tpr, and auc; precision_recall contains
precision, recall, and average_precision; display contains estimator
and line/axis metadata; and metadata records response method, weighting, and
the ROC drop_intermediate option.