What is the best way to create and run machine learning prediction code (with a training set and predictions) so that you can see the output (predictions) in PowerBI?
Can you elaborate your scenario.
There are components available in forge to AI component and connectors.
Please go through (specially first one):
https://www.outsystems.com/evaluation-guide/how-do-i-add-predictive-capabilities-powered-by-custom-machine-learning-models
https://ai4apps.outsystemsenterprise.com/Chatbotdemo/
https://www.outsystems.com/ai-for-applications/