Overview
This is a Transform type Snap that enables you to predict the target (label/class) field for an unlabeled document. An unlabeled document is one that does not have a class field. So, the Snap reads this unlabeled document and predicts the class field. Predictions are made based on the classification model built by the Trainer (Classification) Snap.
You can configure the Snap to include the confidence level for the prediction. You can additionally specify if the Snap shows multiple predictions for a given input.
Input and Output
Expected input: An unlabeled document and the classification model for predicting the target field.
Expected output: Predictions from the classification model based on the input document. Multiple predictions are displayed depending upon the configuration of the Max output property. Additionally, the confidence level for each prediction is displayed if the Confidence level property is selected.
Expected upstream Snaps:
- First input view: Any Snap that generates an unlabeled document is usable as an upstream Snap. For example, JSON Parser, JSON Generator, CSV Parser, CSV Generator, Mapper, and so on.
- Second input view: Any Snap that reads and outputs the classification model. For example, a combination of File Reader, and JSON Parser.
Expected downstream Snaps: Snaps that write the output to a file. For example, a combination of JSON Formatter and File Writer.
Prerequisites
The input document must be in tabular format (no nested structure).
Configuring Accounts
Accounts are not used with this Snap.
Configuring Views
Input | This Snap has exactly two document input views. The first input view is for the unlabeled document that requires prediction(s). The second input view is for the classification model to be used for the prediction. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
None.
Limitations and Known Issues
None.
Modes
- Ultra pipelines: Works in Ultra pipelines.
- Spark mode: Does not work in Spark mode.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. |
---|---|
Max output | Required. The maximum number of predictions for each row in the input document. The predictions are in descending order of their confidence level. Minimum value: 1 Default value: 1 |
Confidence level | If selected, the Snap's output includes the confidence level for each prediction. The maximum value is 1. The prediction with the confidence level that is closest to 1 is the most likely to be the correct target field. Default value: Not selected |
Examples
Weight Balance Classification – Testing
The model trained in the Weight Balance Classification – Model Training example pipeline is tested against an unlabeled dataset.
Download this pipeline.
To understand the dataset and the process prior to testing the model see the following examples:
Additional Example
The following use case demonstrates a real-world scenario for using this Snap:
Downloads