So now, I am sure my new model is ready for use as my calculator compute engine. When I check the results, I verify the results calculated (predicted) by the model are the same as the original ones that were indicated in the training and test dataset. I think that maybe, the algorithm hasn’t learned with the proper data, so I change the first seven registers of my initial dataset with the following operations with zeros:Īgain, running the pipeline and letting the magic work, Voila!!!, the process has learned to handle the zeroes and properly sum two input numbers. Those are the operations with zero as result. Once the pipeline completes, and reviewing the initial results, it seems the model is behaving in a proper way but when I test specific operands where the result is zero, I realize the model has misgivings: You can learn more about model creation in the How to Deploy Models in SAS tutorial on the SAS Users YouTube channel. The resulting model resembles the following: Note: if following along in your own environment, make sure to use Selection Method = Adaptive LASSO and toggle Suppress intercept = On in the linear regression node. So, with the training data set created, I’ll open a new machine learning project in SAS Viya Model Studio, selecting my data set from where the algorithm will learn, assign the target variable, add linear regression node, a test node, and click “Run pipeline”. a, b, c, d, …, n are the parameters the machine learning process determines to create the model.X 1, X 2, X 3, …, X n are the input variables – for the calculator, there only will be X 1 and X 2 as operands. y is the result of the model execution – the result of the addition operation.Linear regression is a simple machine learning algorithm based in the following formula: The algorithm / model I chose for my compute engine is the linear regression. The image below displays the general setup: I created a training data set in Excel with 100 registers, each of them with two random numbers between 0 and 1 and then the sum of them. I want my model to learn the addition of two numbers. The diagram below represents the process:Ī machine learning model is built from a data set where it self-learns what to do. Next, we’ll apply some extra logic which will perform subtraction, multiplication, and division. We’ll perform the addition by normal means of adding two numbers. We start with the addition operation and build from there. Create a machine learning model as the compute-engine Step 4 - Publish the artifact created as an API service (web app created outside of this post) Step 1. Step 3 - Step 3 - Embed the needed logic into the decision to perform the calculator operations (Intelligent Decisioning) Step 2 - Determine how to process other mathematical operations Step 1 - Create a machine learning model representing the compute-engine of my calculator (Model Studio) The steps that I am identifying to complete my challenge are: The end-to-end setup and execution process should not take more than a couple of hours.Development under the low code / no code paradigm.Usage of a machine learning model as the “compute-engine” of the calculator.The challenge must be executed under these restrictions: So, first, let’s define the purpose of my challenge: deploy a basic calculator API service capable of executing the following operations for two input decimal numbers: addition, subtraction, multiplication, and division I have challenged myself to do it, not for the purpose of promoting such an experiment into production, but simply accomplishing a self-challenge that can be easily achieved with the resources provided by SAS Viya, particularly SAS Model Studio and SAS Intelligent Decisioning. But considering curiosity is in my DNA, it sometimes works this way and machine learning is fun. If you are thinking that nobody in their right mind would implement a Calculator API Service with a machine learning model, then yes, you’re probably right.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |