27 R Extensibility
This topic applies only to Oracle on-premises.
27.1 Oracle Machine Learning for SQL with R Extensibility
Learn how you can use Oracle Machine Learning for SQL to build, score, and view machine learning models as well as R models.
The OML4SQL framework is enhanced extending the OML4SQL algorithm set with algorithms from the open source R ecosystem. Oracle Machine Learning for SQL is implemented in the Oracle Database kernel. The OML4SQL models are Database schema objects. With the extensibility enhancement, the OML4SQL framework can build, score, and view both OML4SQL models and R models.
Registration of R scripts
The R engine on the database server runs the R scripts to build, score, and view R models. These R scripts must be registered with the database beforehand by a privileged user with rqAdmin role. You must first install Oracle Machine Learning for R to register the R scripts.
Functions of Oracle Machine Learning for SQL with R Model
The following functions are supported for an R model:
-
OML4SQL
DBMS_DATA_MINING
package is enhanced to support R model. For example,CREATE_MODEL
andDROP_MODEL
. -
MODEL VIEW
to get the R model details about a single model and a partitioned model. -
OML4SQL SQL functions are enhanced to operate with the R model functions. For example,
PREDICTION
andCLUSTER_ID
.
R model extensibility supports the following OML4SQL functions:
-
Association
-
Attribute Importance
-
Regression
-
Classification
-
Clustering
-
Feature Extraction
27.2 Scoring with R
Learn how to build and score with an Oracle Machine Learning for R model.
For more information, see Oracle Machine Learning for SQL User’s Guide
27.3 About Algorithm Metadata Registration
Algorithm metadata registration allows for a uniform and consistent approach of registering new algorithm functions and their settings.
-
Manage R-based algorithms more easily
-
Specify R-based algorithm for model build
-
Clean individual properties in JSON structure
-
Share R-based algorithm across user
Algorithm metadata registration extends the machine learning model capability of Oracle Machine Learning for SQL.
See Also:
DBMS_DATA_MINING — Algorithm Settings: ALGO_EXTENSIBLE_LANG for a listing and explanation of the available model settings.Note:
The term hyperparameter is also interchangeably used for model setting.27.3.1 Algorithm Metadata Registration
Algorithm metadata registration allows for a uniform and consistent approach of registering new algorithm functions and their settings.
User have the ability to add new algorithms through the REGISTER_ALGORITHM
procedure registration process. The new algorithms can appear as available within Oracle Machine Learning for SQL for their appropriate machine learning functions. Based on the registration metadata, the settings page is dynamically rendered. Algorithm metadata registration extends the machine learning model capability of OML4SQL.