cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Operationalize an Analytics Model Guide Part 2

100% helpful (1/1)

 

 

Step 5: Create Event

 

Events are automatic analysis jobs which are submitted based on a pre-defined condition.

In this step, we'll configure an Analysis Event which will execute automatically whenever there is a datachange in our simulated engine.

 

  1. On the ThingWorx Composer Analytics tab, click ANALYTICS MANAGER > Analysis Events.

    27-mds-data-table-thing-properties.png

     

  2. Click New....

    28_am_new_event_popup.png

     

  3. In Source, search for and select AMQS_Thing.
  4. In Event, select DataChange.
  5. In Property, select FlipFlop.
  6. In Provider Name, select Vibration_Provider.
  7. In Model Name, select the published Model.

    29_am_event_popup_filled_out.png

     

  8. Click Save.

    12-amv92-new-event.png
     

     

Map Event Data

 

Map the Properties of AMQS_Thing, to the fields required to evoke an Analysis Job.

 

  1. Select the previously-created Event, and click Map Data....

    31_am_event_map_popup.png

     

  2. Click Inputs Mapping.

    32_am_mapping_popup_inputs.png

     

  3. In Source Type, select Thing.
  4. In Source, search for and select AMQS_Thing.

    33_am_mapping_inputs_thing_amqs.png

     

  5. On the left, select s1_fb1, one of the sub-fields of AMQS_Thing's InfoTable Property.
  6. On the right, select _s1_fb1, the first frequency band required for the Model to make a prediction.

    06-av84-map-s1-fb1.png

     

  7. Click the Map button in the center.

    07-av84-do-map.png

     

  8. Repeat this mapping process for for s1_fb2 through s1_fb5.

    08-av84-map-other-inputs.png

     

  9. Map causalTechnique in the same manner.
    • This is a String Property in AMQS_Thing with a Default Value of FULL_RANGE, the same technique we used in our earlier true/false testing.
  10. Map goalName to goalField in the same manner.

    • This is a String Property in AMQS_Thing with a Default Value of low_grease, the same goal we used in our earlier testing.

    09-av84-map-rest.png

     

  11. Click Results Mapping on the left.

    39_am_results_mapping_selected.png

     

  12. Map _low_grease to Result_low_grease.

    40_am_low_grease_bool_mapped.png

     

  13. Map _low_grease_mo to Result_low_grease_mo.

    41_am_low_grease_number_mapped.png

     

  14. Click Close to close the mapping pop-up.

 

Enable Event

 

Now that we've done the mapping from Foundation to Analytics, let's confirm that everything is correct.

 

If so, we'll then Enable the Analysis Event so that it can automatically generate and process Analysis Jobs.

 

  1. Select the mapped Analysis Event.

    26-mam-mapped-event.png

     

  2. Click View....
    27-mam-event-view.png

     

  3. Click Inputs Mapping and confirm that all mappings are correct.

    28-mam-inputs-maping.png

     

  4. Click Results Mapping and confirm that all mappings are correct.

    29-mam-results-mapping.png

     

  5. At the top-left, expand the Actions... drop-down.
    30-mam-actions-drop-down.png

     

  6. Select Enable.
    31-mam-event-enable.png

     

Now that you have enabled the Analysis Event, whenever AMQS_Thing's InfoTable Property changes, the new data will be submitted to Analytics Manager.

 

An Analysis Job will automatically run, with a predictive score sent back and stored in AMQS_Thing's Result_low_grease (Boolean) and Result_low_grease_mo (Number) Properties.

 

 

 

Step 6: Test Model

 

In this step, we'll confirm that the automatic analysis of information coming from remote devices is operational.

 

  1. On the ThingWorx Composer Analytics tab, click ANALYTICS MANAGER > Analysis Jobs.

    13-mv92-analysis-jobs.png

     

  2. Uncheck Filter Completed Jobs.

    33-mam-filter-completed-jobs.png

     

  3. Select a Job and click View....
  4. Click Results.

    34-mam-results.png


    NOTE: You will see true or false, just as when you manually tested the Model, so you know that Analytics Manager is now automatically submitting and completing jobs with a resulting prediction.

Test Mashup

 

Follow these steps to confirm that the results are being sent back to ThingWorx Foundation in a way in an actionable way.

 

  1. Return to the AMQS_Mashup browser tab.
  2. Wait at least ~20 seconds to see multiple cycles of good and bad data (which should generate a false or true result from Analytics Manager).
  3. Note the Text Field Widgets on the right now have data.
    04-oam-false-mashup.png

     

  4. This analytical result is coming from Analytics Manager, and is the exact same output you saw in ANALYSIS JOBS.
    03-oam-view-mashup.png

     

Using this technology, you could create a paid customer service, where you offered to monitor remote engines, in return for automatically shutting them down before they experience catastrophic engine failure.

 

For that example implementation, you would utilize the AMQS_Thing.Result_low_grease BOOLEAN Property to trigger other actions.

 

For instance, you could create an Alert Event which would be triggered on a true reading.

 

You could then have a Subscription which paid attention to that Alert Event, and performed an action, such as sending an automatic shutdown command to the engine when it was experiencing a likely low grease event.

 

NOTE: We recommend that you return to the ThingWorx Composer Analytics > ANALYTICS MANAGER > Analysis Events tab and Disable the Event prior to continuing. Since the simulator generates an Event every ~10 seconds, this can create a large number of Events, which can fill up your log.

 

 

 

Step 7: Next Steps

 

Congratulations. You've completed the Operationalize an Analytics Model guide.

In this guide you learned how to:

 

  • Define an Analysis Provider that uses the built-in Analytics Server Connector
  • Publish a Model from Analytics Builder to Manager
  • Create an Analysis Event which takes data from ThingWorx Foundation and decides whether or not a failure is likely

 

This is the last guide in the Design and Implement Data Models to Enable Predictive Analytics learning path.

 

Learn More

 

We recommend the following resources to continue your learning experience:

 

   
CapabilityGuide
BuildImplement Services, Events, and Subscriptions Guide

 

Additional Resources

 

If you have questions, issues, or need additional information, refer to:

 

   
ResourceLink
CommunityDeveloper Community Forum
SupportAnalytics Manager Help Center
Version history
Last update:
‎Nov 29, 2022 02:55 PM
Updated by:
Labels (1)
Contributors