How to set 'predict_proba' in the new JSON data format?

Witcho 0 Reputation points
2024-02-09T01:58:35.34+00:00

I trained some models for classification at the end of 2023 (using AutoML) and exposed an Endpoint, then it was possible to set the predic_proba using the GlobalParameters setting. However now, in 2024, I did the same process but the exposed Endpoint changed the possible inputs. Is there a way to get the predic_proba value? Regards Luis

#2023 version
data =  {
  "Inputs": {
    "data": [
      {
        "inflow": 0.0,
        "outflow": 400
      },
      {
        "inflow": 11442.26,
        "outflow": 0.0
      }
    ]
  },
  "GlobalParameters": {
    "method": "predict_proba"
  }
}

#2024 version
data =  {
  "input_data": {
    "columns": [
      "inflow",
      "outflow"
    ],
    "index": [0,1],
    "data": [[0.0,400], [11442.26,0.0]
  }
}
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,334 questions
{count} votes

1 answer

Sort by: Most helpful
  1. dupammi 8,615 Reputation points Microsoft External Staff
    2024-02-14T11:38:17.0833333+00:00

    Hi @Witcho
    The test results appears to be predicted class labels for each input record. It seems that the model may not provide probability estimates (predict_proba) but rather directly assigns final predicted classes (e.g., "yes" or "no"). This behavior could stem from specific implementation choices or model configurations. User's image

    To address this, it's advisable to review the model's setup to understand why it returns class labels instead of probabilities. If probability estimates are necessary, adjustments to the model configuration or post-processing of predictions might be required. Alternatively, retraining the model with a configuration that outputs probabilities could be considered. I hope you understand. Thank you.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.