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
Kamal Sharma
Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.