You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 3, 2024. It is now read-only.
* Edit the `Output Schema` and set it as follows and click `Apply`:
@@ -219,29 +218,33 @@ The output now contains just the customer_id and an array indicating which produ
219
218
* Click on the deployment operator to edit the settings.
220
219
* Under `DEPLOYMENT INPUT PARAMETERS`, set `input_cart (array)` to `cart_list`. This maps our Code output array to the expected input parameter for prediction.
221
220
* Edit the `Output schema`.
222
-
* Click `Add attributes from incoming schema`.
223
221
* Click `Add attribute +`.
224
222
* Set `Attribute Name` to `prediction`.
225
223
* Set `Type` to `Number`.
226
224
* Set `Model Field` to `prediction`.
225
+
* Click `Add attributes from incoming schema`.
227
226
228
227
#### Add Debug operator as target
229
228
230
229
For simplicity, we will assign a `Debug` operator as the target of our WML Deployment.
231
230
232
-
From the `Targets` list, select and drag the `Debug` operator onto the canvas, and then connect the two object together.
231
+
* From the `Targets` list, select and drag the `Debug` operator onto the canvas, and then connect the two object together.
232
+
233
+
#### Save and run
233
234
234
-
#### Run the streams flow
235
+
* Click the `Save and run` icon to start your flow.
235
236
236
-
Click the `run` button to start the flow.
237
+
This will result in a new panel being displayed that shows real-time metrics. What is displayed is a live data stream. If you click on the stream between any two operator nodes, you can see the actual data - in a table view or in JSON format.
237
238
238
-
#### Save and run
239
+

240
+
241
+
If you watch the output stream from the `Code` operator, you'll see that we used some Python code to build an array indicating which products are in each customer's cart. This is the format we needed for the next operator.
239
242
240
-
Click the `Save and run` icon to start your flow. This will result in a new panel being displayed that shows real-time metrics. What is displayed is a live data stream. If you click on the stream between any two operator nodes, you can see the actual data - in a table view or in JSON format.
243
+
If you watch the output stream from the Watson Machine Learning Deployment operator, you'll see that we used the k-means model (that we built and deployed) to add a `prediction` column to the data. This prediction indicates that this customer's cart is similar to other carts in this group. We could use this prediction to recommend products based on what other customers in this group frequently bought.
For now, the `Debug` operator is where we'll stop. We wanted to demonstrate enriching data-in-motion with a machine learning model. Using a sample datasource and debug output allowed us to do that. Of course, a production application would use a real live data stream as input and would make the product recommendation available to customers in real-time. Source and target operators such as Kafka, MQTT, databases and also IBM Streams are typically used for this.
243
246
244
-
Use the `Stop` icon to stop the flow, and the `Pencil` icon to return to the flow editor.
0 commit comments