4 Get Started with Oracle Machine Learning Notebooks for Data Analysis and Data Visualization
Oracle Machine Learning Notebooks is an enhanced web-based notebook platform for data analyst and data scientists. You can write code, text, create visualizations, and perform data analytics including machine learning. Notebooks work with interpreters in the back-end. In Oracle Machine Learning user interface, notebooks are available in a project, where you can create, edit, delete, copy, move, and even save notebooks as templates.
- About Oracle Machine Learning Notebooks
Oracle Machine Learning Notebooks is an enhanced web-based notebook platform for data engineers, data analyst, R and Python users, and data scientists. You can write code, text, create visualizations, and perform data analytics including machine learning. Notebooks work with interpreters in the back-end. - Access your Oracle Machine Learning Notebooks Page
You can access the OML Notebooks page from the left navigation pane of Oracle Machine Learning Notebooks, or from the Notebooks page. - Edit your Oracle Machine Learning Notebook
Upon creating a notebook, it opens automatically, presenting you with a single paragraph using the default %sql interpreter. You can change the interpreter by explicitly specifying one of%script
,%python
,%sql
,%r
,%md
, or%conda
. - Export a Notebook
You can export a Notebook in Native format (.dsnb
) file, Zeppelin format (.json
) file, in Jupyter format (.ipynb
), and later import them in to the same or a different environment. - Import a Notebook
You can import notebooks across Pluggable Databases (PDBs) into your workspace. Oracle Machine Learning UI supports the import of notebooks in the native format(.dsnb)
, Zeppelin(.json)
and Jupyter(.ipynb)
notebooks.
4.1 About Oracle Machine Learning Notebooks
Oracle Machine Learning Notebooks is an enhanced web-based notebook platform for data engineers, data analyst, R and Python users, and data scientists. You can write code, text, create visualizations, and perform data analytics including machine learning. Notebooks work with interpreters in the back-end.
Note:
There is a single namespace for both the original notebooks and the new notebooks. You cannot have a notebook with the same name in both notebook lists. A notebook copied from the original interface to the new will have_new
appended to it.
Figure 4-1 OML Notebook
![Screenshot of OML Notebook Screenshot of OML Notebook](img/oml-notebook.png)
- Faster notebook loading time.
- The Oracle look and feel as it based on the Oracle Redwood theme.
- Enriched visualization in its Line chart, Area chart, Bar chart, Pyramid chart, Pie chart, Donut chart, Funnel chart, Tag Cloud, Treemap Diagram, Sunburst Diagram, Scatter Plot, Box Plot.
- Option to enter comments in notebook paragraphs.
- Option to create Paragraph Dependencies. The Paragraph Dependencies feature allows you to add dependencies between paragraphs. The dependents of a paragraph automatically run after the original paragraph is run.
- Simplified service level selection of High, Medium, Low through drop-down menu.
- Layout of Zeppelin and Jupyter notebook.
- On-page versioning, viewing of version history, and version comparison.
4.2 Access your Oracle Machine Learning Notebooks Page
You can access the OML Notebooks page from the left navigation pane of Oracle Machine Learning Notebooks, or from the Notebooks page.
- To access the Notebooks page:
- Go to the Oracle Machine Learning left navigation pane,
expand Projects and then click Notebooks.
Figure 4-2 Left navigation pane
- Alternatively, you can click Notebooks under Quick Link on the home page to open the Notebooks page.
- Go to the Oracle Machine Learning left navigation pane,
expand Projects and then click Notebooks.
- This opens the OML Notebooks page.
-
Figure 4-3 OML Notebooks page
- Create: Click Create to create a new notebook.
- Edit: Click on a notebook row to select it and click Edit. You can edit the notebook name, and add comments in the Edit Notebook dialog box.
- Delete: Click on a notebook row to select it and click Delete.
- Duplicate: Click on a notebook row
to select it , and click Duplicate. This creates a
copy of a notebook, and the duplicate copy of the is listed on the Notebooks
page with the suffix
_1
in the notebook name. - Save as Template: To save a notebook as a template, select the notebook and click Save as Template. In the Save as Template dialog, you can define the location of the template to save it in Personal or Shared under Templates.
- Import: To import a notebook as .json files, click Import. Select the project and workspace in which to import the notebook.
- Export: To export a notebook, click
Export. You can export Notebooks in the
.dsnb
format, Zeppelin format(.json )
file and in Jupyter format (.ipynb)
, and later import them in to the same or a different environment. - Version: To create versions of a
notebook, select it and click Version. The Versions
page for that particular notebook opens. Here, you can create a new version
of the notebook by clicking +Version. The Create
Version dialog opens. Enter a name of the notebook version, a description,
and click OK. The new version of the notebook gets
created by the same name with a suffix
_2
for the second version. For subsequent versions, suffix (number) increments by one. To revert to an older version by clicking Revert Version. You also have the option to delete any version of the notebook. Click Back to Notebooks to go to the OML Notebooks page.Note:
You can also version a notebook by opening it, and then clicking on theoption. By using this option, you can create new versions, view version history, restore older versions, and delete any older versions of the notebook that you have opened.
-
- Work with Notebook Versions on the Notebooks Page
By creating versions of your notebook, you can archive your work in a notebook.
4.2.1 Work with Notebook Versions on the Notebooks Page
By creating versions of your notebook, you can archive your work in a notebook.
Note:
A versioned notebook is non-editable. If you want to make any changes to a particular version of a notebook, you must restore that version to edit it.Parent topic: Access your Oracle Machine Learning Notebooks Page
4.3 Edit your Oracle Machine Learning Notebook
Upon creating a notebook, it opens automatically, presenting you with a single paragraph using the default %sql interpreter. You can change the interpreter by explicitly specifying one of %script
, %python
, %sql
, %r
, %md
, or %conda
.
- Work with Notebook Versions in the Notebook Editor
By creating versions of your notebook, you can archive your work in a notebook. - Create Paragraph Dependencies
Paragraph Dependencies allow you to add dependencies between paragraphs. The dependent paragraphs automatically run after the original paragraph is run, according to the order of dependency.
4.3.1 Work with Notebook Versions in the Notebook Editor
By creating versions of your notebook, you can archive your work in a notebook.
- The original notebook Notebook Versioning Demo, is edited to add a script to build a machine learning model.
- The Notebook Versioning Demo notebook is then versioned as Version 2 to archive the code to build the machine learning model.
- The Version 2 and Version 1 of the Notebook Versioning Demo notebook are compared using the Compare Versions feature.
Note:
A versioned notebook is non-editable. If you want to make any changes to a particular version of a notebook, you must restore that version to edit it.Parent topic: Edit your Oracle Machine Learning Notebook
4.3.2 Create Paragraph Dependencies
Paragraph Dependencies allow you to add dependencies between paragraphs. The dependent paragraphs automatically run after the original paragraph is run, according to the order of dependency.
Parent topic: Edit your Oracle Machine Learning Notebook
4.4 Export a Notebook
You can export a Notebook in Native format (.dsnb
) file,
Zeppelin format ( .json
) file, in Jupyter format ( .ipynb
), and later import them in to the same or a different environment.
4.5 Import a Notebook
You can import notebooks across Pluggable Databases (PDBs) into your
workspace. Oracle Machine Learning UI supports the import of notebooks in the native format
(.dsnb)
, Zeppelin (.json)
and Jupyter
(.ipynb)
notebooks.
Note:
Starting in Oracle Database 20c,"database" refers specifically to the data files of a multitenant container database (CDB), pluggable database (PDB), or application container.