Power BI, in the latest release, added support for supervised automated machine learning.This means that Power BI can help predict ‘unknowns’ once it learns from the ‘known’ values. The learning phase is called “training the model” and predicting phase is called “applying the model”. The ‘known’ values have the historical outcome field set, whereas clearly for ‘unknowns’ that field is not set or null or not existent.
More convenient way to apply your machine learning model
With today’s release, applying machine learning models to get prediction has become much simpler and smarter. Power BI supports two modes of applying:
When both known values and unknown values are in the same dataflow entity.
When they are in different entities.
Once you apply, the predictions are added automatically when newer data arrives with dataflow refreshes.
How does it work?
When you have trained an automated machine learning model, Power BI automatically selects the entities that can be applied to it. Simply click on the drop-down menu to select the entity to apply for your machine learning model. This avoids the hassle of entering an entity name manually. You would notice that the drop-down lists entities through schema matching and the entities which belong to system generated testing data entity and the training data entity are already filtered.
How to apply your model in this new release
1. Click “Machine Learning Models” tab.
First, click on “Machine Learning Models” tab.
Second, make sure your model Status is ‘Trained’.
2. Click “View performance report and apply model” icon when your report is ready to view.
If you justtrainedyour model,clickingthis button willprepare a report and dataset for10-15mins. Just wait for your reportto beready to useandverifythe results in thereport.
3. Click “Apply model” button at the top right corner.
Once you get into the “report” view, click the “Apply model” yellow button at top right of your screen. Then another apply model dialog wizard will pop up.
4. In the pop up dialog wizard, apply your Machine Learning Model.
a. Select an entity that has been filtered for youfromdrop-down menuas the source input entity. This is the entity which has the unknown outcomes. As previouslymentionedit can be the same entitywhich had the data with historical outcome field set.
Now you can see,within this drop-down menu, we only show all available entities. Other test entities and trained model are filtered out. At front-end part, we extract the entity array, through traverse this entity array, separate out the test entities and the model which already trained, only retain the entities which is meaningful to apply your model.
b. Name the new output column.
Pick a meaningful name as an output column name, which willcontain your result and be added to your input entity.
c.Enter a threshold between [0, 1] for your machine learning model.
Pick a proper threshold within 0 to 1.00. This threshold will impact your result of binary prediction. (This is only used in Binary Prediction. You don’t need this step in Classification, Forecasting and Regression).
d.Click “Apply model” and there you go! PowerBI does not touch your original entity and always produces results in a new Enriched entity.
e.Refresh the dataflow. Click “Refresh Now”buttonat thetop right corner.
f.After the refresh finishes, see the predictions by clicking Edit entities and Enriched preview query.
Click 'Entity' tab, now you could see there is a new entity named 'Enriched entity'. At the most right of this 'Enriched entity', click first icon: 'Edit entity'.
In the new window, you can see your prediction result is added to your enriched entity.
There are three more columns added to your enriched entity for telling you three things: Outcome, Scores, and Explanation.
Thanks for watching and have fun in new features!
Thanks to my great team and my manager Rajat Talwar.
If you have any questions, you are welcome to ask me questions about this new feature.
Yuchen Liang | Software Engineer at Microsoft Power BI (Artificial Intelligence) team