Downloading the Machine Learning model

You download the Mortgage Approval Prediction Model to extend the Miniloan sample with Machine Learning.

Before you begin

You must download the model from IBM Cloud Pak® for Data External link opens a new window or tab. You must have an account with IBM Cloud Pak for Data External link opens a new window or tab to use the resource. If you do not have an account, contact your IBM® representative for an account.
In your IBM Cloud Pak for Data instance, create the following required resources if you do not have them:
  • Cloud Object Storage
  • Watson Machine Learning
  • watsonx.ai™ Studio
Note: In IBM Cloud Pak for Data, you must set your region to Dallas(us-south) for this example.

About this task

Miniloan is a web-based application that a fictitious lender uses to check the eligibility of potential borrowers. Loan requests are assessed based on several criteria. In this example, you add a Machine Learning model, Mortgage Approval Prediction Model, to the application. It determines the probability of a person getting a loan based on their profile.

Procedure

To download the model:

  1. Open IBM Cloud Pak for Data External link opens a new window or tab, and set your IBM Cloud® region to Dallas(us-south).
  2. Open the Navigation Menu "" in the top left corner, and click Projects > View all projects.
  3. Click New project.
  4. Click Sample.
  5. Click the tile named Evaluate an ML model.
  6. Click the Create button to create the project with the ML model. View the import summary and ensure that the project is created successfully.
  7. Click Mortgage Approval Prediction Model, which is available in the Asset section.
  8. Click the Promote to space button to deploy the model.
  9. Choose an existing deployment space, or name a new one, in the Target space field.
  10. From the Navigation Menu "" in the top left corner, choose Deployments.
  11. Select your deployment space.
  12. Choose Mortgage Approval Prediction Model.
  13. Click the New deployment button.
  14. Give the deployment a name and choose Online as the type.
  15. Click the Create button.
  16. Click your deployment in the list.
  17. On the API reference page, the public and private endpoint of the deployment are displayed.
  18. Copy the value of the public endpoint field. You use this value later to make a separate note of this part of the URL:
    https://us-south.ml.cloud.ibm.com/ml/v4/deployments/
    30d8221b-47ad-48d1-8b68-2f042474ff91
    predictions?version=2021-05-01
  19. Note down the deployment ID (for example, 30d8221b-47ad-48d1-8b68-2f042474ff91).
  20. Click your deployment space in the breadcrumbs at the top of the browser window: Deployments / <your deployment space>.
  21. Click the arrow button "" above the tray at the top right.
  22. Choose Export space.
  23. Click the New export file button.
  24. Give a name for your export file and select the check box next to Mortgage Approval Prediction Model.
  25. Click the Create button.
  26. From the entry that appears in the table, hover over it and click the Download button to the right of the entry.
  27. Open the download directory on your computer and locate the file with the name you chose. Open the compressed (.zip) file.
  28. Inside the compressed file, navigate to assets/.METADATA.
  29. Extract the file wml_model in the directory. It contains the details of your data model. It is not well formatted. To view it, you can use it any JSON formatter of your choice. It can be left unformatted if you do not want to inspect it.

What to do next

In the next task, you integrate the Machine Learning model into the Miniloan service.