Machine Learning in Oracle Database supports machine learning modeling at scale using SQL, R, Python, REST, AutoML, and no-code interfaces. It has more than 30 high-performance in-database algorithms producing models for immediate use in applications. It enables data scientists and other data professionals to build models quickly by simplifying and automating key elements of the machine learning lifecycle.
Using Oracle database machine learning with Oracle analytics ( Oracle Analytics Cloud & Oracle Analytics Server) enable the user to perform predictive analytics on large dataset as ml model and data are stored in database and data scoring is also performed in database using the database as a high-performance compute engine.
This blog will explain how to register a database machine learning model in Oracle analytics and use it for predictions.
Sample Use case
There is a bike rental company, they rent their bikes on daily basis and maintain historical data. They record all attributes such as Season, Working Day, Temperature, Humidity, Wind speed and number of bikes rented on that day etc.. They developed a machine learning model in Oracle database which is using these attributes and predict the number of bikes they will rent in future so that they could plan their resources.

Machine Model developed in Oracle Database using OML for Python

Now let’s use this model in Oracle Analytics. So there are three steps to do, first register the model then apply the model to perform predictions and then use the predicted dataset for Analytics.
Register the ML Model
Login to Oracle Analytics Cloud/Server, On the Home page, click Page Menu, then Register ML/Function Model, then Machine Learning Models.
In the Register an ML Model dialog, select the database connection and select your ML model(create the database connection if it doesn’t exist) and click on “Register”.
From the Home page, click Navigator, and then click Machine Learning to confirm that the model was imported successfully.

Apply ML Model
Use the Data flow to apply or use database machine learning model.
- Create a dataflow and select the dataset that you want to apply the model to.
- From the Data Flow Steps window, double-click ‘Apply Model’, and then select the ml model to use.
- In apply model step, select the input and output column. For example, output column could be Bike Rented count in this case.
- In the data flow editor, click Add a step (+) and select ‘Save Data’ and provide a new dataset name which would be save over the database connection as a table in database.
- Now save and execute the dataflow which will calculate the predictions of bike rental counts and save into database.

After applying ml model bike rental count prediction will be calculated

Use dataset for predictive analytics
Now use this new dataset with calculated predictions for analytics. You can analyse how different attributes are impacting and contributing to your business and how you need to control and manage them in future.

Documentation
To get more details about using database machine learning model in Oracle Analytics, please follow this documentation.
Oracle Analytics Documentation
