Templates

By using the Oracle Machine Learning Notebooks templates, you can collaborate with other users by sharing your work, publishing your work as reports, and by creating notebooks from templates. You can store your notebooks as templates, share notebooks, and provide sample templates to other users.

Note: You can also collaborate with other Oracle Machine Learning Notebooks users by providing access to your workspace. The authenticated user can then access the projects in your workspace, and access your notebooks. The access level depends on the permission type granted - Manager, Developer, or Viewer. For more information about collaboration among users, see How to collaborate in Oracle Machine Learning Notebooks

Use the Personal Templates

Personal Templates lists the notebook templates that you have created.

You can perform the following tasks:

Create Notebooks from Templates

You can create new notebooks from an existing template, and store them in Personal Templates for later use.

You must select a notebook template.

To create a new notebook from a template:

  1. On the Personal Templates page, select the template based on which you want to create the notebook, and click New Notebook.

    The Create Notebook dialog box opens.

  2. In the Name field, provide a name for the notebook.

  3. In the Comments field, enter comments, if any.

  4. In the Project field, select the project in which you want to save your notebook.

  5. In the Connection field, the default connection is selected.

  6. Click OK.

The notebook is created, and is available on the Notebooks page.

Share Notebook Templates

You can share templates from Personal Templates. You can also share templates for editing.

To share a template:

  1. Select the notebook template in Personal Templates and click Share.

    The Save to Shared Templates dialog box opens.

  2. In the Name field, enter a new name for the template.

  3. In the Comments field, provide comments, if any.

  4. In the Tags field, enter tags separated by commas. To enable easy searching, use descriptive tags.

  5. Click OK.

Once the template is successfully created and shared, a message appears stating that the template is created in Shared.

Edit Notebook Templates Settings

You can modify the settings of an existing notebook template in Personal Templates.

To edit notebook template settings:

  1. Select the notebook template in Personal Templates and click Edit Settings.

    The Edit Template dialog box opens.

  2. In the Name field, edit the name, as applicable.

  3. In the Comments field, edit the comments, if any.

  4. In the Tags field, edit the tags, as applicable.

  5. Click OK.

Use the Shared Templates

In the Shared Templates, you can share notebook templates with all authenticated users the notebook templates you create from existing notebooks available in Templates.

The Shared Templates page tracks notebook templates when you perform the following:

The Shared Templates page displays the following information about the templates:

You can perform the following tasks:

Create Notebooks from Templates

You can create new notebooks from an existing template, and store them in Personal Templates for later use.

You must select a notebook template.

To create a new notebook from a template:

  1. On the Personal Templates page, select the template based on which you want to create the notebook, and click New Notebook.

    The Create Notebook dialog box opens.

  2. In the Name field, provide a name for the notebook.

  3. In the Comments field, enter comments, if any.

  4. In the Project field, select the project in which you want to save your notebook.

  5. In the Connection field, the default connection is selected.

  6. Click OK.

The notebook is created, and is available on the Notebooks page.

Edit Notebook Templates Settings

You can modify the settings of an existing notebook template in Personal Templates.

To edit notebook template settings:

  1. Select the notebook template in Personal Templates and click Edit Settings.

    The Edit Template dialog box opens.

  2. In the Name field, edit the name, as applicable.

  3. In the Comments field, edit the comments, if any.

  4. In the Tags field, edit the tags, as applicable.

  5. Click OK.

Use the Example Templates

The Example Templates page lists the pre-populated Oracle Machine Learning notebook templates. You can view and use these templates to create your notebooks.

The Example Templates page displays the following information about the templates:

You cannot alter any templates in the Example Templates page. The search options are:

Create a Notebook from the Example Templates

Using the Oracle Machine Learning Example Templates, you can create a notebook from the available templates.

To create a notebook:

  1. On the Example Templates page, select the template based on which you want to create a notebook.

  2. Click New Notebook.

    The Create Notebook dialog box opens.

  3. In the Create Notebook dialog, the name of the selected template appears. In the Name field, you can change the notebook name.

    Figure 1: Create Notebook dialog

    Description of the illustration create-nb-gallery.png

  4. In the Comment field, if any comment is available for the template, then it is displayed. You can edit the comment.

  5. In the Project field, click the edit icon edit .

  6. Select the project in which you want to save the notebook.

  7. In the Connection field, the default connection is selected.

  8. Click OK.

The notebook is created and is available on the Notebooks page.

Example Templates

Oracle Machine Learning Notebooks provide you notebook example templates that are based on different machine learning algorithms and languages such as Python, R, and SQL. The example templates are processed in Oracle Autonomous AI Database.

You can create your own editable and runnable Oracle Machine Learning notebooks based on any of these Oracle Machine Learning for R example template notebooks:

Note: The Conda environment is installed and managed by the ADMIN user with OML_SYS_ADMIN role. The administrator can create a shared environment, and add or delete packages from it. The Conda environments are stored in the Object Storage bucket associated with the Autonomous AI Database.

Conda is an open source package and environment management system that enables the use of virtual environments containing third-party R and Python packages. With conda environments, you can install and update packages and their dependencies, and switch between environments to use project-specific packages.

This template notebook OML Third-Party Packages - Environment Creation contains a typical workflow for third-party environment creation and package installation in Oracle Machine Learning Notebooks.

Figure 2: Conda Example Templates

Description of the illustration conda_templates.png

Note: To use the SQL API for embedded R execution, a user-defined R function must reside in the OML4R script repository, and an Oracle Machine Learning (OML) cloud account USERNAME, PASSWORD, and URL must be provided to obtain an authentication token.

Note: The following example template notebooks prefixed with an asterisk (*), use the CUSTOMER_INSURANCE_LTV data set. This data set is generated by the OML Run-me-first notebook. Hence, you must run the OML Run-me-first notebook that is available under the Examples Templates.

Note: The pre-built Wikipedia model must be installed in your Autonomous AI Database instance to run this notebook.

Note: To run a script, it must reside in the R script repository. An Oracle Machine Learning cloud service account user name and password must be provided for authentication.

Oracle Machine Learning for Python Example Templates

You can create your Oracle Machine Learning notebooks based on any of these Oracle Machine Learning for Python example templates: Figure 3: Oracle Machine Learning for PythonExample Templates

Description of the illustration examples-template.png

Note: The following example template notebooks prefixed with an asterisk (*), use the CUSTOMER_INSURANCE_LTV_PY data set. This data set has duplicated values artificially generated by OML4SQL Noise notebook. Hence, you must run the OML4SQL Noise first before running the notebook.

Note: When building or applying a model using in-database Oracle Machine Learning algorithms, automatic data preparation will normalize data automatically as needed, by specific algorithms.

Note: If you plan to use the in-database algorithms, one hot encoding is automatically applied for those algorithms requiring it. The in-databae algorithms automatically explode the categorical columns and fit the model on the prepared data internally.

Oracle Machine Learning for SQL Example Templates

You can create your Oracle Machine Learning notebooks based on any of these Oracle Machine Learning for SQL example templates: Figure 4: Oracle Machine Learning for SQLExample Templates

Description of the illustration oml4sql_examples.png