1.0 Introduction
Fortanix Confidential Artificial Intelligence (AI) is a service for developing and deploying AI models on sensitive data using confidential computing. This service provides multiple stages of the data pipeline for an AI project and secures the following stages using confidential computing which ensures that the data can be processed, and models can be developed while keeping the data confidential even when in use.
2.0 Prerequisites
- A user signed in to a Confidential AI account.
For instructions on how to sign up and log in, refer to our User’s guide: Sign up for Confidential AI.
3.0 Data Ingestion
This is the first stage, where the data will be collected either by connecting to an S3 bucket or uploading a file to the Confidential AI platform.
3.1 About the Data
Churn prediction determines the customers that are at high risk of leaving your company or cancelling a subscription to a service, based on their behavior with your product.
The data set includes the following information:
- Customers who left within the last month – the column is called Churn.
- Services that each customer has signed up for – phone, multiple lines, internet, online security, online backup, device protection, tech support, and streaming TV and movies.
- Customer account information – how long they have been a customer, contract details, payment methods, paperless billing, monthly charges, and total charges.
- Demographic information about customers – gender, age range, and if they have partners and dependents.
3.2 Collect the Data
Perform the following steps to collect the data on Confidential AI platform:
- On the Data Ingestion page, click CREATE DATASET, and select CSV Dataset option.
- In the CREATE DATASET form, enter the following details:
- Dataset Name: Enter the name of the dataset. For example,
churn_prediction
. - Description: Enter the details of the dataset.
- File Type:
- Upload a File: Select the Upload a file option to upload your data directly to the Fortanix Confidential AI platform.
Figure 1: Upload File Details - S3 URL: Select the S3 URL to bring your data by connecting to an S3 account.
- S3 Bucket URL: Enter the URL of the image in the S3 bucket.
- Access Key ID: Enter the Access Key ID for Confidential AI to be able to access the data on your S3 bucket.
- Secret Key: Enter the Secret Key for Confidential AI to be able to access the data on your S3 bucket.
- Encryption Key: Enter the encryption key that was used to encrypt the file on your S3 bucket (User’s Guide: Prepare your S3 Bucket).
For more details on how to prepare your S3 bucket for Confidential AI, refer to the User's Guide: Preparing Your S3 Bucket for Confidential AI.
Figure 2: S3 URL Details
- Upload a File: Select the Upload a file option to upload your data directly to the Fortanix Confidential AI platform.
- Detected headers: The headers (column names) are self-detected and displayed when CSV dataset is selected.
- Labels:
- Add Labels: To track what the data is used for; you can optionally add Labels in the form of “Key:Value” pairs.
- Dataset Name: Enter the name of the dataset. For example,
- Click the CREATE DATASET button to save the data.
For a more detailed guide about the Confidential AI data ingestion process, refer to the User's Guide: Data Ingestion.
4.0 Data Preparation
Perform the following steps to prepare the data to apply algorithms on it.
- On the Data Preparation page, click the ADD VARIABLES button to select the features and target.
- Select one or more features and target from the SET A FEATURE and SET A TARGET column respectively for the model training phase. These features and targets are called Variables. For example, in the churn prediction, all the features are the Variables while the Churn column is the Target.
- For each set of features (X), you can choose only one target (Y).
- Click ADD to add the variables.
- The variables are added, click the SAVE button to save the variables.
For a more detailed guide about the Confidential AI data preparation process, refer to the User's Guide: Data Preparation.
Figure 3: Variable Dialog Box
5.0 Add a Model
On the Add Model page, click the ADD MODEL button and select Build Model option from the drop down menu. With this option, you can choose to run a selection of pre-curated AI algorithms on the datasets defined in the previous phases, to analyze and build AI models.
- For more details about the AI algorithms, refer to Confidential AI-Algorithms.
- For more details about building a model, refer to User’s Guide: Build a Model.
Figure 4: Add Model
6.0 Build a Model
Perform the following steps to build a model:
- On the Add Models page, click the ADD MODEL button to add a new model and select Build Model to build a training model for the dataset created in Section 4.0 - Data Preparation.
- In the BUILD A MODEL form, enter the following details:
- Training flow name: Enter the name of the model such as
churn_prediction
. - Training Dataset: Select the training dataset on which you want to run the AI algorithm and build a trained model.
- Algorithm: Select the algorithm that you want to run on the training dataset to get a trained model.
- Select ML variables: Select ML variables that you created in the Data Preparation phase.
- Model:
- Model name: Enter the name of the output dataset. This is the output model that will be used in the data inference phase.
- Description: Enter the details of the model.
Figure 5: Build Model Dialog Box
- Training flow name: Enter the name of the model such as
- Click the BUILD MODEL button to run the selected algorithm on the training data and build the model for inference.
- To run the training model, click the RUN button below the model.
- After the execution is completed successfully, the model is now trained and ready. Click the execution log status message to view and download the execution log report.
7.0 Data Inference
In this stage, the data is passed through a machine learning model to identify and predict the output from the data.
Perform the following steps:
- In the INFERENCE tab, click the BUILD INFERENCE option to predict the data output.
- Inference flow name: Enter the name of the inference flow and select the inference dataset in the Input dataset.
- Select Model:
- Model: Select the trained model that was built in Section 6.0 – Build a Model.
- Select a model: Select the required model from the drop down menu.
- Select input database: Select the required input database from the drop down menu.
- Output Configuration:
- Output name: Enter a name for the output dataset that will contain the predicted output.
- The Encrypt Dataset option is selected by default to generate an encryption key and add an extra layer of protection to the output data. Copy or download the key to decrypt the output data for viewing.
Figure 6: Inference Dialog Box
- Click the CREATE INFERENCE FLOW to pass the data through a machine learning model and predict the output.
- After the inference is successfully created, click the RUN button below the inference workflow to run the model and predict the output.
Figure 7: Run Screen
8.0 Run Inference
When the model was executed successfully, the status of the execution is shown under the Execution Log.
- Click the Execution Log link to view the log details.
-
After the execution is completed successfully, the output is now predicted and ready to be viewed.
-
To view the output, click the DOWNLOAD button.
- In the DOWNLOAD dialog box, enter the decryption key to decrypt the output.
- A
*.tar
file is generated on your local machine. Extract the contents of the file to view the Churn predictions from the model.
Figure 8: Output Screen
Comments
Please sign in to leave a comment.