Machine Learning: Predict Using a Neural Network¶
In order to perform this tutorial, the ML Training tutorial must be completed.
1. Acquire Data¶
The data we use in this tutorial is taken from a recent model of small molecule adsorption to transition metal nanoparticles. Specifically, we use DFT-calculated values for the adsorption energy of ·CH3, CO, and ·OH radicals to Ag, Au, and Cu nanoparticles ranging in size from 55 to 172 atoms.
This File contains the data we will use in this tutorial for predictions. A sample of the first 5 lines in the file can be found below:
2. Upload the Data¶
Then, when the browser's upload window appears, we navigate to where we downloaded the file in section 1, and select it for upload. If the upload was successful, the file will then be visible in the dropbox.
Take note of the name of the file. For the purposes of this tutorial, it should be named
3. Create the ML Job¶
First, we will give the job a friendly name, such as "Python ML Tutorial Prediction" (see below). Then, we will click the Actions Button (the three vertical dots in the upper-right of the job designer), and choose "Select Workflow."
This will bring up the Select Workflow dialogue. We then search for "workflow:pyml_predict" and click on it to bring it into our account.
4. Configure the ML Workflow¶
We now have our ML workflow selected. Select the Workflows Tab, and we can see our predict workflow.
We can see two subworkflows available:
Set Up the Job
Specify the Prediction Data¶
We will first configure the
Set Up the Job workflow to accept our predict data.
Begin by selecting the "Declare Predict Data" workflow unit, circled below:
We can now see the "Declare Predict Data" IO unit. Because we named our file in dropbox
earlier, we do not need to modify this unit. In a scenario where we wanted to use a different file name for our predict
data, the Workflow Designer could be used to modify the value.
A Word of Caution
The only modifications that should be made in the
Set Up the Jobsubworkflow are the filenames in the "Declare Training Data" and "Declare Predict Data" IO units. The
Set Up the Jobsubworkflow is automatically re-configured during the training process. Modifying other values, or adding/removing workflow units to this subworkflow, can disrupt creation of the Predict workflow.
We will then close the Declare Predict Data IO unit by clicking on the "X" in the dialogue's upper right corner. This will bring us back to the Workflows Tab.
6. Submit the Job¶
We can now run the job and wait for it to complete.
7. Analyze the Prediction Results¶
After a few minutes, the job will complete. In the files tab, we can find a new file called "predictions.csv", which contains the predictions generated by this model. Under the hood, this model is created inside of the Train/Predict workflow unit.
This tutorial is demonstrated in the following animation: