{"id":395464,"date":"2024-06-29T12:14:24","date_gmt":"2024-06-29T12:14:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=395464"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=395464","title":{"rendered":"<span>InterSystems IRIS \u2013 the All-Purpose Universal Platform for Real-Time AI\/ML<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">Author: Sergey Lukyanchikov, Sales Engineer at InterSystems<\/p>\n<h4>Challenges of real-time AI\/ML computations<\/h4>\n<p>  We will start from the examples that we faced as Data Science practice at InterSystems:<\/p>\n<ul>\n<li>A \u201chigh-load\u201d customer portal is integrated with an online recommendation system. The plan is to reconfigure promo campaigns at the level of the entire retail network (we will assume that instead of a \u201cflat\u201d promo campaign master there will be used a \u201csegment-tactic\u201d matrix). What will happen to the recommender mechanisms? What will happen to data feeds and updates into the recommender mechanisms (the volume of input data having increased 25000 times)? What will happen to recommendation rule generation setup (the need to reduce 1000 times the recommendation rule filtering threshold due to a thousandfold increase of the volume and \u201cassortment\u201d of the rules generated)?<\/li>\n<li>An equipment health monitoring system uses \u201cmanual\u201d data sample feeds. Now it is connected to a SCADA system that transmits thousands of process parameter readings each second. What will happen to the monitoring system (will it be able to handle equipment health monitoring on a second-by-second basis)? What will happen once the input data receives a new bloc of several hundreds of columns with data sensor readings recently implemented in the SCADA system (will it be necessary, and for how long, to shut down the monitoring system to integrate the new sensor data in the analysis)?<\/li>\n<li>A complex of AI\/ML mechanisms (recommendation, monitoring, forecasting) depend on each other\u2019s results. How many man-hours will it take every month to adapt those AI\/ML mechanisms\u2019 functioning to changes in the input data? What is the overall \u201cdelay\u201d in supporting business decision making by the AI\/ML mechanisms (the refresh frequency of supporting information against the feed frequency of new input data)?<\/li>\n<\/ul>\n<p>  <a name=\"habracut\"><\/a>Summarizing these and many other examples, we have come up with a formulation of the challenges that materialize because of transition to using machine learning and artificial intelligence in real time:<\/p>\n<ul>\n<li>Are we satisfied with the creation and adaptation speed (vs. speed of situation change) of AI\/ML mechanisms in our company?<\/li>\n<li>How well our AI\/ML solutions support real-time business decision making?<\/li>\n<li>Can our AI\/ML solutions self-adapt (i.e., continue working without involving developers) to a drift in the data and resulting business decision-making approaches?<\/li>\n<\/ul>\n<p>  This article is a comprehensive overview of InterSystems IRIS platform capabilities relative to universal support of AI\/ML mechanism deployment, of AI\/ML solution assembly (integration) and of AI\/ML solution training (testing) based on intense data flows. We will turn to market research, to practical examples of AI\/ML solutions and to the conceptual aspects of what we refer to in this article as real-time AI\/ML platform.<\/p>\n<h4>What surveys show: real-time application types<\/h4>\n<p>  The results of the <a href=\"https:\/\/www.lightbend.com\/white-papers-and-reports\/survey-streaming-data-future-tech-stack\">survey<\/a> conducted by Lightbend in 2019 among some 800 IT professionals, speak for themselves:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/l3\/nq\/td\/l3nqtd8zvvs_wadzx8u3acjpqai.png\" data-src=\"https:\/\/habrastorage.org\/webt\/l3\/nq\/td\/l3nqtd8zvvs_wadzx8u3acjpqai.png\"\/><br \/>  <i>Figure 1 Leading consumers of real-time data<\/i><\/p>\n<p>  We will quote the most important for us fragments from the report on the results of that survey:<\/p>\n<p>  \u201c\u2026 The parallel growth trends for streaming data pipelines and container-based infrastructure combine <br \/>  to address competitive pressure to deliver impactful results faster, more efficiently and with greater agility. Streaming enables extraction of useful information from data more quickly than traditional batch processes. It also enables timely integration of advanced analytics, such as recommendations based on artificial intelligence and machine learning (AI\/ML) models, all to achieve competitive differentiation through higher customer satisfaction. Time pressure also affects the DevOps teams building and deploying applications. Container-based infrastructure, like Kubernetes, eliminates many of the inefficiencies and design problems faced by teams that are often responding to changes by building and deploying applications rapidly and repeatedly, in response to change. \u2026 Eight hundred and four IT professionals provided details about applications that use stream processing at their organizations. Respondents were primarily from Western countries (41% in Europe and 37% in North America) and worked at an approximately equal percentage of small, medium and large organizations. \u2026<\/p>\n<p>  \u2026 Artificial intelligence is more than just speculative hype. Fifty-eight percent of those already using stream processing in production AI\/ML applications say it will see some of the greatest increases in the next year.<\/p>\n<ul>\n<li>The consensus is that AI\/ML use cases will see some of the largest increases in the next year.<\/li>\n<li>Not only will adoption widen to different use cases, it will also deepen for existing use cases, as real-time data processing is utilized at a greater scale.<\/li>\n<li>In addition to AI\/ML, enthusiasm among adopters of IoT pipelines is dramatic \u2014 48% of those already incorporating IoT data say this use case will see some of the biggest near-term growth. \u2026 \u201c<\/li>\n<\/ul>\n<p>  This quite interesting survey shows that the perception of machine learning and artificial intelligence scenarios as leading consumers of real-time data, is already \u201cat the doorstep\u201d. Another important takeaway is the perception of AI\/ML through DevOps prism: we can already now state a transformation of the still predominant \u201cone-off AI\/ML with a fully known dataset\u201d culture.<\/p>\n<h4>A real-time AI\/ML platform concept<\/h4>\n<p>  One of the most typical areas of use of real-time AI\/ML is manufacturing process management in the industries. Using this area as an example and considering all the above ideas, let us formulate the real-time AI\/ML platform concept.<\/p>\n<p>  Use of artificial intelligence and machine learning for the needs of manufacturing process management has several distinctive features:<\/p>\n<ul>\n<li>Data on the condition of a manufacturing process is generated very intensely: at high frequency and over a broad range of parameters (up to tens of thousands parameter values transmitted per second by a SCADA system)<\/li>\n<li>Data on detected defects, not to mention evolving defects, on contrary, is scarce and occasional, is known to have insufficient defect categorization as well as localization in time (usually, is found in the form of manual records on paper)<\/li>\n<li>From a practical standpoint, only an \u201cobservation window\u201d is available for model training and application, reflecting process dynamics over a reasonable moving interval that ends with the most recent process parameter readings <\/li>\n<\/ul>\n<p>  These distinctions make us (besides reception and basic processing in real time of an intense \u201cbroadband signal\u201d from a manufacturing process) execute (in parallel) AI\/ML model application, training and accuracy control in real time, too. The \u201cframe\u201d that our models \u201csee\u201d in the moving observation window is permanently changing \u2013 and the accuracy of the AI\/ML models that were trained on one of the previous \u201cframes\u201d changes also. If the AI\/ML modeling accuracy degrades (e.g., the value of the \u201calarm-norm\u201d classification error surpassed the given tolerance boundaries) a retraining based on a more recent \u201cframe\u201d should be triggered automatically \u2013 while the choice of the moment for the retraining start must consider both the retrain procedure duration and the accuracy degradation speed of the current model versions (because the current versions go on being applied during the retrain procedure execution until the \u201cretrained\u201d versions of the models are obtained).<\/p>\n<p>  InterSystems IRIS possesses key in-platform capabilities for supporting real-time AI\/ML solutions for manufacturing process management. These capabilities can be grouped in three major categories:<\/p>\n<ul>\n<li>Continuous Deployment\/Delivery (CD) of new or modified existing AI\/ML mechanisms in a production solution functioning in real time based on InterSystems IRIS platform<\/li>\n<li>Continuous Integration (CI) of inbound process data flows, AI\/ML model application\/training\/accuracy control queues, data\/code\/orchestration around real-time interactions with mathematical modeling environments \u2013 in a single production solution in InterSystems IRIS platform<\/li>\n<li>Continuous Training (CT) of AI\/ML mechanisms performed in mathematical modeling environments using data, code, and orchestration (\u201cdecision making\u201d) passed from InterSystems IRIS platform<\/li>\n<\/ul>\n<p>  The grouping of platform capabilities relative to machine learning and artificial intelligence into the above categories is not casual. We quote a methodological <a href=\"https:\/\/cloud.google.com\/solutions\/machine-learning\/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning\">publication<\/a> by Google that gives a conceptual basis for such a grouping:<\/p>\n<p>  \u201c\u2026 DevOps is a popular practice in developing and operating large-scale software systems. This practice provides benefits such as shortening the development cycles, increasing deployment velocity, and dependable releases. To achieve these benefits, you introduce two concepts in the software system development:<\/p>\n<ul>\n<li>Continuous Integration (CI)<\/li>\n<li>Continuous Delivery (CD)<\/li>\n<\/ul>\n<p>  An ML system is a software system, so similar practices apply to help guarantee that you can reliably build and operate ML systems at scale.<\/p>\n<p>  However, ML systems differ from other software systems in the following ways:<\/p>\n<ul>\n<li>Team skills: In an ML project, the team usually includes data scientists or ML researchers, who focus on exploratory data analysis, model development, and experimentation. These members might not be experienced software engineers who can build production-class services.<\/li>\n<li>Development: ML is experimental in nature. You should try different features, algorithms, modeling techniques, and parameter configurations to find what works best for the problem as quickly as possible. The challenge is tracking what worked and what didn&#8217;t, and maintaining reproducibility while maximizing code reusability.<\/li>\n<li>Testing: Testing an ML system is more involved than testing other software systems. In addition to typical unit and integration tests, you need data validation, trained model quality evaluation, and model validation.<\/li>\n<li>Deployment: In ML systems, deployment isn&#8217;t as simple as deploying an offline-trained ML model as a prediction service. ML systems can require you to deploy a multi-step pipeline to automatically retrain and deploy model. This pipeline adds complexity and requires you to automate steps that are manually done before deployment by data scientists to train and validate new models.<\/li>\n<li>Production: ML models can have reduced performance not only due to suboptimal coding, but also due to constantly evolving data profiles. In other words, models can decay in more ways than conventional software systems, and you need to consider this degradation. Therefore, you need to track summary statistics of your data and monitor the online performance of your model to send notifications or roll back when values deviate from your expectations.<\/li>\n<\/ul>\n<p>  ML and other software systems are similar in continuous integration of source control, unit testing, integration testing, and continuous delivery of the software module or the package. However, in ML, there are a few notable differences:<\/p>\n<ul>\n<li>CI is no longer only about testing and validating code and components, but also testing and validating data, data schemas, and models.<\/li>\n<li>CD is no longer about a single software package or a service, but a system (an ML training pipeline) that should automatically deploy another service (model prediction service).<\/li>\n<li>CT is a new property, unique to ML systems, that&#8217;s concerned with automatically retraining and serving the models. \u2026\u201d<\/li>\n<\/ul>\n<p>  We can conclude that machine learning and artificial intelligence that are used with real-time data require a broader set of instruments and competences (from code development to mathematical modeling environment orchestration), a tighter integration among all the functional and subject domains, a better management of human and machine resources.<\/p>\n<h4>A real-time scenario: recognition of developing defects in feed pumps<\/h4>\n<p>  Continuing to use the area of manufacturing process management, we will walk through a practical case (already referenced in the beginning): there is a need to set up a real-time recognition of developing defects in feed pumps based on a flow of manufacturing process parameter values as well as on maintenance personnel\u2019s reports on detected defects.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/16\/wp\/ya\/16wpyanyryodi_izwt6kqo0l0c8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/16\/wp\/ya\/16wpyanyryodi_izwt6kqo0l0c8.png\"\/><br \/>  <i>Figure 2 Developing defect recognition case formulation<\/i><\/p>\n<p>  One of the characteristics of many similar cases, in practice, is that regularity and timeliness of the data feeds (SCADA) need to be considered in line with episodic and irregular detection (and recording) of various defect types. In different words: SCADA data is fed once a second all set for analysis, while defects are recorded using a pencil in a copybook indicating a date (for example: \u201cJan 12 \u2013 leakage into cover from 3rd bearing zone\u201d).<\/p>\n<p>  Therefore, we could complement the case formulation by adding the following important restriction: we have only one \u201cfingerprint\u201d of a concrete defect type (i.e. the concrete defect type is represented by the SCADA data as of the concrete date \u2013 and we have no other examples for this particular defect type). This restriction immediately sets us outside of the classical machine learning paradigm (supervised learning) that presumes that \u201cfingerprints\u201d are available in large quantity. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/sm\/s2\/jf\/sms2jfo3fk3s4c0n2t0fcvsy7oy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/sm\/s2\/jf\/sms2jfo3fk3s4c0n2t0fcvsy7oy.png\"\/><br \/>  <i>Figure 3 Elaborating the defect recognition case formulation<\/i> <\/p>\n<p>  Can we somehow \u201cmultiply\u201d the \u201cfingerprint\u201d that we have available? Yes, we can. The current condition of the pump is characterized by its similarity to the already recorded defects. Even without quantitative methods applied, just by observing the dynamics of the parameter values received from the SCADA system, much could be learnt:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/a0\/sc\/-8\/a0sc-8ae2bx-hz-rgpcc147neto.png\" data-src=\"https:\/\/habrastorage.org\/webt\/a0\/sc\/-8\/a0sc-8ae2bx-hz-rgpcc147neto.png\"\/><br \/>  <i>Figure 4 Pump condition dynamics vs. the concrete defect type \u201cfingerprint\u201d<br \/>  <\/i><br \/>  However, visual perception (at least, for now) \u2013 is not the most suitable generator of machine learning \u201clabels\u201d in our dynamically progressing scenario. We will be estimating the similarity of the current pump condition to the already recorded defects using a statistical test.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/kl\/fq\/3i\/klfq3iylwjkqvtgmylvogygmlkg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/kl\/fq\/3i\/klfq3iylwjkqvtgmylvogygmlkg.png\"\/><br \/>  <i>Figure 5 A statistical test applied to incoming data vs. the defect \u201cfingerprint\u201d<\/i><\/p>\n<p>  The statistical test estimates a probability for a set of records with manufacturing process parameter values, acquired as a \u201cbatch\u201d from the SCADA system, to be similar to the records from the concrete defect \u201cfingerprint\u201d. The probability estimated using the statistical test (statistical similarity index) is then transformed to either 0 or 1, becoming the machine learning \u201clabel\u201d in each of the records of the set that we evaluate for similarity. I.e., once the acquired batch of pump condition records are processed using the statistical test, we obtain the capacity to (a) add that batch to the training dataset for AI\/ML models and (b) to assess the accuracy of AI\/ML model current versions when applied to that batch.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/0l\/if\/t4\/0lift4xi0fgdwnjg5p4wjq2mdwe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/0l\/if\/t4\/0lift4xi0fgdwnjg5p4wjq2mdwe.png\"\/><br \/>  <i>Figure 6 Machine learning models applied to incoming data vs. the defect \u201cfingerprint\u201d<\/i><\/p>\n<p>  In one of our previous <a href=\"https:\/\/youtu.be\/-gyvCTBHh-0\">webinars<\/a> we show and explain how InterSystems IRIS platform allows implementing any AI\/ML mechanism as continually executed business processes that control the modeling output likelihood and adapt the model parameters. The implementation of our pumps scenario relies on the complete InterSystems IRIS functionality presented in the webinar \u2013 using in the analyzer process, part of our solution, reinforcement learning through automated management of the training dataset, rather than classical supervised learning. We are adding to the training dataset the records that demonstrate \u201cdetection consensus\u201d after being applied both the statistical test (with the similarity index transformed to either 0 or 1) and the current version of the model \u2013 i.e. both the statistical test and the model have produced on such records the output of 1. At model retraining, at its validation (when the newly trained model is applied to its own training dataset, after a prior application of the statistical test to that dataset), the records that \u201cfailed to maintain\u201d the output of 1 once the statistical test applied to them (due to a permanent presence in the training dataset of the records belonging to the original defect \u201cfingerprint\u201d) are removed from the training dataset, and a new version of the model is trained on the defect \u201cfingerprint\u201d plus the records from the flow that \u201csucceeded\u201d.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/h_\/av\/jx\/h_avjx1orbvtryxx4blzfzaicfo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/h_\/av\/jx\/h_avjx1orbvtryxx4blzfzaicfo.png\"\/><br \/>  <i>Figure 7 Robotization of AI\/ML computations in InterSystems IRIS<\/i><\/p>\n<p>  In the case of a need to have a \u201csecond opinion\u201d on the detection accuracy obtained through local computations in InterSystems IRIS, we can create an advisor process to redo the model training\/application on a control dataset using cloud providers (for example: Microsoft Azure, Amazon Web Services, Google Cloud Platform, etc.):<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/zp\/qm\/pj\/zpqmpjjakiuwqn9ebsedkzvvwpe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/zp\/qm\/pj\/zpqmpjjakiuwqn9ebsedkzvvwpe.png\"\/><br \/>  <i>Figure 8 \u00abSecond opinion\u00bb from Microsoft Azure orchestrated by InterSystems IRIS<\/i><\/p>\n<p>  The prototype of our scenario is implemented in InterSystems IRIS as an agent system of analytical processes interacting with the piece of equipment (the pump), the mathematical modeling environments (Python, R and Julia), and supporting self-training of all the involved AI\/ML mechanisms \u2013 based on real-time data flows.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tl\/dc\/d5\/tldcd5h_chwfodxwpyezcmtiwyw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tl\/dc\/d5\/tldcd5h_chwfodxwpyezcmtiwyw.png\"\/><br \/>  <i>Figure 9 Core functionality of the real-time AI\/ML solution in InterSystems IRIS<br \/>  <\/i><br \/>  Some practical results obtained due to our prototype:<\/p>\n<ul>\n<li>The defect\u2019s \u201cfingerprint\u201d detected by the models (January 12th):<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/cb\/p4\/h1\/cbp4h16t7qjzbpkkhoo8iht5oqu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/cb\/p4\/h1\/cbp4h16t7qjzbpkkhoo8iht5oqu.png\"\/>  <\/p>\n<ul>\n<li>The developing defect not included in the \u201cfingerprints\u201d known to the prototype, detected by the models (September 11th, while the defect itself was discovered by a maintenance brigade two days later \u2013 on September 13th):<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fl\/o1\/s5\/flo1s5ewxa_oe_15xer-taey-sm.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fl\/o1\/s5\/flo1s5ewxa_oe_15xer-taey-sm.png\"\/> <br \/>  A simulation on real-life data containing several occurrences of the same defect has shown that our solution implemented using InterSystems IRIS platform can detect a developing defect several days before it is discovered by a maintenance brigade.<\/p>\n<h4>InterSystems IRIS \u2014 the all-purpose universal platform for real-time AI\/ML computations<\/h4>\n<p>  <a href=\"https:\/\/www.intersystems.com\/isc-resources\/wp-content\/uploads\/sites\/24\/InterSystems_IRIS_Data_Platform-Unified_Platform_for_Powering_Real-time_Data-intensive_Applications-Whitepaper.pdf\">InterSystems IRIS<\/a> is a complete, unified platform that simplifies the development, deployment, and maintenance of real-time, data-rich solutions. It provides concurrent transactional and analytic processing capabilities; support for multiple, fully synchronized data models (relational, hierarchical, object, and document); a complete interoperability platform for integrating disparate data silos and applications; and sophisticated structured and unstructured analytics capabilities supporting batch and real-time use cases. The platform also provides an open analytics environment for incorporating best-of-breed analytics into InterSystems IRIS solutions, and it offers flexible deployment capabilities to support any combination of cloud and on-premises deployments.<\/p>\n<p>  Applications powered by InterSystems IRIS platform are currently in use with various industries helping companies receive tangible economic benefits in strategic and tactical run, fostering informed decision making and removing the \u201cgaps\u201d among event, analysis, and action.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/xb\/gi\/ov\/xbgiovoolg0ue37qevx2l6zvya0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/xb\/gi\/ov\/xbgiovoolg0ue37qevx2l6zvya0.png\"\/><br \/>  <i>Figure 10 InterSystems IRIS architecture in the real-time AI\/ML context<\/i><\/p>\n<p>  Same as the previous diagram, the below diagram combines the new \u201cbasis\u201d (CD\/CI\/CT) with the information flows among the working elements of the platform. Visualization begins with CD macromechanism and continues through CI\/CT macromechanisms.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bj\/yg\/7i\/bjyg7ithpcalckr35c_uanlmsoa.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bj\/yg\/7i\/bjyg7ithpcalckr35c_uanlmsoa.png\"\/><br \/>  <i>Figure 11 Diagram of information flows among AI\/ML working elements of InterSystems IRIS platform<\/i><\/p>\n<p>  The essentials of CD mechanism in InterSystems IRIS: the platform users (the AI\/ML solution developers) adapt the already existing and\/or create new AI\/ML mechanisms using a specialized AI\/ML code editor: Jupyter (the full title: Jupyter Notebook; for brevity, the documents created in this editor are also often called by the same title). In Jupyter, a developer can write, debug and test (using visual representations, as well) a concrete AI\/ML mechanism before its transmission (\u201cdeployment\u201d) to InterSystems IRIS. It is clear that the new mechanism developed in such a manner will enjoy only a basic debugging (in particular, because Jupyter does not handle real-time data flows) \u2013 but we are fine with that since the main objective of developing code in Jupyter is verification, in principle, of the functioning of a separate AI\/ML mechanism. In a similar fashion, an AI\/ML mechanism already deployed in the platform (see the other macromechanisms) may require a \u201crollback\u201d to its \u201cpre-platform\u201d version (reading data from files, accessing data via xDBC instead of local tables or globals \u2013 multi-dimensional data arrays in InterSystems IRIS \u2013 etc.) before debugging.<\/p>\n<p>  An important distinctive aspect of CD implementation in InterSystems IRIS: there is a bidirectional integration between the platform and Jupyter that allows deploying in the platform (with a further in-platform processing) Python, R and Julia content (all the three being programming languages of their respective open-source mathematical modeling leader environments). That said, AI\/ML content developers obtain a capability to \u201ccontinuously deploy\u201d their content in the platform while working in their usual Jupyter editor with usual function libraries available through Python, R, Julia, delivering basic debugging (in case of necessity) outside the platform.<\/p>\n<p>  Continuing with CI macromechanism in InterSystems IRIS. The diagram presents the macroprocess for a \u201creal-time robotizer\u201d (a bundle of data structures, business processes and fragments of code in mathematical environment languages, as well as in ObjectScript \u2013 the native development language of InterSystems IRIS \u2013 orchestrated by them). The objective of the macroprocess is: to support data processing queues required for the functioning of AI\/ML mechanisms (based on the data flows transmitted into the platform in real time), to make decisions on sequencing and \u201cassortment\u201d of AI\/ML mechanisms (a.k.a. \u201cmathematical algorithms\u201d, \u201cmodels\u201d, etc. \u2013 can be called in a number of different ways depending on implementation specifics and terminology preferences), to keep up to date the analytical structures for intelligence around AI\/ML outputs (cubes, tables, multidimensional data arrays, etc. \u2013 resulting into reports, dashboards, etc.).<\/p>\n<p>  An important distinctive aspect of CI implementation in InterSystems IRIS: there is a bidirectional integration among the platform and mathematical modeling environments that allows executing in-platform content written in Python, R or Julia in the respective environments and receiving back execution results. That integration works both in a \u201cterminal mode\u201d (i.e., the AI\/ML content is formulated as ObjectScript code performing callouts to mathematical environments), and in a \u201cbusiness process mode\u201d (i.e., the AI\/ML content is formulated as a business process using the visual composer, or, sometimes, using Jupyter, or, sometimes, using an IDE \u2013 IRIS Studio, Eclipse, Visual Studio Code). The availability of business processes for editing in Jupyter is specified using a link between IRIS within CI layer and Jupyter within CD layer. A more detailed overview of integration with mathematical modeling environments is provided further in this text. At this point, in our opinion, there are all reasons to state the availability in the platform of all the tooling required for implementing \u201ccontinuous integration\u201d of AI\/ML mechanisms (originating from \u201ccontinuous deployment\u201d) into real-time AI\/ML solutions.<\/p>\n<p>  And finally, the crucial macromechanism: CT. Without it, there will be no AI\/ML platform (even if \u201creal time\u201d can be implemented via CD\/CI). The essence of CT is the ability of the platform to operate the \u201cartifacts\u201d of machine learning and artificial intelligence directly in the sessions of mathematical modeling environments: models, distribution tables, vectors\/matrices, neural network layers, etc. This \u201cinteroperability\u201d, in the majority of the cases, is manifested through creation of the mentioned artifacts in the environments (for example, in the case of models, \u201ccreation\u201d consists of model specification and subsequent estimation of its parameters \u2013 the so-called \u201ctraining\u201d of a model), their application (for models: computation with their help of the \u201cmodeled\u201d values of target variables \u2013 forecasts, category assignments, event probabilities, etc.), and improvement of the already created plus applied artifacts (for example, through re-definition of the input variables of a model based on its performance \u2013 in order to improve forecast accuracy, as one possible option). The key property of CT role is its \u201cabstraction\u201d from CD and CI reality: CT is there to implement all the artifacts using computational and mathematical specifics of an AI\/ML solution, within the restrictions existing in concrete environments. The responsibility for \u201cinput data supply\u201d and \u201coutputs delivery\u201d will be borne by CD and CI.<\/p>\n<p>  An important distinctive aspect of CT implementation in InterSystems IRIS: using the above-mentioned integration with mathematical modeling environments, the platform can extract their artifacts from sessions in the mathematical environments orchestrated by it, and (the most important) convert them into in-platform data objects. For example, a distribution table just created in a Python session can be (without pausing the Python session) transferred into the platform as, say, a global (a multidimensional data array in InterSystems IRIS) \u2013 and further re-used for computations in a different AI\/ML mechanism (implemented using the language of a different environment \u2013 like R) \u2013 or as a virtual table. Another example: in parallel with \u201croutine\u201d functioning of a model (in a Python session), its input dataset is processed using \u201cauto ML\u201d \u2013 an automated search for optimized input variables and model parameters. Together with \u201croutine\u201d training, the production model receives in real time \u201coptimization suggestions\u201d as to basing its specification on an adjusted set of input variables, on adjusted model parameter values (no longer as an outcome of training in Python, but as the outcome of training of an \u201calternative\u201d version of it using, for example, H2O framework), allowing the overall AI\/ML solution to handle in an autonomous way unforeseen drift in the input data and in the modeled objects\/processes.<\/p>\n<p>  We will now take a closer look at the in-platform AI\/ML functionality of InterSystems IRIS using an existing prototype as example.<\/p>\n<p>  In the below diagram, in the left part of the image we see the fragment of a business process that implements execution of Python and R scripts. In the central part \u2013 we see the visual logs following execution of those scripts, in Python and in R accordingly. Next after them \u2013 examples of the content in both languages, passed for execution in respective environments. In the right part \u2013 visualizations based on the script outputs. The visualizations in the upper right corner are developed using IRIS Analytics (the data is transferred from Python to InterSystems IRIS platform and is put on a dashboard using platform functionality), in the lower right corner \u2013 obtained directly in R session and transferred from there to graphical files. An important remark: the discussed business process fragment is responsible in this prototype for model training (equipment condition classification) based on the data received in real time from the equipment imitator process, that is triggered by the classification accuracy monitor process that monitors performance of the classification model as it is being applied. Implementing an AI\/ML solution as a set of interacting business processes (\u201cagents\u201d) will be discussed further in the text.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wr\/gv\/od\/wrgvodqxfw4t4lcpdjurpczxvss.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wr\/gv\/od\/wrgvodqxfw4t4lcpdjurpczxvss.png\"\/><br \/>  <i>Figure 12 Interaction with Python, R and Julia in InterSystems IRIS<br \/>  <\/i><br \/>  In-platform processes (a.k.a. \u201cbusiness processes\u201d, \u201canalytical processes\u201d, \u201cpipelines\u201d, etc.\u2013 depending on the context) can be edited, first of all, using the visual business process composer in the platform, in such a way that both the process diagram and its corresponding AI\/ML mechanism (code) are created at the same time. By saying \u201can AI\/ML mechanism is created\u201d, we mean hybridity from the very start (at a process level): the content written in the languages of mathematical modeling environments neighbors the content written in SQL (including <a href=\"https:\/\/docs.intersystems.com\/irislatest\/csp\/docbook\/DocBook.UI.Page.cls?KEY=GIML\">IntegratedML<\/a> extensions), in InterSystems ObjectScript, as well as other supported languages. Moreover, the in-platform paradigm opens a very wide spectrum of capability for \u201cdrawing\u201d processes as sets of embedded fragments (as shown in the below diagram), helping with efficient structuring of sometimes rather complex content, avoiding \u201cdropouts\u201d from visual composition (to \u201cnon-visual\u201d methods\/classes\/procedures, etc.). I.e., in case of necessity (likely in most projects), the entire AI\/ML solution can be implemented in a visual self-documenting format. We draw your attention to the central part of the below diagram that illustrates a \u201chigher-up embedding layer\u201d and shows that apart from model training as such (implemented using Python and R), there is analysis of the so-called ROC curve of the trained model allowing to assess visually (and computationally) its training quality \u2013 this analysis is implemented using Julia language (executes in its respective Julia environment).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jr\/bw\/ld\/jrbwld0btlb7mroxvbtvtnfy4hq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jr\/bw\/ld\/jrbwld0btlb7mroxvbtvtnfy4hq.png\"\/><br \/>  <i>Figure 13 Visual AI\/ML solution composition environment in InterSystems IRIS<\/i><\/p>\n<p>  As mentioned before, the initial development and (in other cases) adjustment of the already implemented in-platform AI\/ML mechanisms will be performed outside the platform in Jupyter editor. In the below diagram we can find an example of editing an existing in-platform process (the same process as in the diagram above) \u2013 this is how its model training fragment looks in Jupyter. The content in Python language is available for editing, debugging, viewing inline graphics in Jupyter. Changes (if required) can be immediately replicated to the in-platform process, including its production version. Similarly, newly developed content can be replicated to the platform (a new in-platform process is created automatically).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wv\/zd\/a-\/wvzda-s5zdki4lbkvmp9v2ummzc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wv\/zd\/a-\/wvzda-s5zdki4lbkvmp9v2ummzc.png\"\/><br \/>  <i>Figure 14 Using Jupyter Notebook to edit an in-platform AI\/ML mechanism in InterSystems IRIS<\/i><\/p>\n<p>  Editing of an in-platform process can be performed not only in a visual or a notebook format \u2013 but in a \u201ccomplete\u201d IDE (Integrated Development Environment) format as well. The IDEs being IRIS Studio (the native IRIS development studio), Visual Studio Code (an InterSystems IRIS extension for VSCode) and Eclipse (Atelier plugin). In certain cases, simultaneous usage by a development team of all the three IDEs is possible. In the diagram below we see an example of editing all the same process in IRIS Studio, in Visual Studio Code and in Eclipse. Absolutely any portion of the content is available for editing: Python\/R\/Julia\/SQL, ObjectScript and the business process elements.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/5a\/oy\/4s\/5aoy4sliczfnxuwsswd0ufahwrc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/5a\/oy\/4s\/5aoy4sliczfnxuwsswd0ufahwrc.png\"\/><br \/>  <i>Figure 15 Editing of an InterSystems IRIS business process in various IDE<\/i><\/p>\n<p>  The means of composition and execution of business processes in InterSystems IRIS using Business Process Language (BPL), are worth a special mentioning. BPL allows using \u201cpre-configured integration components\u201d (activities) in business processes \u2013 which, properly speaking, give us the right to state that IRIS supports \u201ccontinuous integration\u201d. Pre-configured business process components (activities and links among them) are extremely powerful accelerators for AI\/ML solution assembly. And not only for assembly: due to activities and their links, an \u201cautonomous management layer\u201d is introduced above disparate AI\/ML mechanisms, capable of making real-time decisions depending on the situation.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/3c\/al\/1o\/3cal1o1ap8fvbyjwhdq2qjzkvco.png\" data-src=\"https:\/\/habrastorage.org\/webt\/3c\/al\/1o\/3cal1o1ap8fvbyjwhdq2qjzkvco.png\"\/><br \/>  <i>Figure 16 Pre-configured business process components for continuous integration (CI) in InterSystems IRIS platform<\/i><\/p>\n<p>  The concept of agent systems (a.k.a. \u201cmultiagent systems\u201d) has strong acceptance in robotization, and InterSystems IRIS platform provides organic support for it through its \u201cproduction\/process\u201d construct. Besides unlimited capabilities for \u201carming\u201d each process with the functionality required for the overall solution, \u201cagency\u201d as the property of an in-platform processes family, enables creation of efficient solutions for very unstable modeled phenomena (behavior of social\/biological systems, partially observed manufacturing processes, etc.).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wk\/-2\/2i\/wk-22iv1askdgfvwxyjaqhuugrg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wk\/-2\/2i\/wk-22iv1askdgfvwxyjaqhuugrg.png\"\/><br \/>  <i>Figure 17 Functioning AI\/ML solution in the form of an agent system of business processes in InterSystems IRIS<\/i><\/p>\n<p>  We proceed with our overview of InterSystems IRIS platform by presenting applied use domains containing solutions for entire classes of real-time scenarios (a fairly detailed discovery of some of the in-platform AI\/ML best practices based on InterSystems IRIS is provided in one of our previous <a href=\"https:\/\/youtu.be\/N6tN48hCnE4\">webinars<\/a>).<\/p>\n<p>  In \u201chot pursuit\u201d of the above diagram, we provide below a more illustrative diagram of an agent system. In that diagram, the same all prototype is shown with its four agent processes plus the interactions among them: GENERATOR \u2013 simulates data generation by equipment sensors, BUFFER \u2013 manages data processing queues, ANALYZER \u2013 executes machine learning, properly speaking, MONITOR \u2013 monitors machine learning quality and signals the necessity for model retrain.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wx\/d5\/un\/wxd5unjymd2ei-stan53ll6rdoo.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wx\/d5\/un\/wxd5unjymd2ei-stan53ll6rdoo.png\"\/><br \/>  <i>Figure 18 Composition of an AI\/ML solution in the form of an agent system of business processes in InterSystems IRIS<\/i><\/p>\n<p>  The diagram below illustrates the functioning of a different robotized prototype (text sentiment analysis) over a period. In the upper part \u2013 the model training quality metric evolution (quality increasing), in the lower part \u2013 dynamics of the model application quality metric and retrains (red stripes). As we can see, the solution has shown an effective and autonomous self-training while continuing to function at the required level of quality (the quality metric values stay above 80%).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/sk\/bl\/vr\/skblvrlt4cybhex2qzwdza_b9rc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/sk\/bl\/vr\/skblvrlt4cybhex2qzwdza_b9rc.png\"\/><br \/>  <i>Figure 19 Continuous (self-)training (CT) based on InterSystems IRIS platform<\/i><\/p>\n<p>  We were already mentioning \u201cauto ML\u201d before, and in the below diagram we are now providing more details about this functionality using one other prototype as an example. In the diagram of a business process fragment, we see an activity that launches modeling in H2O framework, as well as the outcomes of that modeling (a clear supremacy of the obtained model in terms of ROC curves, compared to the other \u201chand-made\u201d models, plus automated detection of the \u201cmost influential variables\u201d among the ones available in the original dataset). An important aspect here is the saving of time and expert resources that is gained due to \u201cauto ML\u201d: our in-platform process delivers in half a minute what may take an expert from one week to one month (determining and proofing of an optimal model).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9y\/fo\/2m\/9yfo2m07y6p39puf9-_fjq9urke.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9y\/fo\/2m\/9yfo2m07y6p39puf9-_fjq9urke.png\"\/><br \/>  <i>Figure 20 \u201cAuto ML\u201d embedded in an AI\/ML solution based on InterSystems IRIS platform<\/i><\/p>\n<p>  The diagram below \u201cbrings down the culmination\u201d while being a sound option to end the story about the classes of real-time scenarios: we remind that despite all the in-platform capabilities of InterSystems IRIS, training models under its orchestration is not compulsory. The platform can receive from an external source a so-called PMML specification of a model that was trained in an instrument that is not being orchestrated by the platform \u2013 and then keep applying that model in real time from the moment of its <a href=\"https:\/\/docs.intersystems.com\/irislatest\/csp\/docbook\/Doc.View.cls?KEY=APMML\">PMML specification<\/a> import. It is important to keep in mind that not every given AI\/ML artifact can be resolved into a PMML specification, although the majority of the most widely used AI\/ML artifacts allow doing this. Therefore, InterSystems IRIS platform has an \u201copen circuit\u201d and means zero \u201cplatform slavery\u201d for its users.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ze\/es\/5p\/zees5prffpzmk9s5qra9lsnmixy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ze\/es\/5p\/zees5prffpzmk9s5qra9lsnmixy.png\"\/><br \/>  <i>Figure 21 Model application based on its PMML specification in InterSystems IRIS platform<\/i><\/p>\n<p>  Let us mention the additional advantages of InterSystems IRIS platform (for a better illustration, with reference to manufacturing process management) that have major importance for real-time automation of artificial intelligence and machine learning:<\/p>\n<ul>\n<li>Powerful integration framework for interoperability with any data sources and data consumers (SCADA, equipment, MRO, ERP, etc.)<\/li>\n<li>Built-in multi-model database management system for high-performance hybrid transactional and analytical processing (HTAP) of unlimited volume of manufacturing process data<\/li>\n<li>Development environment for continuous deployment of AI\/ML mechanisms into real-time solutions based on Python, R, Julia<\/li>\n<li>Adaptive business processes for continuous integration into real-time solutions and (self-)training of AI\/ML mechanisms <\/li>\n<li>Built-in business intelligence capabilities for manufacturing process data and AI\/ML solution outputs visualization<\/li>\n<li>API Management to deliver AI\/ML outputs to SCADA, data marts\/warehouses, notification engines, etc.<\/li>\n<\/ul>\n<p>  AI\/ML solutions implemented in InterSystems IRIS platform easily adapt to existing IT infrastructure. InterSystems IRIS secures high reliability of AI\/ML solutions due to high availability and disaster recovery configuration support, as well as flexible deployment capability in virtual environments, at physical servers, in private and public clouds, in Docker containers.<\/p>\n<p>  That said, InterSystems IRIS is indeed the all-purpose universal platform for real-time AI\/ML computations. The all-purpose nature of our platform is proven in action through the de-facto absence of restrictions on the complexity of implemented computations, the ability of InterSystems IRIS to combine (in real time) execution of scenarios from various industries, the exceptional adaptability of any in-platform functions and mechanisms to concrete needs of the users. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/g8\/z1\/ut\/g8z1ut4kontvu-eiqx3mpq2qevk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/g8\/z1\/ut\/g8z1ut4kontvu-eiqx3mpq2qevk.png\"\/><br \/>  <i>Figure 22 InterSystems IRIS \u2014 the all-purpose universal platform for real-time AI\/ML computations<\/i><\/p>\n<p>  For a more specific dialog with those of our audience that found this text interesting, we would recommend proceeding to a \u201clive\u201d communication with us. We will readily provide support with formulation of real-time AI\/ML scenarios relevant to your company specifics, run collaborative prototyping based on InterSystems IRIS platform, design and execute a roadmap for implementation of artificial intelligence and machine learning in your manufacturing and management processes. The contact e-mail of our AI\/ML expert team \u2013 <a href=\"mailto:MLToolkit@intersystems.com\">MLToolkit@intersystems.com<\/a>.<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/519926\/\"> https:\/\/habr.com\/ru\/articles\/519926\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">Author: Sergey Lukyanchikov, Sales Engineer at InterSystems<\/p>\n<h4>Challenges of real-time AI\/ML computations<\/h4>\n<p>  We will start from the examples that we faced as Data Science practice at InterSystems:<\/p>\n<ul>\n<li>A \u201chigh-load\u201d customer portal is integrated with an online recommendation system. The plan is to reconfigure promo campaigns at the level of the entire retail network (we will assume that instead of a \u201cflat\u201d promo campaign master there will be used a \u201csegment-tactic\u201d matrix). What will happen to the recommender mechanisms? What will happen to data feeds and updates into the recommender mechanisms (the volume of input data having increased 25000 times)? What will happen to recommendation rule generation setup (the need to reduce 1000 times the recommendation rule filtering threshold due to a thousandfold increase of the volume and \u201cassortment\u201d of the rules generated)?<\/li>\n<li>An equipment health monitoring system uses \u201cmanual\u201d data sample feeds. Now it is connected to a SCADA system that transmits thousands of process parameter readings each second. What will happen to the monitoring system (will it be able to handle equipment health monitoring on a second-by-second basis)? What will happen once the input data receives a new bloc of several hundreds of columns with data sensor readings recently implemented in the SCADA system (will it be necessary, and for how long, to shut down the monitoring system to integrate the new sensor data in the analysis)?<\/li>\n<li>A complex of AI\/ML mechanisms (recommendation, monitoring, forecasting) depend on each other\u2019s results. How many man-hours will it take every month to adapt those AI\/ML mechanisms\u2019 functioning to changes in the input data? What is the overall \u201cdelay\u201d in supporting business decision making by the AI\/ML mechanisms (the refresh frequency of supporting information against the feed frequency of new input data)?<\/li>\n<\/ul>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-395464","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/395464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=395464"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/395464\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=395464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=395464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=395464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}