Machine Learning: Predict Using a Neural Network Regression Model¶
This tutorial demonstrates how to perform predictions using a multilayer perceptron trained for regression via Scikit-Learn.
Pre-requisite
The ML Training tutorial must be completed before proceeding.
1. Acquire the prediction data¶
The data used in this tutorial is taken from a recent model of small molecule adsorption to transition metal nanoparticles. Specifically, the dataset contains DFT-calculated descriptors of ·CH3, CO, and ·OH radicals on Ag, Au, and Cu nanoparticles ranging in size from 55 to 172 atoms.
This file contains the prediction data. A sample of the first 5 lines is shown below:
| CE_Local_eV | ChemPot_eV | MADS_eV |
|---|---|---|
| -2.38 | -4.96 | -2.10 |
| -3.35 | -4.96 | -2.10 |
| -4.81 | -4.96 | -2.10 |
| -4.60 | -4.96 | -2.10 |
2. Upload the data¶
Click the Dropbox button in the left sidebar to navigate to the Dropbox Page. Then click Upload:

When the browser's upload window appears, navigate to the downloaded file and select it. If successful, the file appears in the dropbox.
3. Create the ML job¶
Create a new job by clicking Create Job in the left sidebar. Give the job a descriptive name, such as "Python ML Tutorial Prediction". Then click the Actions Button and choose Select Workflow.

In the Select Workflow dialogue, search for "workflow:pyml_predict" and select it.
A diagram and detailed description of this workflow can be found here.
4. Select the dataset¶
Once the ML Predict workflow is selected, the Materials tab is replaced with a Dataset tab. Click the Actions Button and choose Select Dataset. This opens a file explorer containing all dropbox files. Select "data_to_predict_with.csv".

A preview of the data appears on the dataset tab, confirming that the data has been loaded.
5. Inspect the ML workflow¶
Open the Workflows Tab to view the predict workflow. Two subworkflows are available: Set Up the Job and Machine Learning.
The Set Up the Job subworkflow contains instructions to copy the trained model and the selected data.
Do not modify the setup subworkflow
The Set Up the Job subworkflow was automatically configured during the training process. Modifying it can render the predict workflow inoperable or lead to inaccurate prediction results.
The Machine Learning subworkflow contains the individual steps of the previously trained model. No further configuration is required — the workflow is already trained and the prediction job is ready to submit.
6. Submit the job¶
Click the check-mark in the upper right of the job designer, in the Header Menu, to save the job. Then run the job.
7. Analyze the prediction results¶
After a few minutes, the job completes. The Results tab displays a CSV preview of predictions.csv, containing the row-by-row predictions generated by the model. This file is generated inside the Model Train and Predict unit.
8. Video walkthrough¶
This tutorial is demonstrated in the following animation: