<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Integrating with Amazon Machine Learning</title><link>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Integrating with Amazon Machine Learning</title><link>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning</link><pubDate>Tue, 23 Apr 2024 13:23:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24adb9fb-f09b-49ea-bf49-fa025c853030</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning#comments</comments><description>Current Revision posted to Guide by Appian Max Team on 4/23/2024 1:23:29 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;table style="background-color:#ed6d6d;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Amazon ML is no longer available to new Amazon customers&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;This article provides information about integrating with Amazon Machine Learning. If you are unfamiliar with machine learning, it is recommended that you read the&amp;nbsp;&lt;a href="/w/article/3392/machine-learning-overview"&gt;Machine Learning Overview&lt;/a&gt;&amp;nbsp;article for information about the technology,&amp;nbsp;different model types and training data guidance.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Amazon offers a plethora of services that all fall under its machine learning arm from translation services (&lt;a href="https://aws.amazon.com/translate/" rel="noopener noreferrer" target="_blank"&gt;Amazon Translate)&lt;/a&gt;&amp;nbsp;to video recognition (Amazon &lt;a href="https://aws.amazon.com/deeplens/" rel="noopener noreferrer" target="_blank"&gt;DeepLens&lt;/a&gt;).&amp;nbsp;Appian can integrate with all of these services; however, this article solely focuses on the Amazon Machine Learning service through the use of the Appian AI Designer. Furthermore, there are many other machine learning offerings available including &lt;a href="https://cloud.google.com/ml-engine/?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=na-US-all-en-dr-bkws-all-all-trial-p-dr-1003905&amp;amp;utm_content=text-ad-none-any-DEV_c-CRE_214324741092-ADGP_Hybrid+%7C+AW+SEM+%7C+SKWS+%7C+US+%7C+en+%7C+Multi+~+Machine+Learning-KWID_43700032622150006-kwd-101750932&amp;amp;utm_term=KW_machine%20learning-ST_machine+learning&amp;amp;gclid=EAIaIQobChMIiMrj0dXL2wIVggOGCh09tAN1EAAYASAAEgLLx_D_BwE&amp;amp;dclid=CL2p4NPVy9sCFVIEDAodO3UKKw" rel="noopener noreferrer" target="_blank"&gt;Google Cloud&lt;/a&gt; and &lt;a href="https://azure.microsoft.com/en-us/overview/machine-learning/?&amp;amp;OCID=AID631184_SEM_ESwzDWZn&amp;amp;lnkd=Google_Azure_Brand&amp;amp;gclid=EAIaIQobChMIq_iQ2NXL2wIVz1qGCh2cxAQJEAAYAyAAEgJsBvD_BwE&amp;amp;dclid=CJye99rVy9sCFRYIDAodEfoHYg" rel="noopener noreferrer" target="_blank"&gt;Microsoft Azure&lt;/a&gt;.&amp;nbsp;Appian is integration agnostic and&amp;nbsp;has the ability to connect with all of them.&amp;nbsp;&lt;/p&gt;
&lt;h2 id="amazon_machine_learning_models"&gt;Amazon Machine Learning Models&lt;/h2&gt;
&lt;p&gt;Amazon Machine Learning (AML) supports three different type of&amp;nbsp;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/types-of-ml-models.html" rel="noopener noreferrer" target="_blank"&gt;ML models&lt;/a&gt;. The type of model that Amazon will build depends on the type of target attribute that you want to predict.&lt;/p&gt;
&lt;table style="height:31px;" width="1105"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Prediction Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Performance Metric&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/regression-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Regression&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts a numeric value&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Root Mean Square Error (RMSE)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Binary Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts binary values (ex. true or false)&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Area Under the Curve (AUC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/multiclass-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Multiclass&amp;nbsp;Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts values that belong to a limited, predefined set of permissible values&lt;/td&gt;
&lt;td&gt;&amp;nbsp;F1 Score&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="creating_amazon_ml_models_in_appian"&gt;Creating Amazon ML Models in Appian&lt;/h2&gt;
&lt;p&gt;The following steps outline how to create a model using the Appian AI Designer shared component. It is possible to create models directly in the AML admin console. It also possible to interact with models in Appian that already exist or have not been created using the Appian AI Designer (for more information on&amp;nbsp;making predictions see next section).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an &lt;a href="https://aws.amazon.com/machine-learning/" rel="noopener noreferrer" target="_blank"&gt;Amazon developer account&lt;/a&gt; and an Amazon S3 bucket to store the data you will use to create your model. A credit card is required and you will be charged to create models and make predictions, but costs are relatively insignificant (see &lt;a href="https://aws.amazon.com/aml/pricing/" rel="noopener noreferrer" target="_blank"&gt;AML pricing&lt;/a&gt;).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Download &lt;a href="/b/appmarket/posts/appian-ai-designer" rel="noopener noreferrer" target="_blank"&gt;Appian AI Designer&lt;/a&gt;&amp;nbsp;from shared components and follow the deployment instructions.
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Note&lt;/strong&gt;:&amp;nbsp;you will need to have Appian automatically create the database tables by manually publishing the data store after the application import.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Collect data used to create the model and format into csv where one row consists of an observation with multiple features (or attributes) and one target attribute. The more observations (rows in the csv) included, the better the model. Below is a sample set of data for banking customers where the first 9 columns represent features that will be used by the model to recognize patterns and relationships while the last column (y) is the binary target value the&amp;nbsp;model will try to predict. In this case y represents if the banking customer decided to take an offer pitched over the phone.
&lt;table style="height:101px;" width="1070"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;job&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;marital&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;education&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;default&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;housing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;contact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;duration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;day_of_w&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;y&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;44&lt;/td&gt;
&lt;td&gt;blue-collar&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;basic.4y&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;210&lt;/td&gt;
&lt;td&gt;thu&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;technical&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;unknown&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;telephone&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;fri&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;management&lt;/td&gt;
&lt;td&gt;single&lt;/td&gt;
&lt;td&gt;university.degree&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;td&gt;mon&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;39&lt;/td&gt;
&lt;td&gt;services&lt;/td&gt;
&lt;td&gt;divorced&lt;/td&gt;
&lt;td&gt;high.school&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;wed&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to: https://&amp;lt;your.server&amp;gt;/suite/sites/aml and follow the sites wizard to create a new model.
&lt;ol&gt;
&lt;li&gt;On the first tab you can select the S3 bucket created earlier.&lt;/li&gt;
&lt;li&gt;If you do not plan on using Amazon&amp;rsquo;s feature transformation formulas than ensure that any data manipulation has done before formatting the data into a csv. See feature transformation below for more information.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="making_predictions"&gt;Making Predictions&lt;/h2&gt;
&lt;p&gt;Once a model is created you can make batch predictions or individual real-time predictions.&amp;nbsp;There are two main ways to make real time predictions within Appian: you can use either the shared component function&amp;nbsp;AML_getRealtimePrediction or you can use the&amp;nbsp;&lt;a title="https://docs.appian.com/suite/help/latest/Connected_System_Template.html" href="https://docs.appian.com/suite/help/21.2/Create_a_Connected_System.html"&gt;connected system object&lt;/a&gt; in Appian versions 18.2 or later. The AML_getRealtimePrediction function&amp;nbsp;takes in a model ID and two parallel arrays that hold attribute names and attribute values. If using this function it is recommended to create a mapping rule that takes in a CDT and converts the CDT values into a text array to be passed into AML_getRealtimePrediction. Before even creating a connected system or&amp;nbsp;creating a rule to call the API you can test out real time predictions from the AML admin console or from the machine learning model record in the Appian AI designer site. It&amp;#39;s recommended to test out the predictions and evaluate the model (more below) before deciding to move forward with an initial model.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evaluating and Adjusting Model Performance&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whenever a new model is created there are four objects created in the AML Admin Console: One training data source, one evaluation data source, one model, and one evaluation object. As discussed above, Amazon uses different metrics to quantify performance.&amp;nbsp; In addition, Amazon provides a different performance visualization for each model. To access the performance metric and visualizations navigate to the admin console and select the evaluation object. For binary classification models you are able to adjust output using the dual histogram visualization (pictured below) by raising or lowering the score threshold that is defaulted to 0.5. For example if you would like to automate a process by auto approving likely true values you may want to raise the score threshold to a value closer to 1 in order to limit the false positives (raising the score threshold has the effect of increasing the probability needed for the model to predict a value as true). Inversely, if you would like to flag values that are likely false for further review you may want to lower the score threshold in order to limit the false negatives.&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/490x430/__key/communityserver-wikis-components-files/00-00-00-00-46/2376.Binary-histogram-2.JPG" /&gt;&lt;/div&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/440x280/__key/communityserver-wikis-components-files/00-00-00-00-46/7167.Binary-histogram-example-2.JPG" /&gt;&lt;/div&gt;
&lt;p&gt;Another way to evaluate the model is to take a look at how each feature correlates to the target value. Some values have more of an impact of the predicted outcomes and this is quantified&amp;nbsp;by Amazon (to view these values navigate to either of the data sources in the AML admin console). It is generally&amp;nbsp;a best practice to include as many&amp;nbsp;relevant features as possible in your data set, but noise introduced by including too many variables with little predictive power may negatively impact your models performance.&lt;/p&gt;
&lt;h2 id="best_practices"&gt;Best Practices&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/retraining-models-on-new-data.html" rel="noopener noreferrer" target="_blank"&gt;Retraining Models&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retraining is the process of providing new data to models in attempt keep your model accurate with the drift of actual outcome distribution over time. Like most application development, implementing a machine learning model is not a one time activity; it is best practice to continuously monitor your model and retrain&amp;nbsp;it if new observations&amp;nbsp;begin to deviate from the original training data distributions.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In order to retrain a model in Amazon you will need to create a&amp;nbsp;completely new model with your updated data set. Be sure to avoid hard coding model Ids in your Appian applications so that updating your applications after retraining models will only&amp;nbsp;require updating a single&amp;nbsp;object such as a constant or connected system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/feature-processing.html" rel="noopener noreferrer" target="_blank"&gt;Feature Transformation&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A key characteristic of good training data is that it is provided in a way that is optimized for learning and generalization. The process of putting together the data in this optimal format is known in the industry as feature transformation.&lt;/li&gt;
&lt;li&gt;Feature transformation can be performed on all types of data (numeric, text, boolean). &amp;nbsp;A simple example of feature transformation is converting all null numeric values to 0, but can also include more complex formulas for the purpose of normalizing data or discovering non-linearity in the variables distribution.&lt;/li&gt;
&lt;li&gt;Feature transformation can take place prior to uploading data in Amazon or you can use built-in transformation recipes within the Amazon machine learning console. Regardless of the method used, the process should be repeatable such that models can be recreated or re-trained easily.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/splitting-types.html" rel="noopener noreferrer" target="_blank"&gt;Splitting Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order to test the accuracy of ML models a percentage of the data provided to Amazon is set aside for evaluation. By default Amazon splits the data such that 70% of it is used to train the model while 30% is used to evaluate it. The split percentage can be altered when creating the model.&lt;/li&gt;
&lt;li&gt;It is important to split the input data such that there is a random distribution of observations between the training and evaluation data sources. If the data for either data source is skewed towards a certain target value the ML model could be skewed and the evaluation model may not be indicative of true performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/training-parameters.html" rel="noopener noreferrer" target="_blank"&gt;Shuffling Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Amazon ML, you must shuffle your training data. Shuffling mixes up the order of your data so that the &lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/learning-algorithm.html" rel="noopener noreferrer" target="_blank"&gt;SGD algorithm&lt;/a&gt; doesn&amp;#39;t encounter one type of data for too many observations in succession.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;When creating a model via the admin console or the Appian AI Designer shared component wizard, you can indicate if you would like Amazon to shuffle your data or if you have already shuffled it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;See Also&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Websites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/what-is-amazon-machine-learning.html" rel="noopener noreferrer" target="_blank"&gt;AML Developer Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, Platform, Architecture&lt;/div&gt;
</description></item><item><title>Integrating with Amazon Machine Learning</title><link>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning/revision/4</link><pubDate>Tue, 31 Oct 2023 19:57:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24adb9fb-f09b-49ea-bf49-fa025c853030</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning#comments</comments><description>Revision 4 posted to Guide by joel.larin on 10/31/2023 7:57:31 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;table style="background-color:#ed6d6d;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Amazon ML is no longer available to new Amazon customers&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;This article provides information about integrating with Amazon Machine Learning. If you are unfamiliar with machine learning, it is recommended that you read the&amp;nbsp;&lt;a href="/w/article/3392/machine-learning-overview"&gt;Machine Learning Overview&lt;/a&gt;&amp;nbsp;article for information about the technology,&amp;nbsp;different model types and training data guidance.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Amazon offers a plethora of services that all fall under its machine learning arm from translation services (&lt;a href="https://aws.amazon.com/translate/" rel="noopener noreferrer" target="_blank"&gt;Amazon Translate)&lt;/a&gt;&amp;nbsp;to video recognition (Amazon &lt;a href="https://aws.amazon.com/deeplens/" rel="noopener noreferrer" target="_blank"&gt;DeepLens&lt;/a&gt;).&amp;nbsp;Appian can integrate with all of these services; however, this article solely focuses on the Amazon Machine Learning service through the use of the Appian AI Designer. Furthermore, there are many other machine learning offerings available including &lt;a href="https://cloud.google.com/ml-engine/?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=na-US-all-en-dr-bkws-all-all-trial-p-dr-1003905&amp;amp;utm_content=text-ad-none-any-DEV_c-CRE_214324741092-ADGP_Hybrid+%7C+AW+SEM+%7C+SKWS+%7C+US+%7C+en+%7C+Multi+~+Machine+Learning-KWID_43700032622150006-kwd-101750932&amp;amp;utm_term=KW_machine%20learning-ST_machine+learning&amp;amp;gclid=EAIaIQobChMIiMrj0dXL2wIVggOGCh09tAN1EAAYASAAEgLLx_D_BwE&amp;amp;dclid=CL2p4NPVy9sCFVIEDAodO3UKKw" rel="noopener noreferrer" target="_blank"&gt;Google Cloud&lt;/a&gt; and &lt;a href="https://azure.microsoft.com/en-us/overview/machine-learning/?&amp;amp;OCID=AID631184_SEM_ESwzDWZn&amp;amp;lnkd=Google_Azure_Brand&amp;amp;gclid=EAIaIQobChMIq_iQ2NXL2wIVz1qGCh2cxAQJEAAYAyAAEgJsBvD_BwE&amp;amp;dclid=CJye99rVy9sCFRYIDAodEfoHYg" rel="noopener noreferrer" target="_blank"&gt;Microsoft Azure&lt;/a&gt;.&amp;nbsp;Appian is integration agnostic and&amp;nbsp;has the ability to connect with all of them.&amp;nbsp;&lt;/p&gt;
&lt;h2 id="amazon_machine_learning_models"&gt;Amazon Machine Learning Models&lt;/h2&gt;
&lt;p&gt;Amazon Machine Learning (AML) supports three different type of&amp;nbsp;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/types-of-ml-models.html" rel="noopener noreferrer" target="_blank"&gt;ML models&lt;/a&gt;. The type of model that Amazon will build depends on the type of target attribute that you want to predict.&lt;/p&gt;
&lt;table style="height:31px;" width="1105"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Prediction Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Performance Metric&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/regression-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Regression&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts a numeric value&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Root Mean Square Error (RMSE)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Binary Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts binary values (ex. true or false)&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Area Under the Curve (AUC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/multiclass-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Multiclass&amp;nbsp;Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts values that belong to a limited, predefined set of permissible values&lt;/td&gt;
&lt;td&gt;&amp;nbsp;F1 Score&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="creating_amazon_ml_models_in_appian"&gt;Creating Amazon ML Models in Appian&lt;/h2&gt;
&lt;p&gt;The following steps outline how to create a model using the Appian AI Designer shared component. It is possible to create models directly in the AML admin console. It also possible to interact with models in Appian that already exist or have not been created using the Appian AI Designer (for more information on&amp;nbsp;making predictions see next section).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an &lt;a href="https://aws.amazon.com/machine-learning/" rel="noopener noreferrer" target="_blank"&gt;Amazon developer account&lt;/a&gt; and an Amazon S3 bucket to store the data you will use to create your model. A credit card is required and you will be charged to create models and make predictions, but costs are relatively insignificant (see &lt;a href="https://aws.amazon.com/aml/pricing/" rel="noopener noreferrer" target="_blank"&gt;AML pricing&lt;/a&gt;).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Download &lt;a href="/b/appmarket/posts/appian-ai-designer" rel="noopener noreferrer" target="_blank"&gt;Appian AI Designer&lt;/a&gt;&amp;nbsp;from shared components and follow the deployment instructions.
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Note&lt;/strong&gt;:&amp;nbsp;you will need to have Appian automatically create the database tables by manually publishing the data store after the application import.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Collect data used to create the model and format into csv where one row consists of an observation with multiple features (or attributes) and one target attribute. The more observations (rows in the csv) included, the better the model. Below is a sample set of data for banking customers where the first 9 columns represent features that will be used by the model to recognize patterns and relationships while the last column (y) is the binary target value the&amp;nbsp;model will try to predict. In this case y represents if the banking customer decided to take an offer pitched over the phone.
&lt;table style="height:101px;" width="1070"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;job&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;marital&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;education&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;default&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;housing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;contact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;duration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;day_of_w&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;y&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;44&lt;/td&gt;
&lt;td&gt;blue-collar&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;basic.4y&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;210&lt;/td&gt;
&lt;td&gt;thu&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;technical&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;unknown&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;telephone&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;fri&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;management&lt;/td&gt;
&lt;td&gt;single&lt;/td&gt;
&lt;td&gt;university.degree&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;td&gt;mon&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;39&lt;/td&gt;
&lt;td&gt;services&lt;/td&gt;
&lt;td&gt;divorced&lt;/td&gt;
&lt;td&gt;high.school&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;wed&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to: https://&amp;lt;your.server&amp;gt;/suite/sites/aml and follow the sites wizard to create a new model.
&lt;ol&gt;
&lt;li&gt;On the first tab you can select the S3 bucket created earlier.&lt;/li&gt;
&lt;li&gt;If you do not plan on using Amazon&amp;rsquo;s feature transformation formulas than ensure that any data manipulation has done before formatting the data into a csv. See feature transformation below for more information.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="making_predictions"&gt;Making Predictions&lt;/h2&gt;
&lt;p&gt;Once a model is created you can make batch predictions or individual real-time predictions.&amp;nbsp;There are two main ways to make real time predictions within Appian: you can use either the shared component function&amp;nbsp;AML_getRealtimePrediction or you can use the&amp;nbsp;&lt;a title="https://docs.appian.com/suite/help/latest/Connected_System_Template.html" href="https://docs.appian.com/suite/help/21.2/Create_a_Connected_System.html"&gt;connected system object&lt;/a&gt; in Appian versions 18.2 or later. The AML_getRealtimePrediction function&amp;nbsp;takes in a model ID and two parallel arrays that hold attribute names and attribute values. If using this function it is recommended to create a mapping rule that takes in a CDT and converts the CDT values into a text array to be passed into AML_getRealtimePrediction. Before even creating a connected system or&amp;nbsp;creating a rule to call the API you can test out real time predictions from the AML admin console or from the machine learning model record in the Appian AI designer site. It&amp;#39;s recommended to test out the predictions and evaluate the model (more below) before deciding to move forward with an initial model.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evaluating and Adjusting Model Performance&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whenever a new model is created there are four objects created in the AML Admin Console: One training data source, one evaluation data source, one model, and one evaluation object. As discussed above, Amazon uses different metrics to quantify performance.&amp;nbsp; In addition, Amazon provides a different performance visualization for each model. To access the performance metric and visualizations navigate to the admin console and select the evaluation object. For binary classification models you are able to adjust output using the dual histogram visualization (pictured below) by raising or lowering the score threshold that is defaulted to 0.5. For example if you would like to automate a process by auto approving likely true values you may want to raise the score threshold to a value closer to 1 in order to limit the false positives (raising the score threshold has the effect of increasing the probability needed for the model to predict a value as true). Inversely, if you would like to flag values that are likely false for further review you may want to lower the score threshold in order to limit the false negatives.&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/490x430/__key/communityserver-wikis-components-files/00-00-00-00-46/2376.Binary-histogram-2.JPG" /&gt;&lt;/div&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/440x280/__key/communityserver-wikis-components-files/00-00-00-00-46/7167.Binary-histogram-example-2.JPG" /&gt;&lt;/div&gt;
&lt;p&gt;Another way to evaluate the model is to take a look at how each feature correlates to the target value. Some values have more of an impact of the predicted outcomes and this is quantified&amp;nbsp;by Amazon (to view these values navigate to either of the data sources in the AML admin console). It is generally&amp;nbsp;a best practice to include as many&amp;nbsp;relevant features as possible in your data set, but noise introduced by including too many variables with little predictive power may negatively impact your models performance.&lt;/p&gt;
&lt;h2 id="best_practices"&gt;Best Practices&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/retraining-models-on-new-data.html" rel="noopener noreferrer" target="_blank"&gt;Retraining Models&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retraining is the process of providing new data to models in attempt keep your model accurate with the drift of actual outcome distribution over time. Like most application development, implementing a machine learning model is not a one time activity; it is best practice to continuously monitor your model and retrain&amp;nbsp;it if new observations&amp;nbsp;begin to deviate from the original training data distributions.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In order to retrain a model in Amazon you will need to create a&amp;nbsp;completely new model with your updated data set. Be sure to avoid hard coding model Ids in your Appian applications so that updating your applications after retraining models will only&amp;nbsp;require updating a single&amp;nbsp;object such as a constant or connected system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/feature-processing.html" rel="noopener noreferrer" target="_blank"&gt;Feature Transformation&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A key characteristic of good training data is that it is provided in a way that is optimized for learning and generalization. The process of putting together the data in this optimal format is known in the industry as feature transformation.&lt;/li&gt;
&lt;li&gt;Feature transformation can be performed on all types of data (numeric, text, boolean). &amp;nbsp;A simple example of feature transformation is converting all null numeric values to 0, but can also include more complex formulas for the purpose of normalizing data or discovering non-linearity in the variables distribution.&lt;/li&gt;
&lt;li&gt;Feature transformation can take place prior to uploading data in Amazon or you can use built-in transformation recipes within the Amazon machine learning console. Regardless of the method used, the process should be repeatable such that models can be recreated or re-trained easily.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/splitting-types.html" rel="noopener noreferrer" target="_blank"&gt;Splitting Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order to test the accuracy of ML models a percentage of the data provided to Amazon is set aside for evaluation. By default Amazon splits the data such that 70% of it is used to train the model while 30% is used to evaluate it. The split percentage can be altered when creating the model.&lt;/li&gt;
&lt;li&gt;It is important to split the input data such that there is a random distribution of observations between the training and evaluation data sources. If the data for either data source is skewed towards a certain target value the ML model could be skewed and the evaluation model may not be indicative of true performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/training-parameters.html" rel="noopener noreferrer" target="_blank"&gt;Shuffling Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Amazon ML, you must shuffle your training data. Shuffling mixes up the order of your data so that the &lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/learning-algorithm.html" rel="noopener noreferrer" target="_blank"&gt;SGD algorithm&lt;/a&gt; doesn&amp;#39;t encounter one type of data for too many observations in succession.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;When creating a model via the admin console or the Appian AI Designer shared component wizard, you can indicate if you would like Amazon to shuffle your data or if you have already shuffled it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;See Also&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Websites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/what-is-amazon-machine-learning.html" rel="noopener noreferrer" target="_blank"&gt;AML Developer Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, Platform, Architecture&lt;/div&gt;
</description></item><item><title>Integrating with Amazon Machine Learning</title><link>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning/revision/3</link><pubDate>Tue, 31 Oct 2023 19:53:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24adb9fb-f09b-49ea-bf49-fa025c853030</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning#comments</comments><description>Revision 3 posted to Guide by joel.larin on 10/31/2023 7:53:21 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;table style="background-color:#ed6d6d;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Amazon ML is no longer available to new Amazon customers&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;This article provides information about integrating with Amazon Machine Learning. If you are unfamiliar with machine learning, it is recommended that you read the&amp;nbsp;&lt;a href="/w/article/3392/machine-learning-overview"&gt;Machine Learning Overview&lt;/a&gt;&amp;nbsp;article for information about the technology,&amp;nbsp;different model types and training data guidance.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Amazon offers a plethora of services that all fall under its machine learning arm from translation services (&lt;a href="https://aws.amazon.com/translate/" rel="noopener noreferrer" target="_blank"&gt;Amazon Translate)&lt;/a&gt;&amp;nbsp;to video recognition (Amazon &lt;a href="https://aws.amazon.com/deeplens/" rel="noopener noreferrer" target="_blank"&gt;DeepLens&lt;/a&gt;).&amp;nbsp;Appian can integrate with all of these services; however, this article solely focuses on the Amazon Machine Learning service through the use of the Appian AI Designer. Furthermore, there are many other machine learning offerings available including &lt;a href="https://cloud.google.com/ml-engine/?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=na-US-all-en-dr-bkws-all-all-trial-p-dr-1003905&amp;amp;utm_content=text-ad-none-any-DEV_c-CRE_214324741092-ADGP_Hybrid+%7C+AW+SEM+%7C+SKWS+%7C+US+%7C+en+%7C+Multi+~+Machine+Learning-KWID_43700032622150006-kwd-101750932&amp;amp;utm_term=KW_machine%20learning-ST_machine+learning&amp;amp;gclid=EAIaIQobChMIiMrj0dXL2wIVggOGCh09tAN1EAAYASAAEgLLx_D_BwE&amp;amp;dclid=CL2p4NPVy9sCFVIEDAodO3UKKw" rel="noopener noreferrer" target="_blank"&gt;Google Cloud&lt;/a&gt; and &lt;a href="https://azure.microsoft.com/en-us/overview/machine-learning/?&amp;amp;OCID=AID631184_SEM_ESwzDWZn&amp;amp;lnkd=Google_Azure_Brand&amp;amp;gclid=EAIaIQobChMIq_iQ2NXL2wIVz1qGCh2cxAQJEAAYAyAAEgJsBvD_BwE&amp;amp;dclid=CJye99rVy9sCFRYIDAodEfoHYg" rel="noopener noreferrer" target="_blank"&gt;Microsoft Azure&lt;/a&gt;.&amp;nbsp;Appian is integration agnostic and&amp;nbsp;has the ability to connect with all of them.&amp;nbsp;&lt;/p&gt;
&lt;h2 id="amazon_machine_learning_models"&gt;Amazon Machine Learning Models&lt;/h2&gt;
&lt;p&gt;Amazon Machine Learning (AML) supports three different type of&amp;nbsp;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/types-of-ml-models.html" rel="noopener noreferrer" target="_blank"&gt;ML models&lt;/a&gt;. The type of model that Amazon will build depends on the type of target attribute that you want to predict.&lt;/p&gt;
&lt;table style="height:31px;" width="1105"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Prediction Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Performance Metric&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/regression-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Regression&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts a numeric value&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Root Mean Square Error (RMSE)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Binary Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts binary values (ex. true or false)&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Area Under the Curve (AUC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/multiclass-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Multiclass&amp;nbsp;Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts values that belong to a limited, predefined set of permissible values&lt;/td&gt;
&lt;td&gt;&amp;nbsp;F1 Score&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="creating_amazon_ml_models_in_appian"&gt;Creating Amazon ML Models in Appian&lt;/h2&gt;
&lt;p&gt;The following steps outline how to create a model using the Appian AI Designer shared component. It is possible to create models directly in the AML admin console. It also possible to interact with models in Appian that already exist or have not been created using the Appian AI Designer (for more information on&amp;nbsp;making predictions see next section).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an &lt;a href="https://aws.amazon.com/machine-learning/" rel="noopener noreferrer" target="_blank"&gt;Amazon developer account&lt;/a&gt; and an Amazon S3 bucket to store the data you will use to create your model. A credit card is required and you will be charged to create models and make predictions, but costs are relatively insignificant (see &lt;a href="https://aws.amazon.com/aml/pricing/" rel="noopener noreferrer" target="_blank"&gt;AML pricing&lt;/a&gt;).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Download &lt;a href="/b/appmarket/posts/appian-ai-designer" rel="noopener noreferrer" target="_blank"&gt;Appian AI Designer&lt;/a&gt;&amp;nbsp;from shared components and follow the deployment instructions.
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Note&lt;/strong&gt;:&amp;nbsp;you will need to have Appian automatically create the database tables by manually publishing the data store after the application import.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Collect data used to create the model and format into csv where one row consists of an observation with multiple features (or attributes) and one target attribute. The more observations (rows in the csv) included, the better the model. Below is a sample set of data for banking customers where the first 9 columns represent features that will be used by the model to recognize patterns and relationships while the last column (y) is the binary target value the&amp;nbsp;model will try to predict. In this case y represents if the banking customer decided to take an offer pitched over the phone.
&lt;table style="height:101px;" width="1070"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;job&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;marital&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;education&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;default&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;housing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;contact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;duration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;day_of_w&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;y&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;44&lt;/td&gt;
&lt;td&gt;blue-collar&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;basic.4y&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;210&lt;/td&gt;
&lt;td&gt;thu&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;technical&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;unknown&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;telephone&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;fri&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;management&lt;/td&gt;
&lt;td&gt;single&lt;/td&gt;
&lt;td&gt;university.degree&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;td&gt;mon&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;39&lt;/td&gt;
&lt;td&gt;services&lt;/td&gt;
&lt;td&gt;divorced&lt;/td&gt;
&lt;td&gt;high.school&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;wed&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to: https://&amp;lt;your.server&amp;gt;/suite/sites/aml and follow the sites wizard to create a new model.
&lt;ol&gt;
&lt;li&gt;On the first tab you can select the S3 bucket created earlier.&lt;/li&gt;
&lt;li&gt;If you do not plan on using Amazon&amp;rsquo;s feature transformation formulas than ensure that any data manipulation has done before formatting the data into a csv. See feature transformation below for more information.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="making_predictions"&gt;Making Predictions&lt;/h2&gt;
&lt;p&gt;Once a model is created you can make batch predictions or individual real-time predictions.&amp;nbsp;There are two main ways to make real time predictions within Appian: you can use either the shared component function&amp;nbsp;AML_getRealtimePrediction or you can use the Amazon &lt;a title="https://docs.appian.com/suite/help/latest/Connected_System_Template.html" href="https://docs.appian.com/suite/help/18.2/Connected_System_Template.html" rel="noopener noreferrer" target="_blank"&gt;connected system object&lt;/a&gt; in Appian versions 18.2 or later. The AML_getRealtimePrediction function&amp;nbsp;takes in a model ID and two parallel arrays that hold attribute names and attribute values. If using this function it is recommended to create a mapping rule that takes in a CDT and converts the CDT values into a text array to be passed into AML_getRealtimePrediction. Before even creating a connected system or&amp;nbsp;creating a rule to call the API you can test out real time predictions from the AML admin console or from the machine learning model record in the Appian AI designer site. It&amp;#39;s recommended to test out the predictions and evaluate the model (more below) before deciding to move forward with an initial model.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evaluating and Adjusting Model Performance&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whenever a new model is created there are four objects created in the AML Admin Console: One training data source, one evaluation data source, one model, and one evaluation object. As discussed above, Amazon uses different metrics to quantify performance.&amp;nbsp; In addition, Amazon provides a different performance visualization for each model. To access the performance metric and visualizations navigate to the admin console and select the evaluation object. For binary classification models you are able to adjust output using the dual histogram visualization (pictured below) by raising or lowering the score threshold that is defaulted to 0.5. For example if you would like to automate a process by auto approving likely true values you may want to raise the score threshold to a value closer to 1 in order to limit the false positives (raising the score threshold has the effect of increasing the probability needed for the model to predict a value as true). Inversely, if you would like to flag values that are likely false for further review you may want to lower the score threshold in order to limit the false negatives.&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/490x430/__key/communityserver-wikis-components-files/00-00-00-00-46/2376.Binary-histogram-2.JPG" /&gt;&lt;/div&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/440x280/__key/communityserver-wikis-components-files/00-00-00-00-46/7167.Binary-histogram-example-2.JPG" /&gt;&lt;/div&gt;
&lt;p&gt;Another way to evaluate the model is to take a look at how each feature correlates to the target value. Some values have more of an impact of the predicted outcomes and this is quantified&amp;nbsp;by Amazon (to view these values navigate to either of the data sources in the AML admin console). It is generally&amp;nbsp;a best practice to include as many&amp;nbsp;relevant features as possible in your data set, but noise introduced by including too many variables with little predictive power may negatively impact your models performance.&lt;/p&gt;
&lt;h2 id="best_practices"&gt;Best Practices&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/retraining-models-on-new-data.html" rel="noopener noreferrer" target="_blank"&gt;Retraining Models&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retraining is the process of providing new data to models in attempt keep your model accurate with the drift of actual outcome distribution over time. Like most application development, implementing a machine learning model is not a one time activity; it is best practice to continuously monitor your model and retrain&amp;nbsp;it if new observations&amp;nbsp;begin to deviate from the original training data distributions.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In order to retrain a model in Amazon you will need to create a&amp;nbsp;completely new model with your updated data set. Be sure to avoid hard coding model Ids in your Appian applications so that updating your applications after retraining models will only&amp;nbsp;require updating a single&amp;nbsp;object such as a constant or connected system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/feature-processing.html" rel="noopener noreferrer" target="_blank"&gt;Feature Transformation&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A key characteristic of good training data is that it is provided in a way that is optimized for learning and generalization. The process of putting together the data in this optimal format is known in the industry as feature transformation.&lt;/li&gt;
&lt;li&gt;Feature transformation can be performed on all types of data (numeric, text, boolean). &amp;nbsp;A simple example of feature transformation is converting all null numeric values to 0, but can also include more complex formulas for the purpose of normalizing data or discovering non-linearity in the variables distribution.&lt;/li&gt;
&lt;li&gt;Feature transformation can take place prior to uploading data in Amazon or you can use built-in transformation recipes within the Amazon machine learning console. Regardless of the method used, the process should be repeatable such that models can be recreated or re-trained easily.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/splitting-types.html" rel="noopener noreferrer" target="_blank"&gt;Splitting Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order to test the accuracy of ML models a percentage of the data provided to Amazon is set aside for evaluation. By default Amazon splits the data such that 70% of it is used to train the model while 30% is used to evaluate it. The split percentage can be altered when creating the model.&lt;/li&gt;
&lt;li&gt;It is important to split the input data such that there is a random distribution of observations between the training and evaluation data sources. If the data for either data source is skewed towards a certain target value the ML model could be skewed and the evaluation model may not be indicative of true performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/training-parameters.html" rel="noopener noreferrer" target="_blank"&gt;Shuffling Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Amazon ML, you must shuffle your training data. Shuffling mixes up the order of your data so that the &lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/learning-algorithm.html" rel="noopener noreferrer" target="_blank"&gt;SGD algorithm&lt;/a&gt; doesn&amp;#39;t encounter one type of data for too many observations in succession.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;When creating a model via the admin console or the Appian AI Designer shared component wizard, you can indicate if you would like Amazon to shuffle your data or if you have already shuffled it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;See Also&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Websites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/what-is-amazon-machine-learning.html" rel="noopener noreferrer" target="_blank"&gt;AML Developer Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, Platform, Architecture&lt;/div&gt;
</description></item><item><title>Integrating with Amazon Machine Learning</title><link>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning/revision/2</link><pubDate>Tue, 31 Oct 2023 19:47:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24adb9fb-f09b-49ea-bf49-fa025c853030</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning#comments</comments><description>Revision 2 posted to Guide by joel.larin on 10/31/2023 7:47:48 PM&lt;br /&gt;
&lt;div style="margin:8px 16% 8px 8%;"&gt;
&lt;table style="background-color:#ed6d6d;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Amazon ML is no longer available to new Amazon customers&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;This article provides information about integrating with Amazon Machine Learning. If you are unfamiliar with machine learning, it is recommended that you read the&amp;nbsp;&lt;a href="/w/article/3392/machine-learning-overview"&gt;Machine Learning Overview&lt;/a&gt;&amp;nbsp;article for information about the technology,&amp;nbsp;different model types and training data guidance.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Amazon offers a plethora of services that all fall under its machine learning arm from translation services (&lt;a href="https://aws.amazon.com/translate/" rel="noopener noreferrer" target="_blank"&gt;Amazon Translate)&lt;/a&gt;&amp;nbsp;to video recognition (Amazon &lt;a href="https://aws.amazon.com/deeplens/" rel="noopener noreferrer" target="_blank"&gt;DeepLens&lt;/a&gt;).&amp;nbsp;Appian can integrate with all of these services; however, this article solely focuses on the Amazon Machine Learning service through the use of the Appian AI Designer. Furthermore, there are many other machine learning offerings available including &lt;a href="https://cloud.google.com/ml-engine/?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=na-US-all-en-dr-bkws-all-all-trial-p-dr-1003905&amp;amp;utm_content=text-ad-none-any-DEV_c-CRE_214324741092-ADGP_Hybrid+%7C+AW+SEM+%7C+SKWS+%7C+US+%7C+en+%7C+Multi+~+Machine+Learning-KWID_43700032622150006-kwd-101750932&amp;amp;utm_term=KW_machine%20learning-ST_machine+learning&amp;amp;gclid=EAIaIQobChMIiMrj0dXL2wIVggOGCh09tAN1EAAYASAAEgLLx_D_BwE&amp;amp;dclid=CL2p4NPVy9sCFVIEDAodO3UKKw" rel="noopener noreferrer" target="_blank"&gt;Google Cloud&lt;/a&gt; and &lt;a href="https://azure.microsoft.com/en-us/overview/machine-learning/?&amp;amp;OCID=AID631184_SEM_ESwzDWZn&amp;amp;lnkd=Google_Azure_Brand&amp;amp;gclid=EAIaIQobChMIq_iQ2NXL2wIVz1qGCh2cxAQJEAAYAyAAEgJsBvD_BwE&amp;amp;dclid=CJye99rVy9sCFRYIDAodEfoHYg" rel="noopener noreferrer" target="_blank"&gt;Microsoft Azure&lt;/a&gt;.&amp;nbsp;Appian is integration agnostic and&amp;nbsp;has the ability to connect with all of them.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Amazon Machine Learning Models&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Amazon Machine Learning (AML) supports three different type of&amp;nbsp;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/types-of-ml-models.html" rel="noopener noreferrer" target="_blank"&gt;ML models&lt;/a&gt;. The type of model that Amazon will build depends on the type of target attribute that you want to predict.&lt;/p&gt;
&lt;table style="height:31px;" width="1105"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Prediction Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Performance Metric&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/regression-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Regression&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts a numeric value&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Root Mean Square Error (RMSE)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Binary Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts binary values (ex. true or false)&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Area Under the Curve (AUC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/multiclass-model-insights.html" rel="noopener noreferrer" target="_blank"&gt;Multiclass&amp;nbsp;Classification&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;Predicts values that belong to a limited, predefined set of permissible values&lt;/td&gt;
&lt;td&gt;&amp;nbsp;F1 Score&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Creating Amazon ML Models in Appian&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following steps outline how to create a model using the Appian AI Designer shared component. It is possible to create models directly in the AML admin console. It also possible to interact with models in Appian that already exist or have not been created using the Appian AI Designer (for more information on&amp;nbsp;making predictions see next section).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an &lt;a href="https://aws.amazon.com/machine-learning/" rel="noopener noreferrer" target="_blank"&gt;Amazon developer account&lt;/a&gt; and an Amazon S3 bucket to store the data you will use to create your model. A credit card is required and you will be charged to create models and make predictions, but costs are relatively insignificant (see &lt;a href="https://aws.amazon.com/aml/pricing/" rel="noopener noreferrer" target="_blank"&gt;AML pricing&lt;/a&gt;).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Download &lt;a href="/b/appmarket/posts/appian-ai-designer" rel="noopener noreferrer" target="_blank"&gt;Appian AI Designer&lt;/a&gt;&amp;nbsp;from shared components and follow the deployment instructions.
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Note&lt;/strong&gt;:&amp;nbsp;you will need to have Appian automatically create the database tables by manually publishing the data store after the application import.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Collect data used to create the model and format into csv where one row consists of an observation with multiple features (or attributes) and one target attribute. The more observations (rows in the csv) included, the better the model. Below is a sample set of data for banking customers where the first 9 columns represent features that will be used by the model to recognize patterns and relationships while the last column (y) is the binary target value the&amp;nbsp;model will try to predict. In this case y represents if the banking customer decided to take an offer pitched over the phone.
&lt;table style="height:101px;" width="1070"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;job&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;marital&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;education&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;default&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;housing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;contact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;duration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;day_of_w&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;y&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;44&lt;/td&gt;
&lt;td&gt;blue-collar&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;basic.4y&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;210&lt;/td&gt;
&lt;td&gt;thu&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;technical&lt;/td&gt;
&lt;td&gt;married&lt;/td&gt;
&lt;td&gt;unknown&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;telephone&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;fri&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;management&lt;/td&gt;
&lt;td&gt;single&lt;/td&gt;
&lt;td&gt;university.degree&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;465&lt;/td&gt;
&lt;td&gt;mon&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;39&lt;/td&gt;
&lt;td&gt;services&lt;/td&gt;
&lt;td&gt;divorced&lt;/td&gt;
&lt;td&gt;high.school&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;cellular&lt;/td&gt;
&lt;td&gt;180&lt;/td&gt;
&lt;td&gt;wed&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to: https://&amp;lt;your.server&amp;gt;/suite/sites/aml and follow the sites wizard to create a new model.
&lt;ol&gt;
&lt;li&gt;On the first tab you can select the S3 bucket created earlier.&lt;/li&gt;
&lt;li&gt;If you do not plan on using Amazon&amp;rsquo;s feature transformation formulas than ensure that any data manipulation has done before formatting the data into a csv. See feature transformation below for more information.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Making Predictions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once a model is created you can make batch predictions or individual real-time predictions.&amp;nbsp;There are two main ways to make real time predictions within Appian: you can use either the shared component function&amp;nbsp;AML_getRealtimePrediction or you can use the Amazon &lt;a title="https://docs.appian.com/suite/help/latest/Connected_System_Template.html" href="https://docs.appian.com/suite/help/18.2/Connected_System_Template.html" rel="noopener noreferrer" target="_blank"&gt;connected system object&lt;/a&gt; in Appian versions 18.2 or later. The AML_getRealtimePrediction function&amp;nbsp;takes in a model ID and two parallel arrays that hold attribute names and attribute values. If using this function it is recommended to create a mapping rule that takes in a CDT and converts the CDT values into a text array to be passed into AML_getRealtimePrediction. Before even creating a connected system or&amp;nbsp;creating a rule to call the API you can test out real time predictions from the AML admin console or from the machine learning model record in the Appian AI designer site. It&amp;#39;s recommended to test out the predictions and evaluate the model (more below) before deciding to move forward with an initial model.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evaluating and Adjusting Model Performance&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whenever a new model is created there are four objects created in the AML Admin Console: One training data source, one evaluation data source, one model, and one evaluation object. As discussed above, Amazon uses different metrics to quantify performance.&amp;nbsp; In addition, Amazon provides a different performance visualization for each model. To access the performance metric and visualizations navigate to the admin console and select the evaluation object. For binary classification models you are able to adjust output using the dual histogram visualization (pictured below) by raising or lowering the score threshold that is defaulted to 0.5. For example if you would like to automate a process by auto approving likely true values you may want to raise the score threshold to a value closer to 1 in order to limit the false positives (raising the score threshold has the effect of increasing the probability needed for the model to predict a value as true). Inversely, if you would like to flag values that are likely false for further review you may want to lower the score threshold in order to limit the false negatives.&lt;/p&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/490x430/__key/communityserver-wikis-components-files/00-00-00-00-46/2376.Binary-histogram-2.JPG" /&gt;&lt;/div&gt;
&lt;div style="margin-bottom:3rem;margin-top:3rem;"&gt;&lt;img style="box-shadow:3px 3px 5px rgba(0, 0, 0, 0.1);" alt=" " src="/resized-image/__size/440x280/__key/communityserver-wikis-components-files/00-00-00-00-46/7167.Binary-histogram-example-2.JPG" /&gt;&lt;/div&gt;
&lt;p&gt;Another way to evaluate the model is to take a look at how each feature correlates to the target value. Some values have more of an impact of the predicted outcomes and this is quantified&amp;nbsp;by Amazon (to view these values navigate to either of the data sources in the AML admin console). It is generally&amp;nbsp;a best practice to include as many&amp;nbsp;relevant features as possible in your data set, but noise introduced by including too many variables with little predictive power may negatively impact your models performance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/retraining-models-on-new-data.html" rel="noopener noreferrer" target="_blank"&gt;Retraining Models&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retraining is the process of providing new data to models in attempt keep your model accurate with the drift of actual outcome distribution over time. Like most application development, implementing a machine learning model is not a one time activity; it is best practice to continuously monitor your model and retrain&amp;nbsp;it if new observations&amp;nbsp;begin to deviate from the original training data distributions.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In order to retrain a model in Amazon you will need to create a&amp;nbsp;completely new model with your updated data set. Be sure to avoid hard coding model Ids in your Appian applications so that updating your applications after retraining models will only&amp;nbsp;require updating a single&amp;nbsp;object such as a constant or connected system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/feature-processing.html" rel="noopener noreferrer" target="_blank"&gt;Feature Transformation&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A key characteristic of good training data is that it is provided in a way that is optimized for learning and generalization. The process of putting together the data in this optimal format is known in the industry as feature transformation.&lt;/li&gt;
&lt;li&gt;Feature transformation can be performed on all types of data (numeric, text, boolean). &amp;nbsp;A simple example of feature transformation is converting all null numeric values to 0, but can also include more complex formulas for the purpose of normalizing data or discovering non-linearity in the variables distribution.&lt;/li&gt;
&lt;li&gt;Feature transformation can take place prior to uploading data in Amazon or you can use built-in transformation recipes within the Amazon machine learning console. Regardless of the method used, the process should be repeatable such that models can be recreated or re-trained easily.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/splitting-types.html" rel="noopener noreferrer" target="_blank"&gt;Splitting Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order to test the accuracy of ML models a percentage of the data provided to Amazon is set aside for evaluation. By default Amazon splits the data such that 70% of it is used to train the model while 30% is used to evaluate it. The split percentage can be altered when creating the model.&lt;/li&gt;
&lt;li&gt;It is important to split the input data such that there is a random distribution of observations between the training and evaluation data sources. If the data for either data source is skewed towards a certain target value the ML model could be skewed and the evaluation model may not be indicative of true performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/training-parameters.html" rel="noopener noreferrer" target="_blank"&gt;Shuffling Data&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Amazon ML, you must shuffle your training data. Shuffling mixes up the order of your data so that the &lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/learning-algorithm.html" rel="noopener noreferrer" target="_blank"&gt;SGD algorithm&lt;/a&gt; doesn&amp;#39;t encounter one type of data for too many observations in succession.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;When creating a model via the admin console or the Appian AI Designer shared component wizard, you can indicate if you would like Amazon to shuffle your data or if you have already shuffled it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;See Also&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Websites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/machine-learning/latest/dg/what-is-amazon-machine-learning.html" rel="noopener noreferrer" target="_blank"&gt;AML Developer Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, Platform, Architecture&lt;/div&gt;
</description></item><item><title>Integrating with Amazon Machine Learning</title><link>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning/revision/1</link><pubDate>Tue, 31 Oct 2023 19:18:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24adb9fb-f09b-49ea-bf49-fa025c853030</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/guide/3407/integrating-with-amazon-machine-learning#comments</comments><description>Revision 1 posted to Guide by joel.larin on 10/31/2023 7:18:36 PM&lt;br /&gt;
&lt;p&gt;dfa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>