Hi Readers , have you ever wondered on how to run a Machine learning Model (in python) in Powerbi application? This Blog will help you with it.
Before Implementing it you need to have a ML model in python code ready. In my case, I have ML model that predicts the Profit value of 50 startup companies based on features like ‘R&D Spend’, ‘Administration’, ‘Marketing Spend’ and State .
1) First import your dataset in fresh Power Bi file.
In Power BI Desktop, select File > Options and settings > Options .
2)Then select Global > Python scripting. Set Python home directory
NOTE – If your normal python is not working here then Download last version of Winpython from : https://winpython.github.io/
3) Go to Transform data and open Power query editor and select transform and then click Run Python Script.
4) Paste the python code in it and run.
5) Do the necessary transformation as required in your dataset.
6) Here as you can see the prediction column is generated.
7) Now Close and Apply.
I hope that you will find this blog helpful
Karthik Ramanathan
Data Analyst
Addend Analytics
Author By
Gaurav Lakhotia
Gaurav holds an MBA in Business Analytics. As a data geek and avid learner, he has earned accolades including Microsoft Certified Data Analyst, Microsoft Certified Azure Administrator, and active Power BI Community contributor. He is also a Microsoft Certified Trainer. With critical thinking and project delivery skills, he strives to achieve customer delight in Data Analytics projects. Gaurav loves travelling with friends when he is not busy working on data.