Icon

01 Credit scoring training workflow

Training workflow. This workflow accesses the training data from a file, splits and preprocesses it, and trains the credit scoring model.
Step 1. Capture the segments for the prediction workflow

  1. Capture the metanode Data Preprocessing (Apply) and the predictor Gradient Boosted Trees Predictor with the Capture Workflow Start and Capture Workflow End nodes. These nodes don't require configuration but require you to add the correct Table ports.

  2. Define the input explicitly for a better control of the API definition of the prediction workflow*:

    • Add the Container Input (Table) node after the Capture Workflow Start node.

      • Set input table (with the filtered columns) as template, use only 3 rows

      • Omit table spec in API definition


* We need to provide Container Input (Table) node with the template table - how the new data will look during predictions. These data won't have two columns present in the training data: SeriousDlqin2yrs (the target column) and LoanPeriodStart (not available for those who hasn't got a loan yet). Column Splitter node splits those columns and the Column Appender adds them back later for the model evaluation.



Part 1 - Deployment fundamentals

Exercise workflow 01 Credit scoring training workflow

Learning objective: In this exercise you'll learn how to use integrated deployment to capture prediction segments of a training workflow and how to upload, version, and deploy an automatically created prediction workflow on KNIME Business Hub.


Workflow description: Training workflow. This workflow accesses the training data from a file, splits and preprocesses it, and trains the credit scoring model.

  • The preprocessing and predicting parts are captured and saved as an automatically created prediction workflow.

  • Additionally, it uploads the automatically captured and created prediction workflow directly to the KNIME Business Hub.


You'll find the instructions to the exercises in the yellow annotations.

Step 2. Save the prediction workflow

  1. Connect the Captured Workflow Port Object with the Workflow Writer node

    • Write the workflow to the Prediction workflow folder in Part 1 folder

    • Use custom workflow name: prediction-workflow

    • In the tab Inputs and outputs:

      1. select None for the input node (we added the Container Input (Table) in step 1)

      2. select Container Output (Table) to be added automatically as an output node



Step 5. Upload the prediction workflow directly from the training workflow

  1. Connect to the KNIME Business Hub using the Space Connector node

    • Select Other space and browse your user space*

  2. Upload the workflow with the Workflow Writer node

    1. Add the File System Connection port and connect to the Space Connector

    2. Select the same output location where you uploaded the prediction workflow manually

    3. Overwrite the prediction workflow that you uploaded manually

    4. Use custom workflow name: prediction-workflow


* You should be connected to a Business Hub instance from the KNIME Analytics Platform



Step 6. Deploy the prediction workflow as a service

  1. On KNIME Business Hub, explore the workflow you have just uploaded and create a new version

  2. Deploy the prediction workflow as a service:

    1. On the workflow page, click Deploy and Create service

    2. Give your deployment a name, select the version you have just created, and the available execution context* and click Create

  3. On the workflow page, find the created deployment, click three dots actions button and click Manage access

    • In the new menu, you can share the deployment with its users. Share it with yourself.


* If there is only one execution context available, it will be selected by default and won't be modifiable

Step 3. Connect to KNIME Business Hub and explore

  1. Receive KNIME Business Hub instance URL and your personal credentials from the trainers

  2. Connect to KNIME Business Hub from web browser:

    1. Open https://edu-hub.knime.com/ in your web browser

    2. Provide your credentials

  3. Explore the KNIME Business Hub UI:

    • Explore your team page (check which spaces are visible to you, the team members, and team deployments)

    • Explore your user space (Note that it is private, check for whom else it is visible)

  4. Connect to KNIME Business Hub from KNIME Analytics Platform

    1. Click the button Preferences at the top-right corner

    2. In the new window, in the list on the left side, select KNIME Explorer

    3. In the same window, on the right, click New

    4. In the new window, select KNIME Hub, provide the Hub instance URL, click OK

    5. Click Apply and Close

    6. The Hub mountpoint appeared in the Home page

    7. Click Connect to connect

    8. Explore how teams and spaces on the KNIME Business Hub in the web browser correspond to to teams and spaces in the Explorer in KNIME Analytics Platform

Step 4. Upload and version the prediction workflow on KNIME Business Hub

  1. Upload the Prediction workflow folder with the workflow created in step 2 to your user space on knime-edu-hub

    1. Right click on the workflow in the Explorer and select Upload

    2. Select knime-edu-hub, the course team, and your user space

    3. Make sure to reset the workflow before uploading

  2. Create new version of your workflow on KNIME Business Hub

    1. On the workflow page, click Versions

    2. In the new menu, click Create version and provide a name and description

    3. Explore what happens when you select this version

Add target columnfor evaluation
Column Appender
Data Preprocessing (Apply)
Select the period from where to take the training data
Date&Time-based Row Filter
75% training 25% test
Partitioning
Space Connector
XGBoost Predictor
Data Preprocessing
Historical customer data for existing customers
Table Reader
XGBoost Tree Ensemble Learner
Capture Workflow End
Remove the columns that won'tbe present in the new dataduring the prediction:SeriousDlqin2yrs (target column)LoanPeriodStart (available forexisting customers)
Column Splitter
Capture Workflow Start
Scorer
Container Input (Table)
Workflow Writer

Nodes

Extensions

Links