29 R Extensibility

Only in Oracle on-premises This topic applies only to Oracle on-premises.

Learn how to build an analytics model and score in R. The R extensible algorithms are enhanced to support and register additional algorithms for users who use SQL and graphical user interface.

29.1 Oracle Machine Learning for SQL with R Extensibility

Learn how you can use Oracle Machine Learning for SQL to build, score, and view OML4SQL models as well as R models.

The Oracle Machine Learning for SQL framework is enhanced extending the Oracle Machine Learning for SQL algorithm set with algorithms from the open source R ecosystem. Oracle Machine Learning for SQL is implemented in the Oracle Database kernel. The Oracle Machine Learning for SQL models are Database schema objects. With the extensibility enhancement, the Oracle Machine Learning for SQL framework can build, score, and view both Oracle Machine Learning for SQL 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:

  • Oracle Machine Learning for SQL DBMS_DATA_MINING package is enhanced to support R model. For example, CREATE_MODEL and DROP_MODEL.

  • MODEL VIEW to get the R model details about a single model and a partitioned model.

  • Oracle Machine Learning for SQL SQL functions are enhanced to operate with the R model functions. For example, PREDICTION and CLUSTER_ID.

R model extensibility supports the following Oracle Machine Learning for SQL functions:

  • Association

  • Attribute Importance

  • Regression

  • Classification

  • Clustering

  • Feature Extraction

29.2 About Algorithm Metadata Registration

Algorithm metadata registration allows for a uniform and consistent approach of registering new algorithm functions and their settings.

Users have the ability to add new R-based algorithms through the registration process. The new algorithms appear as available within Oracle Machine Learning for R and within the appropriate machine learning techniques. Based on the registration metadata, the settings page is dynamically rendered. The advantages are as follows:
  • 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.

29.3 Scoring with R

Oracle Machine Learning for SQL supports R models, enabling scoring and predictions using registered R scripts.