How to deploy your Machine and Deep Learning Models

The importance of ModelOps (Model Operationalisation) cannot be stressed enough. This typically includes a number of the less sexy, but incredibly important, aspects of productionising models. These include ensuring that models are moved rapidly and robustly from the development or ‘lab’ environment, through the validation, testing and deployment phases, ensuring a quality result.

ModelOps also has a strong focus on model monitoring and reporting, so that models are retrained in a timely fashion to ensure that they continue to deliver peak performance.

Model Deployment with ADEPT Decisions

Being able to easily deploy models is essential, especially in today’s fast changing world. In order for your company to leverage the benefits associated with your models in terms of practical decision-making and delivering those all-important bottom-line benefits, your models need to be accurately and seamlessly deployed into production.

In this article, we explore the three key ways that our subscribers can deploy models quickly and efficiently within ADEPT Decisions, without having to involve external teams and resources. There is no limit to the number of models that you use within the portfolios. In addition, as the user, you can easily assign the various scorecards to the appropriate segments in the ADEPT Decisions user interface.

Implement models directly into ADEPT Decisions

Capture your traditional scorecards directly into ADEPT Decisions using the standard scorecard editor. Then implement your Machine Learning models directly into ADEPT Decisions by making use of a function. Finally, implement basic Regression models using the Regression type scorecard.

The function enables the user to directly code up a model in Python, updating it in Design Time and it is executed at Runtime. This means that the user is responsible for ensuring that the scoring algorithm is correctly coded using the user interface, where strategies and scorecards are updated or modified.

The scoring algorithm is then applied to each record as it is processed. Records are scored and the probability is then used within credit risk strategies to determine the appropriate actions or outcomes for each record.

If required, users can deploy their initial models to a test Runtime environment, validate that the results are correct, and then deploy to the production Runtime environment when ready.


Design Time versus Runtimes in ADEPT Decisions

Models can also be implemented by importing the associated PMML (Predictive Model Mark-up Language). We have developed and implemented several diverse types of models using these approaches including:

  • Standard or Traditional Scorecards
  • Classification Trees
  • Random Forests
  • Gradient Boost Models
  • Logistic Regression Models

Although PMML imports are possible within ADEPT Decisions, most of our clients use one of the other methodologies for incorporating models into their strategies.

Import scores from an external source

ADEPT Decisions can import externally generated scores, for example credit bureau scores, such as the more typical Account Origination Scores or Account Management Scores. However, in the event that an external provider has bespoke scores that a subscriber would like to import, those scores can be imported and used within decisioning as ADEPT Decisions executes records.

These scores are not calculated within ADEPT Decisions, rather, they are used as inputs into the decisioning software and then used in policy rules and strategies to determine the appropriate actions or outcomes to apply to each record.

Call an external service

The third way to implement Machine Learning or Deep Learning Models in ADEPT Decisions is by calling an external service. As our clients’ model-building teams become increasingly self-sufficient, this option has become more popular and sought after.

In essence, the end user deploys their model of choice, via Docker, Kubernetes or a similar container as an endpoint. When ADEPT Decisions executes each record, the appropriate data required by the model is sent to the service, which then computes and returns the probability.

Code to access the container as well as any probability to score conversions are applied within a function and are in the purview of the subscriber’s analytics team. The function is updated with the call to the endpoint through Design Time. The call to the scoring service happens when ADEPT Decisions runs during Runtime.

There are two primary advantages to this approach:

  • Variables can be transformed for use within the model.
  • Implementing a more complicated model, such as a Neural Net or an XGBoost Model through the use of external services is significantly more straight forward than implementing the equivalent model via Python encoding.

A key caveat when using this approach is to ensure that your container instance is located proximate to your ADEPT Decisions cloud instance, otherwise, there is likely to be a latency issue as the data needs to move between the two locations.

The other important consideration is to ensure the responsibilities contained within ModelOps and TechOps are separated clearly between the various teams. Although data scientists will be extremely skilled in the ModelOps arena, the TechOps management of the scoring services should be delegated to teams more experienced in performance and the fine tuning of running instances.

To date we have implemented a wide variety of model types by calling a service, including:

  • Neural Nets
  • Logistic and Linear regression
  • Classification Trees
  • Ensemble Models
  • XGBoost models where raw variables are transformed within the Container

Our primary aim is to ensure that you are able to implement your models seamlessly and effectively. As technologies and requirements change, we work with you to deliver the experience that best suits your business requirements.

About ADEPT Decisions

We disrupt the status quo in the lending industry by providing lenders with customer decisioning, credit risk consulting and advanced analytics to level the playing field, promote financial inclusion and support a new generation of financial products.