<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to get the Probability of a prediction from Real Time Inference model in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/how-to-get-the-probability-of-a-prediction-from-real-time/m-p/21720#M1201</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used AutoML to create a model. When using that model I want to have the probability of the predictions returned. I was able to do this in a notebook with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loaded_model = mlflow.pyfunc.load_model(logged_model)&lt;/P&gt;&lt;P&gt;# Predict on a Pandas DataFrame.&lt;/P&gt;&lt;P&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;loaded_model.predict_proba(pd.DataFrame(data))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have since registered the model and deployed a Real Time Inference endpoint for this model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When calling the API I only get a true/false response like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "predictions": [&lt;/P&gt;&lt;P&gt;        &lt;B&gt;true&lt;/B&gt;&lt;/P&gt;&lt;P&gt;    ]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not clear to me how to change or update the model to return a probability. Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Nov 2022 15:20:52 GMT</pubDate>
    <dc:creator>614849</dc:creator>
    <dc:date>2022-11-18T15:20:52Z</dc:date>
    <item>
      <title>How to get the Probability of a prediction from Real Time Inference model</title>
      <link>https://community.databricks.com/t5/machine-learning/how-to-get-the-probability-of-a-prediction-from-real-time/m-p/21720#M1201</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used AutoML to create a model. When using that model I want to have the probability of the predictions returned. I was able to do this in a notebook with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loaded_model = mlflow.pyfunc.load_model(logged_model)&lt;/P&gt;&lt;P&gt;# Predict on a Pandas DataFrame.&lt;/P&gt;&lt;P&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;loaded_model.predict_proba(pd.DataFrame(data))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have since registered the model and deployed a Real Time Inference endpoint for this model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When calling the API I only get a true/false response like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "predictions": [&lt;/P&gt;&lt;P&gt;        &lt;B&gt;true&lt;/B&gt;&lt;/P&gt;&lt;P&gt;    ]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not clear to me how to change or update the model to return a probability. Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 15:20:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/how-to-get-the-probability-of-a-prediction-from-real-time/m-p/21720#M1201</guid>
      <dc:creator>614849</dc:creator>
      <dc:date>2022-11-18T15:20:52Z</dc:date>
    </item>
  </channel>
</rss>

