4 Use Templates to Collaborate with Users
In the Oracle Machine Learning Templates UI, 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 Notebook 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 unresolvable-reference.html#GUID-7079D42F-9308-4BEF-B2F2-E74E49A22A87- Use the Personal Templates
Personal Templates lists the notebook templates that you have created. - 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. - 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.
Use the Personal Templates
Personal Templates lists the notebook templates that you have created.
-
View selected templates in read-only mode.
-
Create new notebooks from selected templates.
-
Edit selected templates.
-
Share selected notebook templates in Shared Templates.
-
Delete selected notebook templates.
- Create Notebooks from Templates
You can create new notebooks from an existing template, and store them in Personal Templates for later use. - Share Notebook Templates
You can share templates from Personal Templates. You can also share templates for editing. - Edit Notebook Templates Settings
You can modify the settings of an existing notebook template in Personal Templates.
Parent topic: Use Templates to Collaborate with Users
Create Notebooks from Templates
You can create new notebooks from an existing template, and store them in Personal Templates for later use.
Parent topic: Use the Personal Templates
Share Notebook Templates
You can share templates from Personal Templates. You can also share templates for editing.
Parent topic: Use the Personal Templates
Edit Notebook Templates Settings
You can modify the settings of an existing notebook template in Personal Templates.
Parent topic: Use the Personal Templates
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.
-
Like templates
-
Create notebooks from templates
-
View templates
-
Template name
-
Description
-
Number of likes
-
Number of creations
-
Number of static views
-
Create templates by clicking New Notebook
-
Edit template settings by clicking Edit Settings
-
Delete any selected template by clicking Delete
-
Search templates by Name, Tag, Author
-
Sort templates by Name, Date, Author, Liked, Viewed, Used
-
View templates by clicking Show Liked Only or Show My Items Only
- Create Notebooks from Templates
You can create new notebooks from an existing template, and store them in Personal Templates for later use. - Edit Notebook Templates Settings
You can modify the settings of an existing notebook template in Personal Templates.
Parent topic: Use Templates to Collaborate with Users
Create Notebooks from Templates
You can create new notebooks from an existing template, and store them in Personal Templates for later use.
Parent topic: Use the Shared Templates
Edit Notebook Templates Settings
You can modify the settings of an existing notebook template in Personal Templates.
Parent topic: Use the Shared Templates
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.
-
Template name
-
Description
-
Number of likes. Click Likes to mark it as liked.
-
Number of static views
-
Number of uses
-
Search templates by Name, Tag, Author
-
Sort templates by Name, Date, Author, Liked, Viewed, Used
-
View templates that are liked by clicking Show Liked only
- Create a Notebook from the Example Templates
In Oracle Machine Learning Example Templates, you can create a notebook from the available templates.
Parent topic: Use Templates to Collaborate with Users
Create a Notebook from the Example Templates
In Oracle Machine Learning Example Templates, you can create a notebook from the available templates.
- Example Templates
Oracle Machine Learning Notebooks provide you the following notebook Example templates that are based on different machine learning algorithms. The Example templates are processed in Oracle Autonomous Database.
Parent topic: Use the Example Templates
Example Templates
Oracle Machine Learning Notebooks provide you the following notebook Example templates that are based on different machine learning algorithms. The Example templates are processed in Oracle Autonomous Database.
You can create your notebook based on any of these templates:
Figure 4-1 Example Templates
- My First Notebook: Use the My First Notebook Example Template notebook for basic machine learning functions, data selection and data viewing. This template uses the
SH
schema data. - OML4Py -0- Tour: This notebook is the first of a series 0 through 5 that is intended to introduce you to the range of OML4Py functionality through short examples.
- OML4Py -1- Introduction: This notebook provides an overview on how to load OML library, create database tables, use the transparency layer, rank attributes for predictive value using the in-database attribute importance algorithm, build predictive models, and score data using these models.
- OML4Py -2- Data Selection and Manipulation: Use this notebook to learn how to work with the transparency layer which involves data selection and manipulation.
- OML4Py -3- Datastores: Use this template notebook to learn how to work with datastores, move objects between datastore and a Python sessions, manage datastore privileges, save model objects and Python objects in a datastore, delete datastores and so on.
- OML4Py -4- Embedded Python Execution: Use this template notebook to understand Embedded Python Execution. In this notebook, a linear model is build in Python directly, and then a function is created that uses Python engines spawned by the Autonomous Database environment.
- OML4Py -5- AutoML: Use this template notebook to understand the AutoML workflow in OML4Py. In this notebook, the
WINE
dataset from scikit-learn is used. Here, AutoML is used for classification on thetarget
column, and for regression on thealcohol
column. - OML4Py Data Cleaning Duplicates Removal: Use this template notebook to understand how to remove duplicate records using OML4Py. This notebook uses the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.
Note:
The data setCUSTOMER_INSURANCE_LTV_PY
has duplicated values artificially generated by OML4SQL Noise notebook, which must be run before running this notebook. - OML4Py Data Cleaning Missing Data: Use this template notebook to understand how to fill in missing values using OML4Py. This notebook uses the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.
Note:
The data setCUSTOMER_INSURANCE_LTV_PY
has missing values artificially generated by OML4SQL Noise notebook, which must be run before running this notebook. - OML4Py Data Cleaning Outlier Removal: Use this template notebook to understand how to clean data to remove outliers. This notebook uses the
CUSTOMER_INSURANCE_LTV
data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance. In the data setCUSTOMER_INSURANCE_LTV
, the focus is on numerical values and removal of records with values in the top and bottom 5%. - OML4Py Data Cleaning Recode Synonymous Values: Use this template notebook to understand how to recode synonymous value using OML4Py. This notebook uses the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.
Note:
The data setCUSTOMER_INSURANCE_LTV_PY
has recoded values artificially generated by OML4SQL Noise notebook, which must be run before this notebook. Specifically,MARITAL_STATUS
has divorced status coded as DIV, married coded as M. - OML4Py Data Transformation Binning: Use this template notebook to understand how to bin a numerical column and visualize the distribution.
- OML4Py Data Transformation Categorical - Convert Categorical Variables to Numeric Variables: Use this notebook to understand how to convert categorical variables to numeric variables using OML4Py. The notebooks demonstrates how to convert a categorical variable with each distinct level/value coded to an integer data type.
- OML4Py Data Transformation Normalization and Scaling: Use this template notebook to understand how to normalize and scale data using z-score (mean and standard deviation), min max scaling, and log scaling.
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. - OML4Py Data Transformation One Hot Encoding: Use this template notebook to understand how to perform one hot encoding using OML4Py. Machine learning algorithms cannot work with categorical data directly. Categorical data must be converted to numbers. This notebook uses the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.
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. - OML4Py Anomaly Detection: Use this template notebook to detect anomalous records, customers or transactions in your data. This template uses the unsupervised learning algorithm 1-Class Support Vector Machine. The notebook template builds a 1-Class Support Vector Machine (SVM) model.
- OML4Py Association Rules: Use this template notebook for market basket analysis of your data, or to detect co-occurring items, failures or events in your data. This template uses the apriori Association Rules model using the
SH
schema data (SH.SALES
). - OML4Py Attribute Importance: Use this template notebook to identify key attributes that have maximum influence over the target attribute. The target attribute in the build data of a supervised model is the attribute that you want to predict. The template builds an Attribute Importance model using the
SH
schema data. - OML4Py Classification: Use this template notebook for predicting customer behavior and similar predictions. The template builds and applies the classification algorithm Decision Tree to build a Classification model based on the relationships between the predictor values and the target values. The template uses the
SH
schema data. - OML4Py Clustering: Use this template notebook to identify natural clusters in your data. The notebook template uses the unsupervised learning k-Means algorithm on the
SH
schema data. - OML4Py Data Transformation : Use this template notebook to convert categorical variables to numeric variables using OML4Py. This template shows how to convert a categorical variable with each distinct level/value coded to an integer data type.
- OML4Py Dataset Creation: Use this template notebook to create dataset from sklearn package to OML data frame using OML4Py.
- OML4Py Feature Engineering Aggregation: Use this notebook template to fill in missing values using OML4Py. This notebook uses the
SH
schema SALES table, which contains transaction records for each customer and products purchased. Features are created by aggregating the amount sold for each customer and product pair. - OML4Py Feature Selection Supervised Algorithm Based: Use this notebook template to perform feature selection using in-database supervised algorithms using OML4Py.
- OML4Py Feature Selection Summary Statistics: Use this notebook template to perform feature selection using summary statistics using OML4Py. The notebook shows how to use OML4Py to select features based on number of distinct values, null values, proportion of constant values. The data set used here
CUSTOMER_INSURANCE_LTV_PY
has null values generated by the OML4SQL Noise notebook artificially. You must first run the OML4SQL Noise notebook before running the OML4Py Feature Selection Summary Statistics notebook. - OML4Py Partitioned Model: Use this template notebook to build partitioned models. This notebook builds an SVM model to predict the number of years a customer resides at their residence but partitioned on customer gender. It uses the model to predict the target, and then predict the target with prediction details.
Oracle Machine Learning enables automatically building of an ensemble model comprised of multiple sub-models, one for each data partition. Sub-models exist and are used as one model, which results in simplified scoring using the top-level model only. The proper sub-model is chosen by the system based on partition values in the row of data to be scored. Partitioned models achieve potentially better accuracy through multiple targeted models.
- OMP4Py REST API: Use this template notebook to invoke embedded Python execution. OML4Py contains a REST API to run user-defined Python functions saved in the script repository. The REST API is used when separation between the client and the Database server is beneficial. Use the OML4Py REST API to build, train, deploy, and manage scripts.
Note:
To run a script, it must reside in the OML4Py script repository. An Oracle Machine Learning cloud service account user name and password must be provided for authentication. - OML4Py Regression Modeling to Predict Numerical Values: Use this template notebook to predict numerical values using multiple regression.
- OML4Py Statistical Functions: Use this template notebook to use various statistical functions. The statistical functions use data from the
SH
schema through the OML4Py transparency layer. - OML4Py Text Mining: Use this template notebook to build models using Text Mining capability in Oracle Machine Learning.
In this notebook, an SVM model is built to predict customers most likely to be positive responders to an Affinity Card loyalty program. The data comes with a text column that contains user generated comments. With a few additional specifications, the algorithm automatically uses the text column and builds the model on both the structured data and unstructured text.
- OML4SQL Anomaly Detection: Use this template notebook to detect unusual or rare occurrences. Oracle Machine Learning supports anomaly detection to identify rare or unusual records (customers, transactions, etc.) in the data using the semi-supervised learning algorithm One-Class Support Vector Machine. This template notebook builds a 1Class-SVM model and then uses it to flag unusual or suspicious records. The entire machine learning methodology runs inside Oracle Autonomous Database (ADB).
- OML4SQL Association Rules: Use this template notebook to apply Association Rules machine learning technique, also known as Market Basket Analysis to discover co-occurring items, states that lead to failures, or non-obvious events. This template notebook builds associations rules models using the A Priori algorithm with the
SH.SALES
data from theSH
schema. All computation occurs inside Oracle Autonomous Database. - OML4SQL Attribute Importance - Identify Key Factors: Use this template notebook to identify key factors, also known as attributes, predictors, variables that have the most influence on a target attribute. This template notebook builds an Attribute Importance model, which uses the Minimum Description Length algorithm, using the
SH
schema data. All functionality executes inside Oracle Autonomous Database. - OML4SQL Classification - Predicting Target Customers: Use this template notebook to predict customers that are most likely to be positive responders to an Affinity Card loyalty program. This notebook builds and applies classification decision tree models using the
SH
schema data. All processing occurs inside Oracle Autonomous Database. - OML4SQL Clustering - Identifying Customer Segments: Use this template notebook to identify natural clusters of customers. Oracle Machine Learning supports clustering using several algorithms, including k-Means, O-Cluster, and Expectation Maximization. This template notebook uses the CUSTOMERS data set from the
SH
schema using the unsupervised learning k-Means algorithm. The data exploration, preparation, and machine learning runs inside Oracle Autonomous Database. - OML4SQL Data Cleaning - Removing Duplicates: Use this template notebook to remove duplicate records using Oracle SQL. The notebook uses the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance. The data set
CUSTOMER_INSURANCE_LTV_SQL
has duplicate values generated by the OML4SQL Noise notebook.Note:
You must first run the OML4SQL Noise notebook before running the OML4SQL Data Cleaning notebook. - OML4SQL Data Cleaning - Missing Data: Use this template to replace missing values using Oracle SQL and the DBMS_DATA_MINING_TRANSFORM package. The data set
CUSTOMER_INSURANCE_LTV_SQL
has missing values artificially generated by the OML4SQL Noise notebook. You must first run the OML4SQL Noise notebook before running the OML4SQL Data Cleaning notebook.Note:
When building or applying a model using in-database Oracle Machine Learning algorithms, this operation may not be needed separately if automatic data preparation is enabled. Automatic data preparation automatically replaces missing values of numerical attributes with the mean and missing values of categorical attributes with the mode. - OML4SQL Data Cleaning Outlier Removal: Use this template notebook to remove outliers using Oracle SQL and the DBMS_DATA_MINING_TRANSFORM package. The notebook uses the customer insurance lifetime value data set, which contains customer financial information, lifetime value, and whether or not the customer bought insurance. In the data set
CUSTOMER_INSURANCE_LTV
, it focuses on numeric values and removes records with values in the top and bottom 5%. - OML4SQL Data Cleaning Recode Synonymous Values: Use this template notebook to recode synonymous value of a column using Oracle SQL. The notebook uses the customer insurance lifetime value data set, which contains customer financial information, lifetime value, and whether or not the customer bought insurance. The data set
CUSTOMER_INSURANCE_LTV_SQL
has recoded values generated by the OML4SQL Noise notebook. You must first run the OML4SQL Noise notebook before running the OML4SQL Data Cleaning - Recode Synonymous Values notebook. - OML4SQL Data Transformation Binning: Use this template notebook to bin numeric columns using Oracle SQL and the DBMS_DATA_MINING_TRANSFORM package. This notebook shows how to bin a numerical column and visualize the distribution.
- OML4SQL Data Transformation Categorical: Use this template notebook to convert a categorical variable to a numeric variable using Oracle SQL. The notebook shows how to convert a categorical variable with each distinct level/value coded to an integer, and how to create an indicator variable based on a simple predicate.
- OML4SQL Data Transformation Normalization and Scale: Use this template notebook to normalize and scale data using Oracle SQL and the DBMS_DATA_MINING_TRANSFORM package. The notebook shows how to normalize data using using z-score (mean and standard deviation), min max scaling, and log scaling. When building or applying a model using in-database Oracle Machine Learning algorithms, automatic data preparation normalizes data automatically, as needed, by specific algorithms.
- OML4SQL Dimensionality Reduction - Non-negative Matrix Factorization: Use this template notebook to perform dimensionality reduction using the in-database non-negative matrix factorization algorithm. This notebook shows how to convert a table with many columns to a reduced feature set. Non-negative Matrix Factorization produces non-negative coefficients.
- OML4SQL Dimensionality Reduction - Singular Value Decomposition: Use this template notebook to perform dimensionality reduction using the in-database singular value decomposition (SVD) algorithm.
- OML4SQL: Exporting Serialized Models: Use this template notebook to export serialized models to Oracle Cloud Object Storage. This notebook creates Oracle Machine Learning regression and classification models and exports the models in a serialized format so that they can be scored using the Oracle Machine Learning (OML) Services REST API. OML Services provides REST API endpoints hosted on Oracle Autonomous Database (ADB). These endpoints enable the storing of Machine Learning models along with its metadata and create scoring endpoints for the model. The REST API for OML Services supports both Oracle Machine Learning models and ONNX format models, and enables cognitive text functionality.
- OML4SQL Feature Engineering Aggregation and Time: Use this template notebook to generate aggregated features and also extract date and time features using Oracle SQL. The notebook also shows how to extract date and time features from the field
TIME_ID
. - OML4SQL Feature Selection Algorithm Based: Use this template notebook to perform feature selection using in-database supervised algorithms. The notebook first builds a random forest model to predict if the customer will buy insurance, then it uses Feature Importance values for feature selection. It then build a decision tree model for the same classification task, and obtains split nodes. For the top splitting nodes with highest support, features associated with those nodes are selected.
- OML4SQL Feature Selection Unsupervised Attribute Importance: Use this template notebook to perform feature selection using the in-database unsupervised algorithm Expectation Maximization (EM). This notebook illustrates using the
CREATE_MODEL
function, which leverages the settings table in contrast to theCREATE_MODEL2
function used in other notebooks. - OML4SQL Feature Selection Using Summary Statistics: Use this template notebook to perform feature selection using summary statistics using Oracle SQL. The data set
CUSTOMER_INSURANCE_LTV_SQL
has null values generated by OML4SQL Noise notebook artificially. You must first run the OML4SQL Noise notebook before running the OML4SQL Feature Selection Using Summary Statistics. - OML4SQL Noise: Use this template notebook to replace normal values by null values, and to add duplicated rows. In this notebook, the data set used by the Data Preparation notebooks is prepared, in particular those for data cleaning and feature selection. It uses the customer insurance lifetime value data set which contains customer financial information, lifetime value, and whether or not the customer bought insurance.
Note:
Run theOML4SQL Noise notebook before the Data Preparation notebooks. - OML4SQL Partitioned Model: Use this template notebook to build partitioned models. Partitioned models achieve potentially better accuracy through multiple targeted models. The notebook builds an SVM model to predict the number of years a customer resides at their residence but partitioned on customer gender. The model is then used to predict the target first, and then to predict the target with prediction details.
- OML4SQL Text Mining: Use this template notebook to build models using text mining capability. Oracle Machine Learning handles both structured data and unstructured text data. By leveraging Oracle Text, Oracle Machine Learning in-database algorithms automatically extracts predictive features from the text column.
This notebook builds an SVM model to predict customers most likely to be positive responders to an Affinity Card loyalty program. The data comes with a text column that contains user generated comments. With a few additional specifications, the algorithm automatically uses the text column and builds the model on both the structured data and unstructured text.
- OML4SQL Regression: Use this template notebook to predict numerical values. This template uses multiple regression algorithms such as Generalized Linear Models (GLM).
- OML4SQL Statistical Function: Use this template notebook for descriptive and comparative statistical functions. The notebook template uses
SH
schema data. - OML4SQL Time Series: Use this template notebook to build time series models on your time series data for forecasting. This notebook is based on the Exponential Smoothing Algorithm. The sales forecasting example in this notebook is based on the
SH.SALES
data. All computations are done inside Oracle Autonomous Database.
Parent topic: Create a Notebook from the Example Templates