As more and more computational resources are being moved to the 'cloud', the separation between 'data', 'knowledge' and 'engines' becomes more critical. This assignment shows, from the inside, the workings of a distributed knowledge-driven architecture. You will download and execute a 'predictive model' engine, deploy a knowledge artifact in your running engine, and feed data to the model to get predictions in response. Prerequisites: Download and install the REST client 'Insomnia' for your platform from https://insomnia.rest (Links to an external site.) You may find this Insomnia tutorial (Links to an external site.) useful, especially Step 3 for the steps marked as "GET", and Step 5/6 for the steps marked as "PUT/POST" Ensure you have Java installed on your personal computer See this tutorial (Links to an external site.) on how to install Java 11 Download 'OpenScoring.jar' from Canvas and launch it From Windows Explorer: Right Click on the downloaded openscoring.jar file "Open with..." choose "Java (tm) Platform" At this point, Openscoring will be active on your machine, and you will be able to use Insomnia to interact with it. Openscoring is an 'engine' that can run predictive models, usually the product of data mining/machine learning algorithms, which are expressed using the PMML language (Links to an external site.) for interoperability. PMML is a standard that is gaining adoption even in major EHR sytems, and allows to use "AI" models in combination with more traditional decision support tools, such as CDS rules or scorecards/calculators. We will interact with the engine through a WEB service, even if it runs on your computer: instead of connecting to some 'www' site, we will connect to 'localhost:8080', which is how your computer sees itself on the network. Insomnia, like our browsers, will allow us to "GET" information from the server, or "PUT/POST" (send) it. Step 1: Configuring the Engine Check OpenScoring is running by successfully submitting the following request through Insomnia GET localhost:8080/openscoring You should get a { "message" : "Not Found" }. Despite the 'Not Found', it means the server is running and is ready to accept requests See what happens when a request cannot be satisfied, e.g. using GET localhost:8080/nonexistingserver. You will get a "404 Error" Step 2: Acquiring and deploying the Model Get a PMML predictive model from a repository on the web (A Decision Tree for the IRIS dataset) {5pts} You can download it through Insomnia, or just through your browser GET http://dmg.org/pmml/pmml_examples/KNIME_PMML_4.1_Examples/single_iris_dectree.xml Save it as a file on your computer Open the XML file with a browser, or with an advanced editor such as Wordpad (not Notepad!), and Deploy the file from your local folder into Openscoring {10pts} PUT http://localhost:8080/openscoring/model/Iris Add a 'binary file' data, and choose the model file you just saved Set the header 'Content-type' to 'text/xml' Make sure the model is properly loaded Get the list of deployed models : GET http://localhost:8080/openscoring/model Get the Iris model : GET http://localhost:8080/openscoring/model/Iris Get back the PMML : GET http://localhost:8080/openscoring/model/Iris/pmml Step 3: Evaluate the model Evaluate the model on some data {10pts} Download the input file input.csv from Canvas Submit the data for evaluation : POST http://localhost:8080/openscoring/model/Iris/csv Add the input.csv file as body Set the 'Content-type' header to 'text/plain' You should get 'Iris-versicolor' as a prediction outcome Try changing the values in input.csv Can you see the actual classification criteria in the PMML file? Step 4: Submission Export the Insomnia workspace