Forecast Custom Scores using a Notebook
Use an instructor provided notebook and demo data to create a Health score group and associate it to a score type like Health, Risk, Criticallty, End of Life. Calculate the current scoring and future forecasted scores using an historical score values provided in a csv file. Learn also how to extract future scores from third party for each asset. These instructions will be based off using the:
1.3_Create-ST-SG_FutureScores.ipynb
file with the ST demo data which included inhpu_csv_demo
orhpu_csv_st
data set at github.ibm.com/Watson-IoT/eam-hpu-lab``.
In this exercise you will use Watson Studio, MAS Health and Predict Utilities to:
- Upload the and Run the HPU Health Score Group notebook to create score group using forecast notebook template from
https://github.ibm.com/Watson-IoT/eam-hpu-lab/notebooks
. - Confirm Scoring groups have been created and scores have been calculated
- Handle Errors that may come up in the process
This notebook can only be run once per environment per site with the same set of assets.
Pre-requisites
- Ensure you have access to asset data files for the MAS Health and Predict Utilities Demo Data
- Ensure you have loaded the hpu_csv_demo data or hpu_csv_st into the Health and Predict Utilities system by completing the Load Data into Manage lab for the Utilities data.
- Upload future notebook cfg file in HPU project as a data asset. Upload
IBM-future-score-from-csv-sample-6.0.0-demo.cfg
fromhttps://github.ibm.com/Watson-IoT/eam-hpu-lab/notebooks
to HPU project.
Upload future notebook HPU project.
-
Upload the
Create Substation Transformer Future Scores
notebook from the github in thehttps://github.ibm.com/Watson-IoT/eam-hpu-lab/notebooks
to your project. -
Click 'New asset' button in the project, and filter for notebook type.
-
Choose notebook type
-
Select the
IBM-future-score-from-csv-sample-6.0.0-demo.ipynb
notebook, and then clickCreate
button. -
Save the notebook to a latest version.
-
Create a job named
Run-IBM-future-score-from-csv-sample-6-0-0-demo
for the notebook. -
Click Next, Next, Next, then Create.
-
A
Pop up
message will show indicate the job is created successfully.
-
The forecast notebook
cfg
file and notebook should upload to the configured project for HPU.
Note
Check the project id after entering a project to ensure that's the same one that's configured in system properties for HPU.
Upload Files and run the Data Loader Notebook
-
Upload the
Create Substation Transformer Future Score Groups
notebook provided by the instructor from the github repository to your project.
ClickNew asset
button in the project, and filter for notebook type. Select the1.3_Create-ST-SG_FutureScores.ipynb
notebook, and then clickCreate
button. Refer to the instructions in Upload future notebook HPU project -
Click on the
pencil
icon next to your notebook to open it in edit mode. -
If the notebook fails to start, restart it. Click on the
i
icon ,Environment
tab,Running status
dropdown select box and chooseRestart
-
Run the first code cell to import packages.
-
Fetch MX_BASE_URL and MX_APIKEY as instructued below and store it as HPU_Envs.json file in below format, then upload to ws project(If it's already prepared in previous exercises, skip this step).
{ "Instruction":{ "MX_BASE_URL":"Extract health or manage host, and replace * in https://*/maximo/, e.g Get main.manage.ivt13rel88.ivt.suite.maximo.com from https://main.manage.ivt13rel88.ivt.suite.maximo.com/maximo/oslc/graphite/relengineer/index.html", "MX_APIKEY":"Application Administration -> Go To Administration -> Integration -> API Keys -> Copy key from admin user card or add an API key if does not exist. }, "MX_APIKEY":"****", "MX_BASE_URL":"http://health-team31.fyre.ibm.com:9084/maximo/" }
-
Update the site id value to your
SITE_ID
in the second cell. -
Run the next cell to define the API call for Maximo.
-
Run the next 3 cells to define function to create the following:
-
The query that will be used to build the health scores.
-
Get the scores list and activate the scores.
-
Create the asset group, create scores for the asset group and clean up.
-
Run the next cell to create the query for the
Asset Scoring Group
. This query will be made up ofAsset Type
andSite ID
andprefix
. -
Clean up and then create the
Asset Scoring Group
using the query from the previous cell. Build the scores with future notebook, and activate the scores, trigger the calculation. Wait for 5 minutes for the calculation to finish.
Confirm Score Group and Scores
To confirm if the Score Group and Scores were created do the following:
-
Navigate to
Maximo Health and Predict for Utilities
for the provided environment. -
Go to the
Scoring and DGA Settings
application within Maximo Health and Predict - Utilities. -
Search for your
Org
orSite
. Notice that there is a score group created forSubstation Transformer Assets
. -
Click into the
Score Group
and notice all theScore Types
created via the notebook listed in theGroup Details
section, and how it's connected to the future notebook.
-
Click into any asset and see that the scores have calculated.
-
Check future scores in
Matrix Page
. Go toAssets
page, select the same query that is used in score group. Click theMatrix
icon to switch to Matrix page.
-
Click
year plus
button to check the summary information for future year, like 2023.
-
Click any cell to drill in to see the related assets in a table view. Click
year plus
button to see which assets are in this range in next year and show the next year score values in the table.
Congratulations you have learned how to use a notebook to create future score forecasts and verified the future scores in Matrix appeared.
In the next exercise you will learn how to train a WML model to forecast future score for each asset using the registered WML model in a notebook.