Inconsistent Results in Azure AutoML Model Deployment to Power BI
I have deployed the model in Azure ml using Azure AutoML and successfully consumed it in Power BI also but the problem is when I apply the filter on any gpn code it gives the correct output for one but for the whole table it gives a different output(wrong value).
Azure Machine Learning
-
dupammi 6,475 Reputation points • Microsoft Vendor
2024-04-16T09:11:27.9866667+00:00 Thank you for using the Microsoft Q&A forum.
Based on the provided information, it seems like the issue might be related to the filtering or grouping of data. When you apply a filter on a specific GPN code, it gives the correct output for that row, but when you apply the filter to the whole table, it gives a different output (wrong value).
It's possible that there is some grouping or aggregation being applied to the data that is causing the issue. When you apply the filter to the whole table, it might be aggregating the data in a way that is different from what you expect.
To better understand the issue, could you please provide more information about the specific filter you are applying, and the type of aggregation or grouping being used in the Power BI report?
Additionally, could you please provide more details about the Azure AutoML model you deployed, such as the type of model (classification, regression, etc.) and the features used for training the model?
Thank you.
-
Anjali Kumawat 20 Reputation points
2024-04-16T09:31:41.4166667+00:00 yes, @dupammi , I am using the Time series forecasting model in Auto ML . and as part of Powerbi, I haven't changed in DAX query. I only deploy the model in PowerBi for forecasting for next year. but in this for the whole table, it gives the wrong output and for one filter it gives the correct output. now your question is how can I say correct output so I will share with you a ss where for that value in Azure it gives output.
DAX query when the filter is applied on a particular GPN code :
= Table.SelectRows(#"Applied AzureML.glenbiatest2", each ([GPN Code] = 1111981))DAX query when the filter is applied to whole table :
= Table.SelectRows(#"Applied AzureML.glenbiatest2", each true)and in the advance editor
let Source = Csv.Document(File.Contents("D:\Work_User\Anjali\Time_Series_Forcasting\Glanbia\Test_small_glenbia.csv"),[Delimiter=",", Columns=7, Encoding=65001, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Month", type datetime}, {"GPN Code", Int64.Type}, {"Common Code", type text}, {"Brand", type text}, {"Product Category", type text}, {"Size", type text}, {"SKU Flavor", type text}}), #"Applied AzureML.glenbiatest2" = Table.AddColumn(#"Changed Type", "AzureML.glenbiatest2", each AzureML.glenbiatest2([GPN Code], [Common Code], [Product Category], [Size], [SKU Flavor], [Brand], [Month])) meta [FunctionBrowser="AzureMLFunctions"], #"Filtered Rows" = Table.SelectRows(#"Applied AzureML.glenbiatest2", each true)
in
#"Filtered Rows"
when the filter is applied on the GPN code.
let
Source = Csv.Document(File.Contents("D:\Work_User\Anjali\Time_Series_Forcasting\Glanbia\Test_small_glenbia.csv"),[Delimiter=",", Columns=7, Encoding=65001, QuoteStyle=QuoteStyle.None]), #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Month", type datetime}, {"GPN Code", Int64.Type}, {"Common Code", type text}, {"Brand", type text}, {"Product Category", type text}, {"Size", type text}, {"SKU Flavor", type text}}), #"Applied AzureML.glenbiatest2" = Table.AddColumn(#"Changed Type", "AzureML.glenbiatest2", each AzureML.glenbiatest2([GPN Code], [Common Code], [Product Category], [Size], [SKU Flavor], [Brand], [Month])) meta [FunctionBrowser="AzureMLFunctions"], #"Filtered Rows" = Table.SelectRows(#"Applied AzureML.glenbiatest2", each ([GPN Code] = 1111981))
in
#"Filtered Rows"
-
Anjali Kumawat 20 Reputation points
2024-04-16T09:46:40.0266667+00:00 @dupammi if you have any other question regarding this Problm please tell me.
Thanks -
dupammi 6,475 Reputation points • Microsoft Vendor
2024-04-16T10:14:24.6733333+00:00 Based on the information provided, it seems that the issue is related to the DAX query used in Power BI. When the filter is applied to a specific GPN code, the DAX query filters the data based on that code, and the output is correct. However, when the filter is not applied, the DAX query returns the entire table, and the output is incorrect.
To debug this issue, you can modify the DAX query to filter the data based on the GPN code column. You can use the following DAX query to filter the data based on the GPN code column:
= Table.SelectRows(#"Applied AzureML.glenbiatest2", each ([GPN Code] = [GPN Code]))
This query will filter the data based on the GPN code column.
Additionally, here are three more steps you can take to troubleshoot the issue:
Feature Engineering: Check if there are any features used by the model that might be affected differently by the filter. Ensure that the feature engineering process is consistent across both scenarios.
Time Series Specifics: Since you mentioned using a time series forecasting model, ensure that the time component is handled correctly. Check if the time series data is aligned properly and if there are any anomalies affecting the forecasting.
Debugging: Implement logging or debugging mechanisms to track the flow of data and predictions through the model in Power BI. This can help identify where the inconsistencies are occurring.
Also, aligning datetime ranges between training and inference data can help resolve consistency in parsing and enable successful execution of the Azure AutoML model within Power BI. You can check if the model is trained on the entire dataset or only on a subset of the data. If the model is trained on a subset of the data, it may not be able to generalize well to the entire dataset, resulting in inconsistent results. You can try retraining the model on the entire dataset to see if it improves the results.
I hope this helps!
-
dupammi 6,475 Reputation points • Microsoft Vendor
2024-04-17T00:56:01.9933333+00:00 We haven’t heard from you on the last response and was just checking back to see if you got a chance to see my above response and tried those debugging suggestions at your end.
Thank you.
-
dupammi 6,475 Reputation points • Microsoft Vendor
2024-04-18T01:23:12.9033333+00:00 Have you got a chance to try the suggestions in my above response.
-
Anjali Kumawat 20 Reputation points
2024-04-22T13:00:56.2766667+00:00 @dupammi I have tried all these things but same problem I am facing.
-
dupammi 6,475 Reputation points • Microsoft Vendor
2024-04-22T13:03:56.9066667+00:00 Sorry for the trouble you are facing. I request you to raise a support case through Azure portal.
I hope you understand. Thank you!
Sign in to comment